From a7cbb03ba1a784b29fefca8a2f38d9f82a745e38 Mon Sep 17 00:00:00 2001 From: qperrot Date: Thu, 16 Jan 2025 15:46:50 +0100 Subject: [PATCH] feat: add features flags on every test and set maxRun to 1 --- libs/coin-modules/coin-algorand/src/specs.ts | 9 +++++++-- libs/coin-modules/coin-bitcoin/src/specs.ts | 3 +++ libs/coin-modules/coin-cardano/src/specs.ts | 6 ++++++ libs/coin-modules/coin-cosmos/src/specs.ts | 5 ++++- libs/coin-modules/coin-elrond/src/specs.ts | 6 ++++++ libs/coin-modules/coin-evm/src/specs.ts | 5 ++++- .../coin-filecoin/src/test/bot-specs.ts | 5 +++++ libs/coin-modules/coin-hedera/src/test/bot-specs.ts | 9 ++++++--- libs/coin-modules/coin-icon/src/specs.ts | 2 ++ .../coin-internet_computer/src/test/bot-specs.ts | 2 ++ libs/coin-modules/coin-near/src/specs.ts | 5 +++++ .../coin-polkadot/src/test/bot-specs.ts | 13 ++++++++++--- libs/coin-modules/coin-solana/src/specs.ts | 10 +++++++++- libs/coin-modules/coin-stacks/src/test/bot-specs.ts | 2 ++ .../coin-modules/coin-stellar/src/test/bot-specs.ts | 8 ++++++-- libs/coin-modules/coin-tezos/src/test/bot-specs.ts | 11 +++++++++-- libs/coin-modules/coin-ton/src/specs.ts | 3 +++ libs/coin-modules/coin-tron/src/test/bot-specs.ts | 4 +++- .../coin-modules/coin-vechain/src/test/bot-specs.ts | 4 ++++ libs/coin-modules/coin-xrp/src/test/bot-specs.ts | 3 ++- libs/ledger-live-common/src/families/aptos/specs.ts | 1 + .../ledger-live-common/src/families/casper/specs.ts | 2 ++ .../celo/specs/createActivateVoteMutation.ts | 3 ++- .../src/families/celo/specs/createLockMutation.ts | 1 + .../celo/specs/createRegisterAccountMutation.ts | 1 + .../families/celo/specs/createRevokeVoteMutation.ts | 3 ++- .../src/families/celo/specs/createSendMutation.ts | 2 ++ .../src/families/celo/specs/createUnlockMutation.ts | 1 + .../src/families/celo/specs/createVoteMutation.ts | 1 + .../families/celo/specs/createWithdrawMutation.ts | 3 ++- 30 files changed, 113 insertions(+), 20 deletions(-) diff --git a/libs/coin-modules/coin-algorand/src/specs.ts b/libs/coin-modules/coin-algorand/src/specs.ts index f361a73cdb87..52d7406278b3 100644 --- a/libs/coin-modules/coin-algorand/src/specs.ts +++ b/libs/coin-modules/coin-algorand/src/specs.ts @@ -70,7 +70,8 @@ const algorand: AppSpec = { mutations: [ { name: "move ~50%", - maxRun: 2, + feature: "send", + maxRun: 1, testDestination: genericTestDestination, transaction: ({ account, siblings, bridge, maxSpendable }) => { invariant(maxSpendable.gt(0), "Spendable balance is too low"); @@ -104,6 +105,7 @@ const algorand: AppSpec = { }, { name: "send max", + feature: "sendMax", maxRun: 1, testDestination: genericTestDestination, transaction: ({ account, siblings, bridge, maxSpendable }) => { @@ -135,7 +137,8 @@ const algorand: AppSpec = { }, { name: "send ASA ~50%", - maxRun: 2, + feature: "tokens", + maxRun: 1, transaction: ({ account, siblings, bridge, maxSpendable }) => { invariant(maxSpendable.gt(0), "Spendable balance is too low"); const subAccount = sample(getAssetsWithBalance(account)); @@ -178,6 +181,7 @@ const algorand: AppSpec = { }, { name: "opt-In ASA available", + feature: "tokens", maxRun: 1, transaction: ({ account, bridge, maxSpendable }) => { // maxSpendable is expected to be greater than 100,000 micro-Algos @@ -217,6 +221,7 @@ const algorand: AppSpec = { }, { name: "claim rewards", + feature: "staking", maxRun: 1, transaction: ({ account, bridge, maxSpendable }) => { const rewards = (account as AlgorandAccount).algorandResources?.rewards; diff --git a/libs/coin-modules/coin-bitcoin/src/specs.ts b/libs/coin-modules/coin-bitcoin/src/specs.ts index 6de4b1541e47..651722265e32 100644 --- a/libs/coin-modules/coin-bitcoin/src/specs.ts +++ b/libs/coin-modules/coin-bitcoin/src/specs.ts @@ -145,6 +145,7 @@ const bitcoinLikeMutations = ({ }, { name: "optimize-size", + feature: "send", maxRun: 1, transaction: ({ account, siblings, bridge, maxSpendable }) => { invariant(maxSpendable.gt(minimalAmount), "balance is too low"); @@ -177,6 +178,7 @@ const bitcoinLikeMutations = ({ }, { name: "send 1 utxo", + feature: "send", maxRun: 1, transaction: ({ account, bridge, siblings, maxSpendable }) => { invariant(maxSpendable.gt(minimalAmount), "balance is too low"); @@ -250,6 +252,7 @@ const bitcoinLikeMutations = ({ }, { name: "send OP_RETURN transaction", + feature: "send", maxRun: 1, transaction: ({ account, bridge, siblings, maxSpendable }) => { invariant(maxSpendable.gt(minimalAmount), "balance is too low"); diff --git a/libs/coin-modules/coin-cardano/src/specs.ts b/libs/coin-modules/coin-cardano/src/specs.ts index f38d2000b45c..1e7255b1cd0c 100644 --- a/libs/coin-modules/coin-cardano/src/specs.ts +++ b/libs/coin-modules/coin-cardano/src/specs.ts @@ -35,6 +35,7 @@ const cardano: AppSpec = { mutations: [ { name: "move ~10% token", + feature: "tokens", maxRun: 1, transaction: ({ account, siblings, bridge, maxSpendable }) => { invariant(maxSpendable.gte(minSpendableRequiredForTokenTx), "balance is too low"); @@ -77,6 +78,7 @@ const cardano: AppSpec = { { testDestination: genericTestDestination, name: "move ~50%", + feature: "send", maxRun: 1, transaction: ({ account, siblings, bridge, maxSpendable }) => { invariant(maxSpendable.gt(minBalanceRequired), "balance is too low"); @@ -125,6 +127,7 @@ const cardano: AppSpec = { }, { name: "send max", + feature: "sendMax", maxRun: 1, testDestination: genericTestDestination, transaction: ({ account, siblings, bridge, maxSpendable }) => { @@ -163,6 +166,7 @@ const cardano: AppSpec = { }, { name: "delegate to pool", + feature: "staking", maxRun: 1, transaction: ({ account, bridge, maxSpendable }) => { invariant(maxSpendable.gte(minBalanceRequiredForDelegate), "balance is too low"); @@ -195,6 +199,7 @@ const cardano: AppSpec = { }, { name: "redelegate to pool", + feature: "staking", maxRun: 1, transaction: ({ account, bridge, maxSpendable }) => { invariant(maxSpendable.gte(minBalanceRequiredForDelegate), "balance is too low"); @@ -225,6 +230,7 @@ const cardano: AppSpec = { }, { name: "undelegate", + feature: "staking", maxRun: 1, transaction: ({ account, bridge, maxSpendable }) => { invariant(maxSpendable.gte(minBalanceRequiredForDelegate), "balance is too low"); diff --git a/libs/coin-modules/coin-cosmos/src/specs.ts b/libs/coin-modules/coin-cosmos/src/specs.ts index abf71e5b0934..33aae3cdb7aa 100644 --- a/libs/coin-modules/coin-cosmos/src/specs.ts +++ b/libs/coin-modules/coin-cosmos/src/specs.ts @@ -174,6 +174,7 @@ function cosmosLikeMutations(minimalTransactionAmount: BigNumber): MutationSpec< }, { name: "delegate new validators", + feature: "staking", maxRun: 1, transaction: ({ account, bridge, siblings }) => { expectSiblingsHaveSpendablePartGreaterThan(siblings, 0.5); @@ -242,7 +243,8 @@ function cosmosLikeMutations(minimalTransactionAmount: BigNumber): MutationSpec< }, { name: "undelegate", - maxRun: 5, + feature: "staking", + maxRun: 1, transaction: ({ account, bridge, maxSpendable }) => { invariant(canUndelegate(account as CosmosAccount), "can undelegate"); const { cosmosResources } = account as CosmosAccount; @@ -307,6 +309,7 @@ function cosmosLikeMutations(minimalTransactionAmount: BigNumber): MutationSpec< }, { name: "redelegate", + feature: "staking", maxRun: 1, transaction: ({ account, bridge, maxSpendable }) => { const { cosmosResources } = account as CosmosAccount; diff --git a/libs/coin-modules/coin-elrond/src/specs.ts b/libs/coin-modules/coin-elrond/src/specs.ts index 8928d7f0309a..4ac98e6dbd4f 100644 --- a/libs/coin-modules/coin-elrond/src/specs.ts +++ b/libs/coin-modules/coin-elrond/src/specs.ts @@ -170,6 +170,7 @@ const elrond: AppSpec = { mutations: [ { name: "send 50%~", + feature: "send", maxRun: 1, deviceAction: acceptMoveBalanceTransaction, transaction: ({ account, siblings, bridge }) => { @@ -204,6 +205,7 @@ const elrond: AppSpec = { }, { name: "send max", + feature: "sendMax", maxRun: 1, deviceAction: acceptMoveBalanceTransaction, transaction: ({ account, siblings, bridge }) => { @@ -236,6 +238,7 @@ const elrond: AppSpec = { }, { name: "move some ESDT", + feature: "tokens", maxRun: 1, deviceAction: acceptEsdtTransferTransaction, transaction: ({ account, siblings, bridge }) => { @@ -273,6 +276,7 @@ const elrond: AppSpec = { }, { name: "delegate 1 EGLD", + feature: "staking", maxRun: 1, deviceAction: acceptDelegateTransaction, transaction: ({ account, bridge }) => { @@ -301,6 +305,7 @@ const elrond: AppSpec = { }, { name: "unDelegate 1 EGLD", + feature: "staking", maxRun: 1, deviceAction: acceptUndelegateTransaction, transaction: ({ account, bridge }) => { @@ -331,6 +336,7 @@ const elrond: AppSpec = { }, { name: "withdraw all EGLD", + feature: "staking", maxRun: 1, deviceAction: acceptWithdrawTransaction, transaction: ({ account, bridge }) => { diff --git a/libs/coin-modules/coin-evm/src/specs.ts b/libs/coin-modules/coin-evm/src/specs.ts index 28bb9da63b8b..7e7971902cf9 100644 --- a/libs/coin-modules/coin-evm/src/specs.ts +++ b/libs/coin-modules/coin-evm/src/specs.ts @@ -225,7 +225,8 @@ const evmBasicMutations: ({ }) => MutationSpec[] = ({ maxAccount }) => [ { name: "move 50%", - maxRun: 2, + feature: "send", + maxRun: 1, testDestination: testCoinDestination, transaction: ({ account, siblings, bridge, maxSpendable }): TransactionRes => { const sibling = pickSiblings(siblings, maxAccount); @@ -266,6 +267,7 @@ const evmBasicMutations: ({ }, { name: "send max", + feature: "sendMax", maxRun: 1, testDestination: testCoinDestination, transaction: ({ account, siblings, bridge }): TransactionRes => { @@ -311,6 +313,7 @@ const evmBasicMutations: ({ const moveErc20Mutation: MutationSpec = { name: "move some ERC20 like (ERC20, BEP20, etc...)", + feature: "tokens", maxRun: 1, testDestination: testTokenDestination, transaction: ({ account, siblings, bridge }): TransactionRes => { diff --git a/libs/coin-modules/coin-filecoin/src/test/bot-specs.ts b/libs/coin-modules/coin-filecoin/src/test/bot-specs.ts index a98d6c2c80dd..578f343a964a 100644 --- a/libs/coin-modules/coin-filecoin/src/test/bot-specs.ts +++ b/libs/coin-modules/coin-filecoin/src/test/bot-specs.ts @@ -30,6 +30,7 @@ const filecoinSpecs: AppSpec = { mutations: [ { name: "Send small to f4 address", + feature: "send", maxRun: 1, deviceAction: generateDeviceActionFlow(BotScenario.F4_RECIPIENT), testDestination: genericTestDestination, @@ -51,6 +52,7 @@ const filecoinSpecs: AppSpec = { }, { name: "Send small to eth address", + feature: "send", maxRun: 1, deviceAction: generateDeviceActionFlow(BotScenario.ETH_RECIPIENT), testDestination: genericTestDestination, @@ -72,6 +74,7 @@ const filecoinSpecs: AppSpec = { }, { name: "Send 50%~", + feature: "send", maxRun: 1, testDestination: genericTestDestination, transaction: ({ account, siblings, bridge }) => { @@ -98,6 +101,7 @@ const filecoinSpecs: AppSpec = { }, { name: "Transfer Max", + feature: "sendMax", maxRun: 1, transaction: ({ account, siblings, bridge }) => { return { @@ -115,6 +119,7 @@ const filecoinSpecs: AppSpec = { }, { name: "Send ~50% WFIL", + feature: "tokens", maxRun: 1, deviceAction: generateDeviceActionFlow(BotScenario.TOKEN_TRANSFER), transaction: ({ account, bridge, maxSpendable }) => { diff --git a/libs/coin-modules/coin-hedera/src/test/bot-specs.ts b/libs/coin-modules/coin-hedera/src/test/bot-specs.ts index fa01b7539a6f..46ba88af52b0 100644 --- a/libs/coin-modules/coin-hedera/src/test/bot-specs.ts +++ b/libs/coin-modules/coin-hedera/src/test/bot-specs.ts @@ -49,7 +49,8 @@ const hedera: AppSpec = { mutations: [ { name: "Send ~50%", - maxRun: 2, + feature: "send", + maxRun: 1, testDestination: genericTestDestination, transaction: ({ account, @@ -83,7 +84,8 @@ const hedera: AppSpec = { }, { name: "Send max", - maxRun: 2, + feature: "sendMax", + maxRun: 1, testDestination: genericTestDestination, transaction: ({ account, @@ -109,7 +111,8 @@ const hedera: AppSpec = { }, { name: "Memo", - maxRun: 2, + feature: "send", + maxRun: 1, transaction: ({ account, siblings, diff --git a/libs/coin-modules/coin-icon/src/specs.ts b/libs/coin-modules/coin-icon/src/specs.ts index 39fb83213ec9..decbdf25ecd1 100644 --- a/libs/coin-modules/coin-icon/src/specs.ts +++ b/libs/coin-modules/coin-icon/src/specs.ts @@ -57,6 +57,7 @@ const icon: AppSpec = { mutations: [ { name: "send 50%~", + feature: "send", maxRun: 1, transaction: ({ account, siblings, bridge }) => { invariant(account.spendableBalance.gt(0), "balance is 0"); @@ -94,6 +95,7 @@ const icon: AppSpec = { }, { name: "send max", + feature: "sendMax", maxRun: 1, transaction: ({ account, siblings, bridge }) => { invariant(account.spendableBalance.gt(0), "balance is 0"); diff --git a/libs/coin-modules/coin-internet_computer/src/test/bot-specs.ts b/libs/coin-modules/coin-internet_computer/src/test/bot-specs.ts index 68a0640197d5..2172c16a5752 100644 --- a/libs/coin-modules/coin-internet_computer/src/test/bot-specs.ts +++ b/libs/coin-modules/coin-internet_computer/src/test/bot-specs.ts @@ -28,6 +28,7 @@ const internetComputerSpecs: AppSpec = { mutations: [ { name: "Send ~50%", + feature: "send", maxRun: 1, testDestination: genericTestDestination, transaction: ({ account, siblings, bridge, maxSpendable }) => { @@ -74,6 +75,7 @@ const internetComputerSpecs: AppSpec = { }, { name: "Transfer Max", + feature: "sendMax", maxRun: 1, testDestination: genericTestDestination, transaction: ({ account, siblings, bridge }) => { diff --git a/libs/coin-modules/coin-near/src/specs.ts b/libs/coin-modules/coin-near/src/specs.ts index edf483d32f3b..25d277b4118a 100644 --- a/libs/coin-modules/coin-near/src/specs.ts +++ b/libs/coin-modules/coin-near/src/specs.ts @@ -27,6 +27,7 @@ const near: AppSpec = { mutations: [ { name: "Move 50% to another account", + feature: "send", maxRun: 1, transaction: ({ account, siblings, bridge, maxSpendable }) => { invariant(maxSpendable.gt(minimalAmount), "balance is too low"); @@ -48,6 +49,7 @@ const near: AppSpec = { }, { name: "Send max to another account", + feature: "sendMax", maxRun: 1, transaction: ({ account, siblings, bridge, maxSpendable }) => { invariant(maxSpendable.gt(minimalAmount), "balance is too low"); @@ -66,6 +68,7 @@ const near: AppSpec = { }, { name: "Stake", + feature: "staking", maxRun: 1, transaction: ({ account, bridge, maxSpendable }) => { invariant(maxSpendable.gt(minimalAmount.plus(stakingFee)), "balance is too low"); @@ -99,6 +102,7 @@ const near: AppSpec = { }, { name: "Unstake", + feature: "staking", maxRun: 1, transaction: ({ account, bridge, maxSpendable }) => { invariant(maxSpendable.gt(stakingFee), "balance is too low for fees"); @@ -134,6 +138,7 @@ const near: AppSpec = { }, { name: "Withdraw", + feature: "staking", maxRun: 1, transaction: ({ account, bridge, maxSpendable }) => { invariant(maxSpendable.gt(stakingFee), "balance is too low for fees"); diff --git a/libs/coin-modules/coin-polkadot/src/test/bot-specs.ts b/libs/coin-modules/coin-polkadot/src/test/bot-specs.ts index 91bd7ec48ed4..9f47cb9d7492 100644 --- a/libs/coin-modules/coin-polkadot/src/test/bot-specs.ts +++ b/libs/coin-modules/coin-polkadot/src/test/bot-specs.ts @@ -62,7 +62,8 @@ const polkadot: AppSpec = { mutations: [ { name: "send 50%~", - maxRun: 4, + feature: "send", + maxRun: 1, testDestination: genericTestDestination, transaction: ({ account, siblings, bridge }) => { invariant((account as PolkadotAccount).polkadotResources, "polkadot resource"); @@ -107,6 +108,7 @@ const polkadot: AppSpec = { }, { name: "send max", + feature: "sendMax", maxRun: 1, testDestination: genericTestDestination, transaction: ({ account, siblings, bridge }) => { @@ -133,6 +135,7 @@ const polkadot: AppSpec = { }, { name: "bond - bondExtra", + feature: "staking", maxRun: 1, transaction: ({ siblings, account, bridge }) => { expectSiblingsHaveSpendablePartGreaterThan(siblings, 0.5); @@ -181,7 +184,8 @@ const polkadot: AppSpec = { }, { name: "unbond", - maxRun: 2, + feature: "staking", + maxRun: 1, transaction: ({ account, bridge }) => { const { polkadotResources } = account as PolkadotAccount; invariant(polkadotResources, "polkadot"); @@ -205,6 +209,7 @@ const polkadot: AppSpec = { }, { name: "rebond", + feature: "staking", maxRun: 1, transaction: ({ account, bridge }) => { const { polkadotResources } = account as PolkadotAccount; @@ -230,6 +235,7 @@ const polkadot: AppSpec = { }, { name: "nominate", + feature: "staking", maxRun: 1, transaction: ({ account, bridge }) => { invariant((account as PolkadotAccount).polkadotResources, "polkadot"); @@ -255,7 +261,8 @@ const polkadot: AppSpec = { }, { name: "withdraw", - maxRun: 2, + feature: "staking", + maxRun: 1, transaction: ({ account, bridge }) => { const { polkadotResources } = account as PolkadotAccount; invariant(polkadotResources, "polkadot"); diff --git a/libs/coin-modules/coin-solana/src/specs.ts b/libs/coin-modules/coin-solana/src/specs.ts index d33a8fbdfb61..f29a2d7cc013 100644 --- a/libs/coin-modules/coin-solana/src/specs.ts +++ b/libs/coin-modules/coin-solana/src/specs.ts @@ -39,7 +39,8 @@ const solana: AppSpec = { mutations: [ { name: "Transfer ~50%", - maxRun: 2, + feature: "send", + maxRun: 1, testDestination: genericTestDestination, deviceAction: acceptTransferTransaction, transaction: ({ account, siblings, bridge, maxSpendable }) => { @@ -60,6 +61,7 @@ const solana: AppSpec = { }, { name: "Transfer Max", + feature: "sendMax", maxRun: 1, deviceAction: acceptTransferTransaction, transaction: ({ account, siblings, bridge, maxSpendable }) => { @@ -83,6 +85,7 @@ const solana: AppSpec = { }, { name: "Delegate", + feature: "staking", maxRun: 1, deviceAction: acceptStakeCreateAccountTransaction, transaction: ({ account, bridge, siblings }) => { @@ -153,6 +156,7 @@ const solana: AppSpec = { }, { name: "Deactivate Activating Delegation", + feature: "staking", maxRun: 1, deviceAction: acceptStakeUndelegateTransaction, transaction: ({ account, bridge }) => { @@ -213,6 +217,7 @@ const solana: AppSpec = { }, { name: "Deactivate Active Delegation", + feature: "staking", maxRun: 1, deviceAction: acceptStakeUndelegateTransaction, transaction: ({ account, bridge }) => { @@ -270,6 +275,7 @@ const solana: AppSpec = { }, { name: "Reactivate Deactivating Delegation", + feature: "staking", maxRun: 1, deviceAction: acceptStakeDelegateTransaction, transaction: ({ account, bridge }) => { @@ -339,6 +345,7 @@ const solana: AppSpec = { }, { name: "Activate Inactive Delegation", + feature: "staking", maxRun: 1, deviceAction: acceptStakeDelegateTransaction, transaction: ({ account, bridge }) => { @@ -407,6 +414,7 @@ const solana: AppSpec = { }, { name: "Withdraw Delegation", + feature: "staking", maxRun: 1, deviceAction: acceptStakeWithdrawTransaction, transaction: ({ account, bridge }) => { diff --git a/libs/coin-modules/coin-stacks/src/test/bot-specs.ts b/libs/coin-modules/coin-stacks/src/test/bot-specs.ts index 1d5e539382ab..2605ff8a2fc5 100644 --- a/libs/coin-modules/coin-stacks/src/test/bot-specs.ts +++ b/libs/coin-modules/coin-stacks/src/test/bot-specs.ts @@ -27,6 +27,7 @@ const stacksSpecs: AppSpec = { mutations: [ { name: "Send 50%~", + feature: "send", maxRun: 1, transaction: ({ account, siblings, bridge }) => { const sibling = pickSiblings(siblings, 2); @@ -57,6 +58,7 @@ const stacksSpecs: AppSpec = { }, { name: "Transfer Max", + feature: "sendMax", maxRun: 1, transaction: ({ account, siblings, bridge }) => { const sibling = pickSiblings(siblings, 2); diff --git a/libs/coin-modules/coin-stellar/src/test/bot-specs.ts b/libs/coin-modules/coin-stellar/src/test/bot-specs.ts index 433cc37eaee5..0df1071af444 100644 --- a/libs/coin-modules/coin-stellar/src/test/bot-specs.ts +++ b/libs/coin-modules/coin-stellar/src/test/bot-specs.ts @@ -38,7 +38,8 @@ const stellar: AppSpec = { mutations: [ { name: "move ~50% XLM", - maxRun: 2, + feature: "send", + maxRun: 1, transaction: ({ account, siblings, bridge, maxSpendable }) => { invariant(maxSpendable.gt(minAmountCutoff), "XLM balance is too low"); @@ -112,7 +113,8 @@ const stellar: AppSpec = { }, { name: "Send max XLM", - maxRun: 2, + feature: "sendMax", + maxRun: 1, transaction: ({ account, siblings, bridge, maxSpendable }) => { invariant(maxSpendable.gt(minAmountCutoff), "XLM balance is too low"); @@ -177,6 +179,7 @@ const stellar: AppSpec = { }, { name: "add USDC asset", + feature: "tokens", maxRun: 1, transaction: ({ account, bridge, maxSpendable }) => { invariant(maxSpendable.gt(reserve), "XLM balance is too low 1"); @@ -217,6 +220,7 @@ const stellar: AppSpec = { }, { name: "move ~50% USDC asset", + feature: "tokens", maxRun: 1, transaction: ({ account, siblings, bridge, maxSpendable }) => { invariant(maxSpendable.gt(minAmountCutoff), "XLM balance is too low"); diff --git a/libs/coin-modules/coin-tezos/src/test/bot-specs.ts b/libs/coin-modules/coin-tezos/src/test/bot-specs.ts index 5cd1c726f468..1aaaa691d87c 100644 --- a/libs/coin-modules/coin-tezos/src/test/bot-specs.ts +++ b/libs/coin-modules/coin-tezos/src/test/bot-specs.ts @@ -43,6 +43,7 @@ const tezos: AppSpec = { mutations: [ { name: "send unrevealed", + feature: "send", maxRun: 1, testDestination: genericTestDestination, transaction: ({ maxSpendable, account, siblings, bridge }) => { @@ -61,7 +62,8 @@ const tezos: AppSpec = { }, { name: "send revealed", - maxRun: 2, + feature: "send", + maxRun: 1, testDestination: genericTestDestination, transaction: ({ maxSpendable, account, siblings, bridge }) => { expectRevealed(account); @@ -79,7 +81,8 @@ const tezos: AppSpec = { }, { name: "send max (non delegating)", - maxRun: 3, + feature: "sendMax", + maxRun: 1, testDestination: genericTestDestination, transaction: ({ account, siblings, bridge, maxSpendable }) => { invariant(!isAccountDelegating(account), "account must not be delegating"); @@ -96,6 +99,7 @@ const tezos: AppSpec = { }, { name: "delegate unrevealed", + feature: "staking", maxRun: 1, transaction: ({ account, bridge }) => { expectUnrevealed(account); @@ -109,6 +113,7 @@ const tezos: AppSpec = { }, { name: "delegate revealed", + feature: "staking", maxRun: 1, transaction: ({ account, bridge }) => { expectRevealed(account); @@ -122,6 +127,7 @@ const tezos: AppSpec = { }, { name: "undelegate unrevealed", + feature: "staking", maxRun: 1, transaction: ({ account, bridge }) => { invariant(getAccountDelegationSync(account), "account must be delegating"); @@ -134,6 +140,7 @@ const tezos: AppSpec = { }, { name: "undelegate revealed", + feature: "staking", maxRun: 1, transaction: ({ account, bridge }) => { invariant(getAccountDelegationSync(account), "account must be delegating"); diff --git a/libs/coin-modules/coin-ton/src/specs.ts b/libs/coin-modules/coin-ton/src/specs.ts index 8f57116d2175..b809b2ce461c 100644 --- a/libs/coin-modules/coin-ton/src/specs.ts +++ b/libs/coin-modules/coin-ton/src/specs.ts @@ -54,6 +54,7 @@ const tonSpecs: AppSpec = { mutations: [ { name: "Send ~50%", + feature: "send", maxRun: 1, testDestination, transaction: ({ account, siblings, bridge, maxSpendable }) => { @@ -90,6 +91,7 @@ const tonSpecs: AppSpec = { }, { name: "Transfer Max", + feature: "sendMax", maxRun: 1, transaction: ({ account, siblings, bridge }) => { const updates: Array> = [ @@ -118,6 +120,7 @@ const tonSpecs: AppSpec = { }, { name: "Send ~50% jUSDT", + feature: "tokens", maxRun: 1, deviceAction: generateDeviceActionFlow(BotScenario.TOKEN_TRANSFER), transaction: ({ account, bridge, maxSpendable, siblings }) => { diff --git a/libs/coin-modules/coin-tron/src/test/bot-specs.ts b/libs/coin-modules/coin-tron/src/test/bot-specs.ts index 4eed642209a7..035e5030ab75 100644 --- a/libs/coin-modules/coin-tron/src/test/bot-specs.ts +++ b/libs/coin-modules/coin-tron/src/test/bot-specs.ts @@ -53,7 +53,8 @@ const tron: AppSpec = { mutations: [ { name: "move 50% to another account", - maxRun: 2, + feature: "send", + maxRun: 1, testDestination, transaction: ({ account, siblings, bridge, maxSpendable }) => { invariant(maxSpendable.gt(minimalAmount), "balance is too low"); @@ -83,6 +84,7 @@ const tron: AppSpec = { }, { name: "send max to another account", + feature: "sendMax", maxRun: 1, testDestination, transaction: ({ account, siblings, bridge, maxSpendable }) => { diff --git a/libs/coin-modules/coin-vechain/src/test/bot-specs.ts b/libs/coin-modules/coin-vechain/src/test/bot-specs.ts index 18f3165fc6f6..b12fff9afc36 100644 --- a/libs/coin-modules/coin-vechain/src/test/bot-specs.ts +++ b/libs/coin-modules/coin-vechain/src/test/bot-specs.ts @@ -50,6 +50,7 @@ const vet: AppSpec = { mutations: [ { name: "move ~50% VET", + feature: "send", maxRun: 1, transaction: ({ account, @@ -87,6 +88,7 @@ const vet: AppSpec = { }, { name: "move all VET", + feature: "sendMax", maxRun: 1, transaction: ({ account, @@ -124,6 +126,7 @@ const vtho: AppSpec = { mutations: [ { name: "move ~50% VTHO", + feature: "tokens", maxRun: 1, transaction: ({ account, @@ -168,6 +171,7 @@ const vtho: AppSpec = { }, { name: "move all VTHO", + feature: "tokens", maxRun: 1, transaction: ({ account, diff --git a/libs/coin-modules/coin-xrp/src/test/bot-specs.ts b/libs/coin-modules/coin-xrp/src/test/bot-specs.ts index 7f474ede9155..0a5841d5d3ea 100644 --- a/libs/coin-modules/coin-xrp/src/test/bot-specs.ts +++ b/libs/coin-modules/coin-xrp/src/test/bot-specs.ts @@ -24,7 +24,8 @@ const xrp: AppSpec = { mutations: [ { name: "move ~50%", - maxRun: 2, + feature: "send", + maxRun: 1, testDestination: genericTestDestination, transaction: ({ account, siblings, bridge, maxSpendable }) => { invariant(maxSpendable.gt(minAmountCutoff), "balance is too low"); diff --git a/libs/ledger-live-common/src/families/aptos/specs.ts b/libs/ledger-live-common/src/families/aptos/specs.ts index caa42eb8944b..1e9be968c1df 100644 --- a/libs/ledger-live-common/src/families/aptos/specs.ts +++ b/libs/ledger-live-common/src/families/aptos/specs.ts @@ -29,6 +29,7 @@ const aptos: AppSpec = { mutations: [ { name: "Send ~50%", + feature: "send", maxRun: 1, testDestination: genericTestDestination, transaction: ({ account, siblings, bridge, maxSpendable }) => { diff --git a/libs/ledger-live-common/src/families/casper/specs.ts b/libs/ledger-live-common/src/families/casper/specs.ts index 448c92e06e94..a34792f648a5 100644 --- a/libs/ledger-live-common/src/families/casper/specs.ts +++ b/libs/ledger-live-common/src/families/casper/specs.ts @@ -30,6 +30,7 @@ const casperSpecs: AppSpec = { mutations: [ { name: "Send ~50%", + feature: "send", maxRun: 1, testDestination: genericTestDestination, transaction: ({ account, siblings, bridge, maxSpendable }) => { @@ -76,6 +77,7 @@ const casperSpecs: AppSpec = { }, { name: "Transfer Max", + feature: "sendMax", maxRun: 1, transaction: ({ account, siblings, bridge }) => { const updates: Array> = [ diff --git a/libs/ledger-live-common/src/families/celo/specs/createActivateVoteMutation.ts b/libs/ledger-live-common/src/families/celo/specs/createActivateVoteMutation.ts index e8b6090b4252..cac68d94f569 100644 --- a/libs/ledger-live-common/src/families/celo/specs/createActivateVoteMutation.ts +++ b/libs/ledger-live-common/src/families/celo/specs/createActivateVoteMutation.ts @@ -8,7 +8,8 @@ const minimalAmount = parseCurrencyUnit(currency.units[0], "0.001"); export const createActivateVoteMutation = (): MutationSpec => ({ name: "Celo: Activate Vote", - maxRun: 5, + feature: "staking", + maxRun: 1, transaction: ({ account, bridge, maxSpendable }) => { const { celoResources } = account as CeloAccount; invariant(celoResources?.registrationStatus, "Celo: Activate Vote | Account is not registered"); diff --git a/libs/ledger-live-common/src/families/celo/specs/createLockMutation.ts b/libs/ledger-live-common/src/families/celo/specs/createLockMutation.ts index 971db3969d7b..6a930caf91bf 100644 --- a/libs/ledger-live-common/src/families/celo/specs/createLockMutation.ts +++ b/libs/ledger-live-common/src/families/celo/specs/createLockMutation.ts @@ -8,6 +8,7 @@ const minimalAmount = parseCurrencyUnit(currency.units[0], "0.005"); export const createLockMutation = (): MutationSpec => ({ name: "Celo: Lock", + feature: "staking", maxRun: 1, transaction: ({ account, bridge, maxSpendable }) => { const { celoResources } = account as CeloAccount; diff --git a/libs/ledger-live-common/src/families/celo/specs/createRegisterAccountMutation.ts b/libs/ledger-live-common/src/families/celo/specs/createRegisterAccountMutation.ts index f35cd3674b4e..75ec62e26a4a 100644 --- a/libs/ledger-live-common/src/families/celo/specs/createRegisterAccountMutation.ts +++ b/libs/ledger-live-common/src/families/celo/specs/createRegisterAccountMutation.ts @@ -8,6 +8,7 @@ const minimalAmount = parseCurrencyUnit(currency.units[0], "0.001"); export const createRegisterAccountMutation = (): MutationSpec => ({ name: "Celo: Register Account", + feature: "staking", maxRun: 1, transaction: ({ account, bridge, maxSpendable }) => { const { celoResources } = account as CeloAccount; diff --git a/libs/ledger-live-common/src/families/celo/specs/createRevokeVoteMutation.ts b/libs/ledger-live-common/src/families/celo/specs/createRevokeVoteMutation.ts index f6214d9be021..19db20ebdc0c 100644 --- a/libs/ledger-live-common/src/families/celo/specs/createRevokeVoteMutation.ts +++ b/libs/ledger-live-common/src/families/celo/specs/createRevokeVoteMutation.ts @@ -8,7 +8,8 @@ const minimalAmount = parseCurrencyUnit(currency.units[0], "0.001"); export const createRevokeVoteMutation = (): MutationSpec => ({ name: "Celo: RevokeVote", - maxRun: 5, + feature: "staking", + maxRun: 1, transaction: ({ account, bridge, maxSpendable }) => { invariant(maxSpendable.gt(minimalAmount), "Celo: Revoke Vote | balance is too low"); diff --git a/libs/ledger-live-common/src/families/celo/specs/createSendMutation.ts b/libs/ledger-live-common/src/families/celo/specs/createSendMutation.ts index 5641f7e13397..29a8bd5693ce 100644 --- a/libs/ledger-live-common/src/families/celo/specs/createSendMutation.ts +++ b/libs/ledger-live-common/src/families/celo/specs/createSendMutation.ts @@ -10,6 +10,7 @@ export const minimalAmount = parseCurrencyUnit(currency.units[0], "0.001"); export const createSend50PercentMutation = (): MutationSpec => ({ name: "Celo: Move 50% to another account", + feature: "send", maxRun: 1, transaction: ({ account, siblings, bridge, maxSpendable }) => { invariant(maxSpendable.gt(minimalAmount), "Celo: Move 50% | balance is too low"); @@ -25,6 +26,7 @@ export const createSend50PercentMutation = (): MutationSpec => ({ export const createSendMaxMutation = (): MutationSpec => ({ name: "Celo: Send max to another account", + feature: "sendMax", maxRun: 1, transaction: ({ account, siblings, bridge, maxSpendable }) => { invariant(maxSpendable.gt(minimalAmount), "Celo: Send Max | Balance is too low"); diff --git a/libs/ledger-live-common/src/families/celo/specs/createUnlockMutation.ts b/libs/ledger-live-common/src/families/celo/specs/createUnlockMutation.ts index bb7c81b3cb4b..60a3c3dd0882 100644 --- a/libs/ledger-live-common/src/families/celo/specs/createUnlockMutation.ts +++ b/libs/ledger-live-common/src/families/celo/specs/createUnlockMutation.ts @@ -9,6 +9,7 @@ const minimalAmount = parseCurrencyUnit(currency.units[0], "0.001"); export const createUnlockMutation = (): MutationSpec => ({ name: "Celo: Unlock", + feature: "staking", maxRun: 1, transaction: ({ account, bridge, maxSpendable }) => { invariant(maxSpendable.gt(minimalAmount), "Celo: Unlock | balance is too low"); diff --git a/libs/ledger-live-common/src/families/celo/specs/createVoteMutation.ts b/libs/ledger-live-common/src/families/celo/specs/createVoteMutation.ts index 7ca7d6c996d7..9a89c4c9d35a 100644 --- a/libs/ledger-live-common/src/families/celo/specs/createVoteMutation.ts +++ b/libs/ledger-live-common/src/families/celo/specs/createVoteMutation.ts @@ -12,6 +12,7 @@ const minimalAmount = parseCurrencyUnit(currency.units[0], "0.001"); export const createVoteMutation = (): MutationSpec => ({ name: "Celo: Vote", + feature: "staking", maxRun: 1, transaction: ({ account, bridge, maxSpendable }) => { invariant(maxSpendable.gt(minimalAmount), "Celo: Vote | balance is too low"); diff --git a/libs/ledger-live-common/src/families/celo/specs/createWithdrawMutation.ts b/libs/ledger-live-common/src/families/celo/specs/createWithdrawMutation.ts index a9c547b448b1..a1c8cb14dc40 100644 --- a/libs/ledger-live-common/src/families/celo/specs/createWithdrawMutation.ts +++ b/libs/ledger-live-common/src/families/celo/specs/createWithdrawMutation.ts @@ -9,7 +9,8 @@ const minimalAmount = parseCurrencyUnit(currency.units[0], "0.001"); export const createWithdrawMutation = (): MutationSpec => ({ name: "Celo: Withdraw", - maxRun: 5, + feature: "staking", + maxRun: 1, transaction: ({ account, bridge, maxSpendable }) => { const celoAccount = account as CeloAccount; const { celoResources } = celoAccount;