@ledgerhq/live-common 34.53.0-nightly.20251119110540 → 34.53.0-nightly.20251120135143
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/__tests__/test-helpers/setup.integration.d.ts +2 -0
- package/lib/__tests__/test-helpers/setup.integration.d.ts.map +1 -0
- package/lib/__tests__/test-helpers/{setup.js → setup.integration.js} +4 -8
- package/lib/__tests__/test-helpers/setup.integration.js.map +1 -0
- package/lib/account/helpers.js +17 -17
- package/lib/account/helpers.js.map +1 -1
- package/lib/bridge/impl.d.ts +0 -2
- package/lib/bridge/impl.d.ts.map +1 -1
- package/lib/bridge/impl.js +4 -8
- package/lib/bridge/impl.js.map +1 -1
- package/lib/currencies/index.d.ts +1 -1
- package/lib/currencies/index.d.ts.map +1 -1
- package/lib/currencies/index.js +1 -4
- package/lib/currencies/index.js.map +1 -1
- package/lib/e2e/deviceInteraction/DeviceController.d.ts +41 -0
- package/lib/e2e/deviceInteraction/DeviceController.d.ts.map +1 -0
- package/lib/e2e/deviceInteraction/DeviceController.js +68 -0
- package/lib/e2e/deviceInteraction/DeviceController.js.map +1 -0
- package/lib/e2e/families/algorand.d.ts +1 -1
- package/lib/e2e/families/algorand.d.ts.map +1 -1
- package/lib/e2e/families/algorand.js +5 -5
- package/lib/e2e/families/algorand.js.map +1 -1
- package/lib/e2e/families/aptos.d.ts +2 -2
- package/lib/e2e/families/aptos.d.ts.map +1 -1
- package/lib/e2e/families/aptos.js +9 -9
- package/lib/e2e/families/aptos.js.map +1 -1
- package/lib/e2e/families/bitcoin.d.ts +2 -2
- package/lib/e2e/families/bitcoin.d.ts.map +1 -1
- package/lib/e2e/families/bitcoin.js +11 -11
- package/lib/e2e/families/bitcoin.js.map +1 -1
- package/lib/e2e/families/cardano.d.ts +6 -0
- package/lib/e2e/families/cardano.d.ts.map +1 -1
- package/lib/e2e/families/cardano.js +28 -26
- package/lib/e2e/families/cardano.js.map +1 -1
- package/lib/e2e/families/celo.d.ts +1 -1
- package/lib/e2e/families/celo.d.ts.map +1 -1
- package/lib/e2e/families/celo.js +5 -5
- package/lib/e2e/families/celo.js.map +1 -1
- package/lib/e2e/families/cosmos.d.ts +2 -2
- package/lib/e2e/families/cosmos.d.ts.map +1 -1
- package/lib/e2e/families/cosmos.js +9 -9
- package/lib/e2e/families/cosmos.js.map +1 -1
- package/lib/e2e/families/evm.d.ts +2 -0
- package/lib/e2e/families/evm.d.ts.map +1 -1
- package/lib/e2e/families/evm.js +13 -12
- package/lib/e2e/families/evm.js.map +1 -1
- package/lib/e2e/families/hedera.d.ts +1 -1
- package/lib/e2e/families/hedera.d.ts.map +1 -1
- package/lib/e2e/families/hedera.js +5 -5
- package/lib/e2e/families/hedera.js.map +1 -1
- package/lib/e2e/families/kaspa.d.ts +2 -2
- package/lib/e2e/families/kaspa.d.ts.map +1 -1
- package/lib/e2e/families/kaspa.js +9 -9
- package/lib/e2e/families/kaspa.js.map +1 -1
- package/lib/e2e/families/multiversX.d.ts +1 -1
- package/lib/e2e/families/multiversX.d.ts.map +1 -1
- package/lib/e2e/families/multiversX.js +5 -5
- package/lib/e2e/families/multiversX.js.map +1 -1
- package/lib/e2e/families/near.d.ts +1 -1
- package/lib/e2e/families/near.d.ts.map +1 -1
- package/lib/e2e/families/near.js +6 -6
- package/lib/e2e/families/near.js.map +1 -1
- package/lib/e2e/families/osmosis.d.ts +1 -1
- package/lib/e2e/families/osmosis.d.ts.map +1 -1
- package/lib/e2e/families/osmosis.js +5 -5
- package/lib/e2e/families/osmosis.js.map +1 -1
- package/lib/e2e/families/polkadot.d.ts +1 -1
- package/lib/e2e/families/polkadot.d.ts.map +1 -1
- package/lib/e2e/families/polkadot.js +5 -5
- package/lib/e2e/families/polkadot.js.map +1 -1
- package/lib/e2e/families/solana.d.ts +2 -2
- package/lib/e2e/families/solana.d.ts.map +1 -1
- package/lib/e2e/families/solana.js +9 -9
- package/lib/e2e/families/solana.js.map +1 -1
- package/lib/e2e/families/stellar.d.ts +1 -1
- package/lib/e2e/families/stellar.d.ts.map +1 -1
- package/lib/e2e/families/stellar.js +5 -5
- package/lib/e2e/families/stellar.js.map +1 -1
- package/lib/e2e/families/sui.d.ts +1 -1
- package/lib/e2e/families/sui.d.ts.map +1 -1
- package/lib/e2e/families/sui.js +5 -5
- package/lib/e2e/families/sui.js.map +1 -1
- package/lib/e2e/families/tezos.d.ts +1 -1
- package/lib/e2e/families/tezos.d.ts.map +1 -1
- package/lib/e2e/families/tezos.js +7 -8
- package/lib/e2e/families/tezos.js.map +1 -1
- package/lib/e2e/families/tron.d.ts +1 -1
- package/lib/e2e/families/tron.d.ts.map +1 -1
- package/lib/e2e/families/tron.js +5 -5
- package/lib/e2e/families/tron.js.map +1 -1
- package/lib/e2e/families/xrp.d.ts +1 -1
- package/lib/e2e/families/xrp.d.ts.map +1 -1
- package/lib/e2e/families/xrp.js +5 -5
- package/lib/e2e/families/xrp.js.map +1 -1
- package/lib/e2e/index.d.ts +9 -0
- package/lib/e2e/index.d.ts.map +1 -1
- package/lib/e2e/speculos.d.ts +11 -11
- package/lib/e2e/speculos.d.ts.map +1 -1
- package/lib/e2e/speculos.js +78 -78
- package/lib/e2e/speculos.js.map +1 -1
- package/lib/exchange/swap/getCompleteSwapHistory.js +2 -2
- package/lib/exchange/swap/getCompleteSwapHistory.js.map +1 -1
- package/lib/exchange/swap/hooks/useSelectableCurrencies.js +2 -2
- package/lib/exchange/swap/hooks/useSelectableCurrencies.js.map +1 -1
- package/lib/families/canton/bridge/mock.d.ts.map +1 -1
- package/lib/families/canton/bridge/mock.js +1 -0
- package/lib/families/canton/bridge/mock.js.map +1 -1
- package/lib/families/canton/react.d.ts +15 -0
- package/lib/families/canton/react.d.ts.map +1 -0
- package/lib/families/canton/react.js +14 -0
- package/lib/families/canton/react.js.map +1 -0
- package/lib/families/cosmos/datasets/dydx.integration.FIXME.d.ts +1 -1
- package/lib/families/cosmos/datasets/dydx.integration.FIXME.d.ts.map +1 -1
- package/lib/families/cosmos/datasets/dydx.integration.FIXME.js +1 -1
- package/lib/families/cosmos/datasets/dydx.integration.FIXME.js.map +1 -1
- package/lib/families/cosmos/datasets/secretNetwork.integration.FIXME.d.ts +1 -1
- package/lib/families/cosmos/datasets/secretNetwork.integration.FIXME.d.ts.map +1 -1
- package/lib/families/cosmos/datasets/secretNetwork.integration.FIXME.js +1 -1
- package/lib/families/cosmos/datasets/secretNetwork.integration.FIXME.js.map +1 -1
- package/lib/families/evm/setup.d.ts.map +1 -1
- package/lib/families/evm/setup.js +1 -11
- package/lib/families/evm/setup.js.map +1 -1
- package/lib/families/solana/setup.d.ts +8 -0
- package/lib/families/solana/setup.d.ts.map +1 -1
- package/lib/families/solana/setup.js +29 -16
- package/lib/families/solana/setup.js.map +1 -1
- package/lib/families/tron/data.mock.d.ts.map +1 -1
- package/lib/families/tron/data.mock.js +3 -6
- package/lib/families/tron/data.mock.js.map +1 -1
- package/lib/featureFlags/defaultFeatures.d.ts.map +1 -1
- package/lib/featureFlags/defaultFeatures.js +3 -0
- package/lib/featureFlags/defaultFeatures.js.map +1 -1
- package/lib/featureFlags/useFeature.d.ts +1 -1
- package/lib/featureFlags/useFeature.d.ts.map +1 -1
- package/lib/test-helpers/cryptoAssetsStore.d.ts +2 -0
- package/lib/test-helpers/cryptoAssetsStore.d.ts.map +1 -0
- package/lib/test-helpers/cryptoAssetsStore.js +8 -0
- package/lib/test-helpers/cryptoAssetsStore.js.map +1 -0
- package/lib/wallet-api/ACRE/server.js +5 -5
- package/lib/wallet-api/ACRE/server.js.map +1 -1
- package/lib/wallet-api/Exchange/server.js +4 -4
- package/lib/wallet-api/Exchange/server.js.map +1 -1
- package/lib/wallet-api/logic.js +8 -8
- package/lib/wallet-api/logic.js.map +1 -1
- package/lib/wallet-api/react.d.ts.map +1 -1
- package/lib/wallet-api/react.js +4 -2
- package/lib/wallet-api/react.js.map +1 -1
- package/lib/wallet-api/useDappLogic.js +2 -2
- package/lib/wallet-api/useDappLogic.js.map +1 -1
- package/lib-es/__tests__/test-helpers/setup.integration.d.ts +2 -0
- package/lib-es/__tests__/test-helpers/setup.integration.d.ts.map +1 -0
- package/lib-es/__tests__/test-helpers/setup.integration.js +14 -0
- package/lib-es/__tests__/test-helpers/setup.integration.js.map +1 -0
- package/lib-es/account/helpers.js +1 -1
- package/lib-es/account/helpers.js.map +1 -1
- package/lib-es/bridge/impl.d.ts +0 -2
- package/lib-es/bridge/impl.d.ts.map +1 -1
- package/lib-es/bridge/impl.js +3 -6
- package/lib-es/bridge/impl.js.map +1 -1
- package/lib-es/currencies/index.d.ts +1 -1
- package/lib-es/currencies/index.d.ts.map +1 -1
- package/lib-es/currencies/index.js +1 -1
- package/lib-es/currencies/index.js.map +1 -1
- package/lib-es/e2e/deviceInteraction/DeviceController.d.ts +41 -0
- package/lib-es/e2e/deviceInteraction/DeviceController.d.ts.map +1 -0
- package/lib-es/e2e/deviceInteraction/DeviceController.js +63 -0
- package/lib-es/e2e/deviceInteraction/DeviceController.js.map +1 -0
- package/lib-es/e2e/families/algorand.d.ts +1 -1
- package/lib-es/e2e/families/algorand.d.ts.map +1 -1
- package/lib-es/e2e/families/algorand.js +5 -4
- package/lib-es/e2e/families/algorand.js.map +1 -1
- package/lib-es/e2e/families/aptos.d.ts +2 -2
- package/lib-es/e2e/families/aptos.d.ts.map +1 -1
- package/lib-es/e2e/families/aptos.js +9 -7
- package/lib-es/e2e/families/aptos.js.map +1 -1
- package/lib-es/e2e/families/bitcoin.d.ts +2 -2
- package/lib-es/e2e/families/bitcoin.d.ts.map +1 -1
- package/lib-es/e2e/families/bitcoin.js +11 -9
- package/lib-es/e2e/families/bitcoin.js.map +1 -1
- package/lib-es/e2e/families/cardano.d.ts +6 -0
- package/lib-es/e2e/families/cardano.d.ts.map +1 -1
- package/lib-es/e2e/families/cardano.js +23 -21
- package/lib-es/e2e/families/cardano.js.map +1 -1
- package/lib-es/e2e/families/celo.d.ts +1 -1
- package/lib-es/e2e/families/celo.d.ts.map +1 -1
- package/lib-es/e2e/families/celo.js +5 -4
- package/lib-es/e2e/families/celo.js.map +1 -1
- package/lib-es/e2e/families/cosmos.d.ts +2 -2
- package/lib-es/e2e/families/cosmos.d.ts.map +1 -1
- package/lib-es/e2e/families/cosmos.js +9 -7
- package/lib-es/e2e/families/cosmos.js.map +1 -1
- package/lib-es/e2e/families/evm.d.ts +2 -0
- package/lib-es/e2e/families/evm.d.ts.map +1 -1
- package/lib-es/e2e/families/evm.js +10 -9
- package/lib-es/e2e/families/evm.js.map +1 -1
- package/lib-es/e2e/families/hedera.d.ts +1 -1
- package/lib-es/e2e/families/hedera.d.ts.map +1 -1
- package/lib-es/e2e/families/hedera.js +5 -4
- package/lib-es/e2e/families/hedera.js.map +1 -1
- package/lib-es/e2e/families/kaspa.d.ts +2 -2
- package/lib-es/e2e/families/kaspa.d.ts.map +1 -1
- package/lib-es/e2e/families/kaspa.js +9 -7
- package/lib-es/e2e/families/kaspa.js.map +1 -1
- package/lib-es/e2e/families/multiversX.d.ts +1 -1
- package/lib-es/e2e/families/multiversX.d.ts.map +1 -1
- package/lib-es/e2e/families/multiversX.js +5 -4
- package/lib-es/e2e/families/multiversX.js.map +1 -1
- package/lib-es/e2e/families/near.d.ts +1 -1
- package/lib-es/e2e/families/near.d.ts.map +1 -1
- package/lib-es/e2e/families/near.js +6 -5
- package/lib-es/e2e/families/near.js.map +1 -1
- package/lib-es/e2e/families/osmosis.d.ts +1 -1
- package/lib-es/e2e/families/osmosis.d.ts.map +1 -1
- package/lib-es/e2e/families/osmosis.js +5 -4
- package/lib-es/e2e/families/osmosis.js.map +1 -1
- package/lib-es/e2e/families/polkadot.d.ts +1 -1
- package/lib-es/e2e/families/polkadot.d.ts.map +1 -1
- package/lib-es/e2e/families/polkadot.js +5 -4
- package/lib-es/e2e/families/polkadot.js.map +1 -1
- package/lib-es/e2e/families/solana.d.ts +2 -2
- package/lib-es/e2e/families/solana.d.ts.map +1 -1
- package/lib-es/e2e/families/solana.js +9 -7
- package/lib-es/e2e/families/solana.js.map +1 -1
- package/lib-es/e2e/families/stellar.d.ts +1 -1
- package/lib-es/e2e/families/stellar.d.ts.map +1 -1
- package/lib-es/e2e/families/stellar.js +5 -4
- package/lib-es/e2e/families/stellar.js.map +1 -1
- package/lib-es/e2e/families/sui.d.ts +1 -1
- package/lib-es/e2e/families/sui.d.ts.map +1 -1
- package/lib-es/e2e/families/sui.js +5 -4
- package/lib-es/e2e/families/sui.js.map +1 -1
- package/lib-es/e2e/families/tezos.d.ts +1 -1
- package/lib-es/e2e/families/tezos.d.ts.map +1 -1
- package/lib-es/e2e/families/tezos.js +8 -8
- package/lib-es/e2e/families/tezos.js.map +1 -1
- package/lib-es/e2e/families/tron.d.ts +1 -1
- package/lib-es/e2e/families/tron.d.ts.map +1 -1
- package/lib-es/e2e/families/tron.js +5 -4
- package/lib-es/e2e/families/tron.js.map +1 -1
- package/lib-es/e2e/families/xrp.d.ts +1 -1
- package/lib-es/e2e/families/xrp.d.ts.map +1 -1
- package/lib-es/e2e/families/xrp.js +5 -4
- package/lib-es/e2e/families/xrp.js.map +1 -1
- package/lib-es/e2e/index.d.ts +9 -0
- package/lib-es/e2e/index.d.ts.map +1 -1
- package/lib-es/e2e/speculos.d.ts +11 -11
- package/lib-es/e2e/speculos.d.ts.map +1 -1
- package/lib-es/e2e/speculos.js +54 -43
- package/lib-es/e2e/speculos.js.map +1 -1
- package/lib-es/exchange/swap/getCompleteSwapHistory.js +1 -1
- package/lib-es/exchange/swap/getCompleteSwapHistory.js.map +1 -1
- package/lib-es/exchange/swap/hooks/useSelectableCurrencies.js +1 -1
- package/lib-es/exchange/swap/hooks/useSelectableCurrencies.js.map +1 -1
- package/lib-es/families/canton/bridge/mock.d.ts.map +1 -1
- package/lib-es/families/canton/bridge/mock.js +1 -0
- package/lib-es/families/canton/bridge/mock.js.map +1 -1
- package/lib-es/families/canton/react.d.ts +15 -0
- package/lib-es/families/canton/react.d.ts.map +1 -0
- package/lib-es/families/canton/react.js +10 -0
- package/lib-es/families/canton/react.js.map +1 -0
- package/lib-es/families/cosmos/datasets/dydx.integration.FIXME.d.ts +1 -1
- package/lib-es/families/cosmos/datasets/dydx.integration.FIXME.d.ts.map +1 -1
- package/lib-es/families/cosmos/datasets/dydx.integration.FIXME.js +1 -1
- package/lib-es/families/cosmos/datasets/dydx.integration.FIXME.js.map +1 -1
- package/lib-es/families/cosmos/datasets/secretNetwork.integration.FIXME.d.ts +1 -1
- package/lib-es/families/cosmos/datasets/secretNetwork.integration.FIXME.d.ts.map +1 -1
- package/lib-es/families/cosmos/datasets/secretNetwork.integration.FIXME.js +1 -1
- package/lib-es/families/cosmos/datasets/secretNetwork.integration.FIXME.js.map +1 -1
- package/lib-es/families/evm/setup.d.ts.map +1 -1
- package/lib-es/families/evm/setup.js +1 -11
- package/lib-es/families/evm/setup.js.map +1 -1
- package/lib-es/families/solana/setup.d.ts +8 -0
- package/lib-es/families/solana/setup.d.ts.map +1 -1
- package/lib-es/families/solana/setup.js +28 -17
- package/lib-es/families/solana/setup.js.map +1 -1
- package/lib-es/families/tron/data.mock.d.ts.map +1 -1
- package/lib-es/families/tron/data.mock.js +3 -6
- package/lib-es/families/tron/data.mock.js.map +1 -1
- package/lib-es/featureFlags/defaultFeatures.d.ts.map +1 -1
- package/lib-es/featureFlags/defaultFeatures.js +3 -0
- package/lib-es/featureFlags/defaultFeatures.js.map +1 -1
- package/lib-es/featureFlags/useFeature.d.ts +1 -1
- package/lib-es/featureFlags/useFeature.d.ts.map +1 -1
- package/lib-es/test-helpers/cryptoAssetsStore.d.ts +2 -0
- package/lib-es/test-helpers/cryptoAssetsStore.d.ts.map +1 -0
- package/lib-es/test-helpers/cryptoAssetsStore.js +2 -0
- package/lib-es/test-helpers/cryptoAssetsStore.js.map +1 -0
- package/lib-es/wallet-api/ACRE/server.js +1 -1
- package/lib-es/wallet-api/ACRE/server.js.map +1 -1
- package/lib-es/wallet-api/Exchange/server.js +1 -1
- package/lib-es/wallet-api/Exchange/server.js.map +1 -1
- package/lib-es/wallet-api/logic.js +1 -1
- package/lib-es/wallet-api/logic.js.map +1 -1
- package/lib-es/wallet-api/react.d.ts.map +1 -1
- package/lib-es/wallet-api/react.js +3 -1
- package/lib-es/wallet-api/react.js.map +1 -1
- package/lib-es/wallet-api/useDappLogic.js +1 -1
- package/lib-es/wallet-api/useDappLogic.js.map +1 -1
- package/package.json +67 -53
- package/src/DataModel.test.ts +2 -8
- package/src/__tests__/__snapshots__/csvExport.ts.snap +0 -718
- package/src/__tests__/accounts/groupPerDay.ts +2 -4
- package/src/__tests__/csvExport.ts +3 -3
- package/src/__tests__/currencies.ts +0 -38
- package/src/__tests__/test-helpers/setup.integration.ts +17 -0
- package/src/__tests__/test-helpers/setup.ts +3 -8
- package/src/account/helpers.test.ts +2 -2
- package/src/account/helpers.ts +1 -1
- package/src/account/serialization.test.ts +2 -2
- package/src/bridge/crypto-assets/index.test.ts +15 -44
- package/src/bridge/impl.ts +3 -7
- package/src/currencies/cryptoIcons.test.ts +23 -4
- package/src/currencies/helpers.test.ts +13 -0
- package/src/currencies/index.ts +0 -3
- package/src/currencies/sortByMarketcap.test.ts +0 -26
- package/src/domain/getTokensWithFunds.test.ts +32 -3
- package/src/e2e/deviceInteraction/DeviceController.ts +85 -0
- package/src/e2e/families/algorand.ts +20 -13
- package/src/e2e/families/aptos.ts +28 -16
- package/src/e2e/families/bitcoin.ts +53 -39
- package/src/e2e/families/cardano.ts +47 -36
- package/src/e2e/families/celo.ts +18 -12
- package/src/e2e/families/cosmos.ts +35 -23
- package/src/e2e/families/evm.ts +24 -13
- package/src/e2e/families/hedera.ts +6 -4
- package/src/e2e/families/kaspa.ts +28 -16
- package/src/e2e/families/multiversX.ts +16 -10
- package/src/e2e/families/near.ts +23 -17
- package/src/e2e/families/osmosis.ts +19 -13
- package/src/e2e/families/polkadot.ts +19 -13
- package/src/e2e/families/solana.ts +35 -23
- package/src/e2e/families/stellar.ts +18 -13
- package/src/e2e/families/sui.ts +15 -9
- package/src/e2e/families/tezos.ts +25 -18
- package/src/e2e/families/tron.ts +19 -13
- package/src/e2e/families/xrp.ts +19 -13
- package/src/e2e/speculos.ts +168 -140
- package/src/exchange/swap/getCompleteSwapHistory.ts +1 -1
- package/src/exchange/swap/hooks/useSelectableCurrencies.test.ts +4 -0
- package/src/exchange/swap/hooks/useSelectableCurrencies.ts +1 -1
- package/src/families/algorand/__snapshots__/bridge.integration.test.ts.snap +11 -11
- package/src/families/algorand/bridge.integration.test.ts +1 -1
- package/src/families/aptos/__snapshots__/bridge.integration.test.ts.snap +111 -1
- package/src/families/aptos/bridge.integration.test.ts +1 -1
- package/src/families/bitcoin/bridge.integration.test.ts +1 -1
- package/src/families/bitcoin/satstack.test.ts +5 -8
- package/src/families/canton/bridge/mock.ts +1 -0
- package/src/families/canton/react.ts +50 -0
- package/src/families/cardano/__snapshots__/bridge.integration.test.ts.snap +2 -2
- package/src/families/cardano/bridge.integration.test.ts +1 -1
- package/src/families/casper/bridge.integration.test.ts +1 -1
- package/src/families/celo/bridge.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/__snapshots__/cosmos.integration.test.ts.snap +1 -1
- package/src/families/cosmos/datasets/axelar.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/babylon.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/coreum.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/cosmos.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/cryptoOrg.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/desmos.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/dydx.integration.FIXME.ts +1 -1
- package/src/families/cosmos/datasets/injective.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/mantra.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/onomy.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/osmosis.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/persistence.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/quicksilver.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/secretNetwork.integration.FIXME.ts +1 -1
- package/src/families/cosmos/datasets/seiNetwork.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/stargaze.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/umee.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/xion.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/zenrock.integration.test.ts +1 -1
- package/src/families/evm/bridge.integration.test.ts +1 -1
- package/src/families/evm/setup.ts +0 -12
- package/src/families/filecoin/bridge.integration.test.ts +1 -1
- package/src/families/hedera/__snapshots__/bridge.integration.test.ts.snap +191 -596
- package/src/families/hedera/bridge.integration.test.ts +1 -1
- package/src/families/icon/bridge.integration.test.ts +1 -1
- package/src/families/internet_computer/bridge.integration.test.ts +1 -1
- package/src/families/kaspa/bridge.integration.test.ts +1 -1
- package/src/families/mina/bridge.integration.test.ts +1 -1
- package/src/families/multiversx/bridge.integration.test.ts +1 -1
- package/src/families/multiversx/synchronisation.integration.test.ts +1 -1
- package/src/families/near/bridge.integration.test.ts +1 -1
- package/src/families/polkadot/bridge.integration.test.ts +1 -1
- package/src/families/solana/__snapshots__/bridge.integration.test.ts.snap +14 -44
- package/src/families/solana/bridge.integration.test.ts +1 -1
- package/src/families/solana/setup.ts +37 -24
- package/src/families/stacks/__tests__/sync.integration.test.ts +1 -1
- package/src/families/stacks/bridge.integration.test.ts +1 -1
- package/src/families/stellar/__snapshots__/bridge.integration.test.ts.snap +3 -3
- package/src/families/stellar/bridge.integration.test.ts +1 -1
- package/src/families/sui/bridge.integration.test.ts +1 -1
- package/src/families/tezos/bridge.integration.test.ts +1 -1
- package/src/families/ton/bridge.integration.test.ts +1 -1
- package/src/families/tron/bridge.integration.test.ts +1 -1
- package/src/families/tron/data.mock.ts +4 -8
- package/src/families/vechain/bridge.integration.test.ts +1 -1
- package/src/families/xrp/bridge.integration.test.ts +1 -1
- package/src/featureFlags/defaultFeatures.ts +3 -0
- package/src/test-helpers/cryptoAssetsStore.ts +5 -0
- package/src/utils/__tests__/getAccountTuplesForCurrency.test.ts +3 -3
- package/src/wallet-api/ACRE/server.test.ts +3 -4
- package/src/wallet-api/ACRE/server.ts +1 -1
- package/src/wallet-api/Exchange/server.ts +1 -1
- package/src/wallet-api/logic.test.ts +3 -3
- package/src/wallet-api/logic.ts +1 -1
- package/src/wallet-api/react.ts +3 -1
- package/src/wallet-api/useDappLogic.ts +1 -1
- package/lib/__tests__/test-helpers/setup.d.ts +0 -2
- package/lib/__tests__/test-helpers/setup.d.ts.map +0 -1
- package/lib/__tests__/test-helpers/setup.js.map +0 -1
- package/lib/bridge/crypto-assets/index.d.ts +0 -4
- package/lib/bridge/crypto-assets/index.d.ts.map +0 -1
- package/lib/bridge/crypto-assets/index.js +0 -22
- package/lib/bridge/crypto-assets/index.js.map +0 -1
- package/lib/e2e/deviceInteraction/ButtonDeviceSimulator.d.ts +0 -3
- package/lib/e2e/deviceInteraction/ButtonDeviceSimulator.d.ts.map +0 -1
- package/lib/e2e/deviceInteraction/ButtonDeviceSimulator.js +0 -26
- package/lib/e2e/deviceInteraction/ButtonDeviceSimulator.js.map +0 -1
- package/lib-es/__tests__/test-helpers/setup.d.ts +0 -2
- package/lib-es/__tests__/test-helpers/setup.d.ts.map +0 -1
- package/lib-es/__tests__/test-helpers/setup.js +0 -18
- package/lib-es/__tests__/test-helpers/setup.js.map +0 -1
- package/lib-es/bridge/crypto-assets/index.d.ts +0 -4
- package/lib-es/bridge/crypto-assets/index.d.ts.map +0 -1
- package/lib-es/bridge/crypto-assets/index.js +0 -17
- package/lib-es/bridge/crypto-assets/index.js.map +0 -1
- package/lib-es/e2e/deviceInteraction/ButtonDeviceSimulator.d.ts +0 -3
- package/lib-es/e2e/deviceInteraction/ButtonDeviceSimulator.d.ts.map +0 -1
- package/lib-es/e2e/deviceInteraction/ButtonDeviceSimulator.js +0 -18
- package/lib-es/e2e/deviceInteraction/ButtonDeviceSimulator.js.map +0 -1
- package/src/bridge/crypto-assets/index.ts +0 -23
- package/src/e2e/deviceInteraction/ButtonDeviceSimulator.ts +0 -23
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getCryptoAssetsStore } from "
|
|
1
|
+
import { getCryptoAssetsStore } from "@ledgerhq/cryptoassets/state";
|
|
2
2
|
import type { AccountLike, SwapOperation } from "@ledgerhq/types-live";
|
|
3
3
|
import { accountWithMandatoryTokens, getAccountCurrency } from "../../account";
|
|
4
4
|
import type { MappedSwapOperation, SwapHistorySection } from "./types";
|
|
@@ -5,6 +5,10 @@ import { renderHook, waitFor } from "@testing-library/react";
|
|
|
5
5
|
|
|
6
6
|
import { useSelectableCurrencies } from "./useSelectableCurrencies";
|
|
7
7
|
import { getCryptoCurrencyById } from "../../../currencies";
|
|
8
|
+
import { setupMockCryptoAssetsStore } from "../../../test-helpers/cryptoAssetsStore";
|
|
9
|
+
|
|
10
|
+
// Setup mock store for unit tests
|
|
11
|
+
setupMockCryptoAssetsStore();
|
|
8
12
|
|
|
9
13
|
describe("useSelectableCurrencies", () => {
|
|
10
14
|
test("returns an empty array when empty list are passed", async () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useEffect, useState } from "react";
|
|
2
2
|
import { findCryptoCurrencyById } from "@ledgerhq/cryptoassets";
|
|
3
|
-
import { getCryptoAssetsStore } from "
|
|
3
|
+
import { getCryptoAssetsStore } from "@ledgerhq/cryptoassets/state";
|
|
4
4
|
import type { CryptoCurrency, TokenCurrency } from "@ledgerhq/types-cryptoassets";
|
|
5
5
|
|
|
6
6
|
export const useSelectableCurrencies = ({
|
|
@@ -22,39 +22,39 @@ exports[`algorand currency bridge scanAccounts algorand seed 1 1`] = `
|
|
|
22
22
|
"xpub": "ZC3HFULMJF53BF5ER4E2TTGPBRGH2Y4RVS32JZ6NH4RW7LN67HCE6UBS3Q",
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
|
-
"id": "js:2:algorand:ZC3HFULMJF53BF5ER4E2TTGPBRGH2Y4RVS32JZ6NH4RW7LN67HCE6UBS3Q:+
|
|
26
|
-
"operationsCount":
|
|
25
|
+
"id": "js:2:algorand:ZC3HFULMJF53BF5ER4E2TTGPBRGH2Y4RVS32JZ6NH4RW7LN67HCE6UBS3Q:+438828",
|
|
26
|
+
"operationsCount": 0,
|
|
27
27
|
"parentId": "js:2:algorand:ZC3HFULMJF53BF5ER4E2TTGPBRGH2Y4RVS32JZ6NH4RW7LN67HCE6UBS3Q:",
|
|
28
28
|
"pendingOperations": [],
|
|
29
29
|
"swapHistory": [],
|
|
30
|
-
"tokenId": "algorand/asa/
|
|
30
|
+
"tokenId": "algorand/asa/438828",
|
|
31
31
|
"type": "TokenAccountRaw",
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
|
-
"id": "js:2:algorand:ZC3HFULMJF53BF5ER4E2TTGPBRGH2Y4RVS32JZ6NH4RW7LN67HCE6UBS3Q:+
|
|
35
|
-
"operationsCount":
|
|
34
|
+
"id": "js:2:algorand:ZC3HFULMJF53BF5ER4E2TTGPBRGH2Y4RVS32JZ6NH4RW7LN67HCE6UBS3Q:+312769",
|
|
35
|
+
"operationsCount": 11,
|
|
36
36
|
"parentId": "js:2:algorand:ZC3HFULMJF53BF5ER4E2TTGPBRGH2Y4RVS32JZ6NH4RW7LN67HCE6UBS3Q:",
|
|
37
37
|
"pendingOperations": [],
|
|
38
38
|
"swapHistory": [],
|
|
39
|
-
"tokenId": "algorand/asa/
|
|
39
|
+
"tokenId": "algorand/asa/312769",
|
|
40
40
|
"type": "TokenAccountRaw",
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
|
-
"id": "js:2:algorand:ZC3HFULMJF53BF5ER4E2TTGPBRGH2Y4RVS32JZ6NH4RW7LN67HCE6UBS3Q:+
|
|
43
|
+
"id": "js:2:algorand:ZC3HFULMJF53BF5ER4E2TTGPBRGH2Y4RVS32JZ6NH4RW7LN67HCE6UBS3Q:+2757561",
|
|
44
44
|
"operationsCount": 0,
|
|
45
45
|
"parentId": "js:2:algorand:ZC3HFULMJF53BF5ER4E2TTGPBRGH2Y4RVS32JZ6NH4RW7LN67HCE6UBS3Q:",
|
|
46
46
|
"pendingOperations": [],
|
|
47
47
|
"swapHistory": [],
|
|
48
|
-
"tokenId": "algorand/asa/
|
|
48
|
+
"tokenId": "algorand/asa/2757561",
|
|
49
49
|
"type": "TokenAccountRaw",
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
|
-
"id": "js:2:algorand:ZC3HFULMJF53BF5ER4E2TTGPBRGH2Y4RVS32JZ6NH4RW7LN67HCE6UBS3Q:+
|
|
52
|
+
"id": "js:2:algorand:ZC3HFULMJF53BF5ER4E2TTGPBRGH2Y4RVS32JZ6NH4RW7LN67HCE6UBS3Q:+438837",
|
|
53
53
|
"operationsCount": 0,
|
|
54
54
|
"parentId": "js:2:algorand:ZC3HFULMJF53BF5ER4E2TTGPBRGH2Y4RVS32JZ6NH4RW7LN67HCE6UBS3Q:",
|
|
55
55
|
"pendingOperations": [],
|
|
56
56
|
"swapHistory": [],
|
|
57
|
-
"tokenId": "algorand/asa/
|
|
57
|
+
"tokenId": "algorand/asa/438837",
|
|
58
58
|
"type": "TokenAccountRaw",
|
|
59
59
|
},
|
|
60
60
|
{
|
|
@@ -2772,6 +2772,7 @@ exports[`algorand currency bridge scanAccounts algorand seed 1 2`] = `
|
|
|
2772
2772
|
"value": "1010",
|
|
2773
2773
|
},
|
|
2774
2774
|
],
|
|
2775
|
+
[],
|
|
2775
2776
|
[
|
|
2776
2777
|
{
|
|
2777
2778
|
"accountId": "js:2:algorand:ZC3HFULMJF53BF5ER4E2TTGPBRGH2Y4RVS32JZ6NH4RW7LN67HCE6UBS3Q:+312769",
|
|
@@ -2965,7 +2966,6 @@ exports[`algorand currency bridge scanAccounts algorand seed 1 2`] = `
|
|
|
2965
2966
|
[],
|
|
2966
2967
|
[],
|
|
2967
2968
|
[],
|
|
2968
|
-
[],
|
|
2969
2969
|
[
|
|
2970
2970
|
{
|
|
2971
2971
|
"accountId": "js:2:algorand:EGZQNDFCXGR3BMP4NDM6ZPLBMY7WSV6GRKOHM6VBJKFLWQ3RQDTE3JYNFE:",
|
|
@@ -16,7 +16,7 @@ exports[`aptos currency bridge scanAccounts aptos seed 1 1`] = `
|
|
|
16
16
|
"freshAddressPath": "44'/637'/0'/0'/0'",
|
|
17
17
|
"id": "js:2:aptos:d1a8c6a1cdd52dd40c7ea61ee4571fb51fcae440a594c1eca18636928f1d3956:aptos",
|
|
18
18
|
"index": 0,
|
|
19
|
-
"operationsCount":
|
|
19
|
+
"operationsCount": 8,
|
|
20
20
|
"pendingOperations": [],
|
|
21
21
|
"seedIdentifier": "d6816f4f22f867b56cf9304b776f452a16d107835d73ee8a33c4ced210300583",
|
|
22
22
|
"spendableBalance": "19949100",
|
|
@@ -26,6 +26,17 @@ exports[`aptos currency bridge scanAccounts aptos seed 1 1`] = `
|
|
|
26
26
|
"used": true,
|
|
27
27
|
"xpub": "d1a8c6a1cdd52dd40c7ea61ee4571fb51fcae440a594c1eca18636928f1d3956",
|
|
28
28
|
},
|
|
29
|
+
{
|
|
30
|
+
"balance": "30000000",
|
|
31
|
+
"id": "js:2:aptos:d1a8c6a1cdd52dd40c7ea61ee4571fb51fcae440a594c1eca18636928f1d3956:aptos+aptos%2Fcoin%2Fdstapt~!underscore!~0xd11107bdf0d6d7040c6c0bfbdecb6545191fdf13e8d8d259952f53e1713f61b5%3A%3Astaked~!underscore!~coin%3A%3Astakedaptos",
|
|
32
|
+
"operationsCount": 2,
|
|
33
|
+
"parentId": "js:2:aptos:d1a8c6a1cdd52dd40c7ea61ee4571fb51fcae440a594c1eca18636928f1d3956:aptos",
|
|
34
|
+
"pendingOperations": [],
|
|
35
|
+
"spendableBalance": "30000000",
|
|
36
|
+
"swapHistory": [],
|
|
37
|
+
"tokenId": "aptos/coin/dstapt_0xd11107bdf0d6d7040c6c0bfbdecb6545191fdf13e8d8d259952f53e1713f61b5::staked_coin::stakedaptos",
|
|
38
|
+
"type": "TokenAccountRaw",
|
|
39
|
+
},
|
|
29
40
|
{
|
|
30
41
|
"aptosResources": {
|
|
31
42
|
"activeBalance": "0",
|
|
@@ -50,6 +61,17 @@ exports[`aptos currency bridge scanAccounts aptos seed 1 1`] = `
|
|
|
50
61
|
"used": true,
|
|
51
62
|
"xpub": "6a7712fdac0cb4ed27076c707e7798be52cf6c93a2d43d5cf9b874d0a45a111e",
|
|
52
63
|
},
|
|
64
|
+
{
|
|
65
|
+
"balance": "20000000",
|
|
66
|
+
"id": "js:2:aptos:6a7712fdac0cb4ed27076c707e7798be52cf6c93a2d43d5cf9b874d0a45a111e:aptos+aptos%2Fcoin%2Fdstapt~!underscore!~0xd11107bdf0d6d7040c6c0bfbdecb6545191fdf13e8d8d259952f53e1713f61b5%3A%3Astaked~!underscore!~coin%3A%3Astakedaptos",
|
|
67
|
+
"operationsCount": 1,
|
|
68
|
+
"parentId": "js:2:aptos:6a7712fdac0cb4ed27076c707e7798be52cf6c93a2d43d5cf9b874d0a45a111e:aptos",
|
|
69
|
+
"pendingOperations": [],
|
|
70
|
+
"spendableBalance": "20000000",
|
|
71
|
+
"swapHistory": [],
|
|
72
|
+
"tokenId": "aptos/coin/dstapt_0xd11107bdf0d6d7040c6c0bfbdecb6545191fdf13e8d8d259952f53e1713f61b5::staked_coin::stakedaptos",
|
|
73
|
+
"type": "TokenAccountRaw",
|
|
74
|
+
},
|
|
53
75
|
{
|
|
54
76
|
"aptosResources": {
|
|
55
77
|
"activeBalance": "0",
|
|
@@ -101,6 +123,27 @@ exports[`aptos currency bridge scanAccounts aptos seed 1 2`] = `
|
|
|
101
123
|
"type": "IN",
|
|
102
124
|
"value": "100000",
|
|
103
125
|
},
|
|
126
|
+
{
|
|
127
|
+
"accountId": "js:2:aptos:d1a8c6a1cdd52dd40c7ea61ee4571fb51fcae440a594c1eca18636928f1d3956:aptos",
|
|
128
|
+
"blockHash": "0x9e074a52c774ef1338724cfa72edde9af38cad6f4ddf0139ca9741ebdd7c7e79",
|
|
129
|
+
"blockHeight": 302075105,
|
|
130
|
+
"extra": {
|
|
131
|
+
"version": "2463221055",
|
|
132
|
+
},
|
|
133
|
+
"fee": "50900",
|
|
134
|
+
"hasFailed": false,
|
|
135
|
+
"hash": "0x2395c1d7e358ab02ea44cfd616c966da80edc688c1d9a1c0ef7926577bdb20df",
|
|
136
|
+
"id": "js:2:aptos:d1a8c6a1cdd52dd40c7ea61ee4571fb51fcae440a594c1eca18636928f1d3956:aptos-0x2395c1d7e358ab02ea44cfd616c966da80edc688c1d9a1c0ef7926577bdb20df-OUT",
|
|
137
|
+
"recipients": [
|
|
138
|
+
"0xd20fa44192f94ba086ab16bfdf57e43ff118ada69b4c66fa9b9a9223cbc068c1",
|
|
139
|
+
],
|
|
140
|
+
"senders": [
|
|
141
|
+
"0x445fa0013887abd1a0c14acdec6e48090e0ad3fed3e08202aac15ca14f3be26b",
|
|
142
|
+
],
|
|
143
|
+
"transactionSequenceNumber": "2",
|
|
144
|
+
"type": "FEES",
|
|
145
|
+
"value": "50900",
|
|
146
|
+
},
|
|
104
147
|
{
|
|
105
148
|
"accountId": "js:2:aptos:d1a8c6a1cdd52dd40c7ea61ee4571fb51fcae440a594c1eca18636928f1d3956:aptos",
|
|
106
149
|
"blockHash": "0x46de657932759f16ffcda6ef6ace41996f263287e538d3e0f5cbf85994695247",
|
|
@@ -228,6 +271,50 @@ exports[`aptos currency bridge scanAccounts aptos seed 1 2`] = `
|
|
|
228
271
|
"value": "119900",
|
|
229
272
|
},
|
|
230
273
|
],
|
|
274
|
+
[
|
|
275
|
+
{
|
|
276
|
+
"accountId": "js:2:aptos:d1a8c6a1cdd52dd40c7ea61ee4571fb51fcae440a594c1eca18636928f1d3956:aptos+aptos%2Fcoin%2Fdstapt~!underscore!~0xd11107bdf0d6d7040c6c0bfbdecb6545191fdf13e8d8d259952f53e1713f61b5%3A%3Astaked~!underscore!~coin%3A%3Astakedaptos",
|
|
277
|
+
"blockHash": "0x9e074a52c774ef1338724cfa72edde9af38cad6f4ddf0139ca9741ebdd7c7e79",
|
|
278
|
+
"blockHeight": 302075105,
|
|
279
|
+
"extra": {
|
|
280
|
+
"version": "2463221055",
|
|
281
|
+
},
|
|
282
|
+
"fee": "50900",
|
|
283
|
+
"hasFailed": false,
|
|
284
|
+
"hash": "0x2395c1d7e358ab02ea44cfd616c966da80edc688c1d9a1c0ef7926577bdb20df",
|
|
285
|
+
"id": "js:2:aptos:d1a8c6a1cdd52dd40c7ea61ee4571fb51fcae440a594c1eca18636928f1d3956:aptos-0x2395c1d7e358ab02ea44cfd616c966da80edc688c1d9a1c0ef7926577bdb20df-OUT",
|
|
286
|
+
"recipients": [
|
|
287
|
+
"0xd20fa44192f94ba086ab16bfdf57e43ff118ada69b4c66fa9b9a9223cbc068c1",
|
|
288
|
+
],
|
|
289
|
+
"senders": [
|
|
290
|
+
"0x445fa0013887abd1a0c14acdec6e48090e0ad3fed3e08202aac15ca14f3be26b",
|
|
291
|
+
],
|
|
292
|
+
"transactionSequenceNumber": "2",
|
|
293
|
+
"type": "OUT",
|
|
294
|
+
"value": "20000000",
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"accountId": "js:2:aptos:d1a8c6a1cdd52dd40c7ea61ee4571fb51fcae440a594c1eca18636928f1d3956:aptos+aptos%2Fcoin%2Fdstapt~!underscore!~0xd11107bdf0d6d7040c6c0bfbdecb6545191fdf13e8d8d259952f53e1713f61b5%3A%3Astaked~!underscore!~coin%3A%3Astakedaptos",
|
|
298
|
+
"blockHash": "0xc63f03f1a7778ffc70cecd027865d11e3562686fe4e27acf239f184df4aa01c0",
|
|
299
|
+
"blockHeight": 302069858,
|
|
300
|
+
"extra": {
|
|
301
|
+
"version": "2463179091",
|
|
302
|
+
},
|
|
303
|
+
"fee": "50900",
|
|
304
|
+
"hasFailed": false,
|
|
305
|
+
"hash": "0xad157eb4b6fb91b5bee3b0110d7321dbcf2138988709aa1692d0621b9b2136b2",
|
|
306
|
+
"id": "js:2:aptos:d1a8c6a1cdd52dd40c7ea61ee4571fb51fcae440a594c1eca18636928f1d3956:aptos-0xad157eb4b6fb91b5bee3b0110d7321dbcf2138988709aa1692d0621b9b2136b2-IN",
|
|
307
|
+
"recipients": [
|
|
308
|
+
"0x445fa0013887abd1a0c14acdec6e48090e0ad3fed3e08202aac15ca14f3be26b",
|
|
309
|
+
],
|
|
310
|
+
"senders": [
|
|
311
|
+
"0xa0d8abc262e3321f87d745bd5d687e8f3fb14c87d48f840b6b56867df0026ec8",
|
|
312
|
+
],
|
|
313
|
+
"transactionSequenceNumber": "85",
|
|
314
|
+
"type": "IN",
|
|
315
|
+
"value": "50000000",
|
|
316
|
+
},
|
|
317
|
+
],
|
|
231
318
|
[
|
|
232
319
|
{
|
|
233
320
|
"accountId": "js:2:aptos:6a7712fdac0cb4ed27076c707e7798be52cf6c93a2d43d5cf9b874d0a45a111e:aptos",
|
|
@@ -335,6 +422,29 @@ exports[`aptos currency bridge scanAccounts aptos seed 1 2`] = `
|
|
|
335
422
|
"value": "20000",
|
|
336
423
|
},
|
|
337
424
|
],
|
|
425
|
+
[
|
|
426
|
+
{
|
|
427
|
+
"accountId": "js:2:aptos:6a7712fdac0cb4ed27076c707e7798be52cf6c93a2d43d5cf9b874d0a45a111e:aptos+aptos%2Fcoin%2Fdstapt~!underscore!~0xd11107bdf0d6d7040c6c0bfbdecb6545191fdf13e8d8d259952f53e1713f61b5%3A%3Astaked~!underscore!~coin%3A%3Astakedaptos",
|
|
428
|
+
"blockHash": "0x9e074a52c774ef1338724cfa72edde9af38cad6f4ddf0139ca9741ebdd7c7e79",
|
|
429
|
+
"blockHeight": 302075105,
|
|
430
|
+
"extra": {
|
|
431
|
+
"version": "2463221055",
|
|
432
|
+
},
|
|
433
|
+
"fee": "50900",
|
|
434
|
+
"hasFailed": false,
|
|
435
|
+
"hash": "0x2395c1d7e358ab02ea44cfd616c966da80edc688c1d9a1c0ef7926577bdb20df",
|
|
436
|
+
"id": "js:2:aptos:6a7712fdac0cb4ed27076c707e7798be52cf6c93a2d43d5cf9b874d0a45a111e:aptos-0x2395c1d7e358ab02ea44cfd616c966da80edc688c1d9a1c0ef7926577bdb20df-IN",
|
|
437
|
+
"recipients": [
|
|
438
|
+
"0xd20fa44192f94ba086ab16bfdf57e43ff118ada69b4c66fa9b9a9223cbc068c1",
|
|
439
|
+
],
|
|
440
|
+
"senders": [
|
|
441
|
+
"0x445fa0013887abd1a0c14acdec6e48090e0ad3fed3e08202aac15ca14f3be26b",
|
|
442
|
+
],
|
|
443
|
+
"transactionSequenceNumber": "2",
|
|
444
|
+
"type": "IN",
|
|
445
|
+
"value": "20000000",
|
|
446
|
+
},
|
|
447
|
+
],
|
|
338
448
|
[],
|
|
339
449
|
]
|
|
340
450
|
`;
|
|
@@ -18,8 +18,7 @@ import { inferDescriptorFromAccount, AccountDescriptor } from "@ledgerhq/coin-bi
|
|
|
18
18
|
import { setEnv } from "@ledgerhq/live-env";
|
|
19
19
|
import { fromAccountRaw } from "../../account";
|
|
20
20
|
import { setSupportedCurrencies } from "../../currencies";
|
|
21
|
-
import {
|
|
22
|
-
import type { CryptoAssetsStore } from "@ledgerhq/types-live";
|
|
21
|
+
import { setupMockCryptoAssetsStore } from "@ledgerhq/cryptoassets/cal-client/test-helpers";
|
|
23
22
|
|
|
24
23
|
setSupportedCurrencies(["bitcoin"]);
|
|
25
24
|
jest.setTimeout(10000);
|
|
@@ -234,13 +233,11 @@ describe("stringifySatStackConfig", () => {
|
|
|
234
233
|
}`);
|
|
235
234
|
});
|
|
236
235
|
});
|
|
236
|
+
|
|
237
237
|
describe("editSatStackConfig", () => {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
findTokenByAddressInCurrency: async (_: string, __: string) => undefined,
|
|
242
|
-
getTokensSyncHash: async (_: string) => "0",
|
|
243
|
-
} as unknown as CryptoAssetsStore);
|
|
238
|
+
setupMockCryptoAssetsStore({
|
|
239
|
+
getTokensSyncHash: async () => "0",
|
|
240
|
+
});
|
|
244
241
|
|
|
245
242
|
let config: any;
|
|
246
243
|
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { useCallback } from "react";
|
|
2
|
+
import { getCurrencyBridge } from "../../bridge";
|
|
3
|
+
import { CantonCurrencyBridge } from "@ledgerhq/coin-canton/types";
|
|
4
|
+
import { CryptoCurrency } from "@ledgerhq/types-cryptoassets";
|
|
5
|
+
import { Account } from "@ledgerhq/types-live";
|
|
6
|
+
|
|
7
|
+
export type UseCantonAcceptOrRejectOfferOptions = {
|
|
8
|
+
currency: CryptoCurrency;
|
|
9
|
+
account: Account;
|
|
10
|
+
partyId: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type TransferInstructionParams = {
|
|
14
|
+
contractId: string;
|
|
15
|
+
deviceId: string;
|
|
16
|
+
reason?: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export type TransferInstructionType =
|
|
20
|
+
| "accept-transfer-instruction"
|
|
21
|
+
| "reject-transfer-instruction"
|
|
22
|
+
| "withdraw-transfer-instruction";
|
|
23
|
+
|
|
24
|
+
export function useCantonAcceptOrRejectOffer({
|
|
25
|
+
currency,
|
|
26
|
+
account,
|
|
27
|
+
partyId,
|
|
28
|
+
}: UseCantonAcceptOrRejectOfferOptions) {
|
|
29
|
+
const cantonBridge = getCurrencyBridge(currency) as CantonCurrencyBridge;
|
|
30
|
+
|
|
31
|
+
const transferInstruction = useCallback(
|
|
32
|
+
(
|
|
33
|
+
{ contractId, deviceId, reason }: TransferInstructionParams,
|
|
34
|
+
type: TransferInstructionType,
|
|
35
|
+
) => {
|
|
36
|
+
return cantonBridge.transferInstruction(
|
|
37
|
+
currency,
|
|
38
|
+
deviceId,
|
|
39
|
+
account,
|
|
40
|
+
partyId,
|
|
41
|
+
contractId,
|
|
42
|
+
type,
|
|
43
|
+
reason,
|
|
44
|
+
);
|
|
45
|
+
},
|
|
46
|
+
[cantonBridge, currency, account, partyId],
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
return transferInstruction;
|
|
50
|
+
}
|
|
@@ -768,7 +768,7 @@ exports[`cardano_testnet currency bridge scanAccounts cardano_testnet seed 1 1`]
|
|
|
768
768
|
"spendableBalance": "10097661365",
|
|
769
769
|
"subAccounts": [],
|
|
770
770
|
"swapHistory": [],
|
|
771
|
-
"syncHash": "
|
|
771
|
+
"syncHash": "0xda095fbe",
|
|
772
772
|
"used": true,
|
|
773
773
|
"xpub": "806499588e0c4a58f4119f7e6e096bf42c3f774a528d2acec9e82ceebf87d1ceb3d4f3622dd2c77c65cc89c123f79337db22cf8a69f122e36dab1bf5083bf82d",
|
|
774
774
|
},
|
|
@@ -1417,7 +1417,7 @@ exports[`cardano_testnet currency bridge scanAccounts cardano_testnet seed 1 1`]
|
|
|
1417
1417
|
"spendableBalance": "0",
|
|
1418
1418
|
"subAccounts": [],
|
|
1419
1419
|
"swapHistory": [],
|
|
1420
|
-
"syncHash": "
|
|
1420
|
+
"syncHash": "0xda095fbe",
|
|
1421
1421
|
"used": false,
|
|
1422
1422
|
"xpub": "ed5e0d059cb2eed53ea30b9ba84bb3aaa6c2364c6305a0c9a7e8944aa439884a642cc2f06e601808926e14b6e27417be0b0323d5a5149f1eebab8fc4e1fe14d4",
|
|
1423
1423
|
},
|
|
@@ -12,7 +12,7 @@ exports[`cosmos currency bridge scanAccounts cosmos seed 1 1`] = `
|
|
|
12
12
|
"index": 0,
|
|
13
13
|
"pendingOperations": [],
|
|
14
14
|
"seedIdentifier": "0388459b2653519948b12492f1a0b464720110c147a8155d23d423a5cc3c21d89a",
|
|
15
|
-
"spendableBalance": "
|
|
15
|
+
"spendableBalance": "4656860",
|
|
16
16
|
"swapHistory": [],
|
|
17
17
|
"syncHash": undefined,
|
|
18
18
|
"used": true,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DatasetTest } from "@ledgerhq/types-live";
|
|
2
2
|
import { testBridge } from "../../../__tests__/test-helpers/bridge";
|
|
3
|
-
import "../../../__tests__/test-helpers/setup";
|
|
3
|
+
import "../../../__tests__/test-helpers/setup.integration";
|
|
4
4
|
import axelar from "./axelar";
|
|
5
5
|
import type { Transaction } from "../types";
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DatasetTest } from "@ledgerhq/types-live";
|
|
2
2
|
import { testBridge } from "../../../__tests__/test-helpers/bridge";
|
|
3
|
-
import "../../../__tests__/test-helpers/setup";
|
|
3
|
+
import "../../../__tests__/test-helpers/setup.integration";
|
|
4
4
|
import babylon from "./babylon";
|
|
5
5
|
import type { Transaction } from "../types";
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DatasetTest } from "@ledgerhq/types-live";
|
|
2
2
|
import { testBridge } from "../../../__tests__/test-helpers/bridge";
|
|
3
|
-
import "../../../__tests__/test-helpers/setup";
|
|
3
|
+
import "../../../__tests__/test-helpers/setup.integration";
|
|
4
4
|
import coreum from "./coreum";
|
|
5
5
|
import type { Transaction } from "../types";
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DatasetTest } from "@ledgerhq/types-live";
|
|
2
2
|
import { testBridge } from "../../../__tests__/test-helpers/bridge";
|
|
3
|
-
import "../../../__tests__/test-helpers/setup";
|
|
3
|
+
import "../../../__tests__/test-helpers/setup.integration";
|
|
4
4
|
import cosmos from "./cosmos";
|
|
5
5
|
import type { Transaction } from "../types";
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DatasetTest } from "@ledgerhq/types-live";
|
|
2
2
|
import { testBridge } from "../../../__tests__/test-helpers/bridge";
|
|
3
|
-
import "../../../__tests__/test-helpers/setup";
|
|
3
|
+
import "../../../__tests__/test-helpers/setup.integration";
|
|
4
4
|
import crypto_org from "./cryptoOrg";
|
|
5
5
|
import type { Transaction } from "../types";
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DatasetTest } from "@ledgerhq/types-live";
|
|
2
2
|
import { testBridge } from "../../../__tests__/test-helpers/bridge";
|
|
3
|
-
import "../../../__tests__/test-helpers/setup";
|
|
3
|
+
import "../../../__tests__/test-helpers/setup.integration";
|
|
4
4
|
import desmos from "./desmos";
|
|
5
5
|
import type { Transaction } from "../types";
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DatasetTest } from "@ledgerhq/types-live";
|
|
2
2
|
import { testBridge } from "../../../__tests__/test-helpers/bridge";
|
|
3
|
-
import "../../../__tests__/test-helpers/setup";
|
|
3
|
+
import "../../../__tests__/test-helpers/setup.integration";
|
|
4
4
|
import dydx from "./dydx";
|
|
5
5
|
import type { Transaction } from "../types";
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DatasetTest } from "@ledgerhq/types-live";
|
|
2
2
|
import { testBridge } from "../../../__tests__/test-helpers/bridge";
|
|
3
|
-
import "../../../__tests__/test-helpers/setup";
|
|
3
|
+
import "../../../__tests__/test-helpers/setup.integration";
|
|
4
4
|
import type { Transaction } from "../types";
|
|
5
5
|
import injective from "./injective";
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DatasetTest } from "@ledgerhq/types-live";
|
|
2
2
|
import { testBridge } from "../../../__tests__/test-helpers/bridge";
|
|
3
|
-
import "../../../__tests__/test-helpers/setup";
|
|
3
|
+
import "../../../__tests__/test-helpers/setup.integration";
|
|
4
4
|
import type { Transaction } from "../types";
|
|
5
5
|
import mantra from "./mantra";
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DatasetTest } from "@ledgerhq/types-live";
|
|
2
2
|
import { testBridge } from "../../../__tests__/test-helpers/bridge";
|
|
3
|
-
import "../../../__tests__/test-helpers/setup";
|
|
3
|
+
import "../../../__tests__/test-helpers/setup.integration";
|
|
4
4
|
import onomy from "./onomy";
|
|
5
5
|
import type { Transaction } from "../types";
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DatasetTest } from "@ledgerhq/types-live";
|
|
2
2
|
import { testBridge } from "../../../__tests__/test-helpers/bridge";
|
|
3
|
-
import "../../../__tests__/test-helpers/setup";
|
|
3
|
+
import "../../../__tests__/test-helpers/setup.integration";
|
|
4
4
|
import osmosis from "./osmosis";
|
|
5
5
|
import type { Transaction } from "../types";
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DatasetTest } from "@ledgerhq/types-live";
|
|
2
2
|
import { testBridge } from "../../../__tests__/test-helpers/bridge";
|
|
3
|
-
import "../../../__tests__/test-helpers/setup";
|
|
3
|
+
import "../../../__tests__/test-helpers/setup.integration";
|
|
4
4
|
import persistence from "./persistence";
|
|
5
5
|
import type { Transaction } from "../types";
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DatasetTest } from "@ledgerhq/types-live";
|
|
2
2
|
import { testBridge } from "../../../__tests__/test-helpers/bridge";
|
|
3
|
-
import "../../../__tests__/test-helpers/setup";
|
|
3
|
+
import "../../../__tests__/test-helpers/setup.integration";
|
|
4
4
|
import quicksilver from "./quicksilver";
|
|
5
5
|
import type { Transaction } from "../types";
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DatasetTest } from "@ledgerhq/types-live";
|
|
2
2
|
import { testBridge } from "../../../__tests__/test-helpers/bridge";
|
|
3
|
-
import "../../../__tests__/test-helpers/setup";
|
|
3
|
+
import "../../../__tests__/test-helpers/setup.integration";
|
|
4
4
|
import secretNetwork from "./secretNetwork";
|
|
5
5
|
import type { Transaction } from "../types";
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DatasetTest } from "@ledgerhq/types-live";
|
|
2
2
|
import { testBridge } from "../../../__tests__/test-helpers/bridge";
|
|
3
|
-
import "../../../__tests__/test-helpers/setup";
|
|
3
|
+
import "../../../__tests__/test-helpers/setup.integration";
|
|
4
4
|
import sei_network from "./seiNetwork";
|
|
5
5
|
import type { Transaction } from "../types";
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DatasetTest } from "@ledgerhq/types-live";
|
|
2
2
|
import { testBridge } from "../../../__tests__/test-helpers/bridge";
|
|
3
|
-
import "../../../__tests__/test-helpers/setup";
|
|
3
|
+
import "../../../__tests__/test-helpers/setup.integration";
|
|
4
4
|
import stargaze from "./stargaze";
|
|
5
5
|
import type { Transaction } from "../types";
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DatasetTest } from "@ledgerhq/types-live";
|
|
2
2
|
import { testBridge } from "../../../__tests__/test-helpers/bridge";
|
|
3
|
-
import "../../../__tests__/test-helpers/setup";
|
|
3
|
+
import "../../../__tests__/test-helpers/setup.integration";
|
|
4
4
|
import umee from "./umee";
|
|
5
5
|
import type { Transaction } from "../types";
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DatasetTest } from "@ledgerhq/types-live";
|
|
2
2
|
import { testBridge } from "../../../__tests__/test-helpers/bridge";
|
|
3
|
-
import "../../../__tests__/test-helpers/setup";
|
|
3
|
+
import "../../../__tests__/test-helpers/setup.integration";
|
|
4
4
|
import type { Transaction } from "../types";
|
|
5
5
|
import xion from "./xion";
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DatasetTest } from "@ledgerhq/types-live";
|
|
2
2
|
import { testBridge } from "../../../__tests__/test-helpers/bridge";
|
|
3
|
-
import "../../../__tests__/test-helpers/setup";
|
|
3
|
+
import "../../../__tests__/test-helpers/setup.integration";
|
|
4
4
|
import type { Transaction } from "../types";
|
|
5
5
|
import zenrock from "./zenrock";
|
|
6
6
|
|
|
@@ -20,17 +20,6 @@ import { EvmConfigInfo } from "@ledgerhq/coin-evm/config";
|
|
|
20
20
|
import { type DeviceManagementKit } from "@ledgerhq/device-management-kit";
|
|
21
21
|
import { DmkSignerEth, LegacySignerEth } from "@ledgerhq/live-signer-evm";
|
|
22
22
|
import { EvmSigner } from "@ledgerhq/coin-evm/types/signer";
|
|
23
|
-
import { getCryptoAssetsStore } from "../../bridge/crypto-assets";
|
|
24
|
-
import { LiveConfig } from "@ledgerhq/live-config/LiveConfig";
|
|
25
|
-
import { setShouldSkipTokenLoading } from "@ledgerhq/coin-evm/bridge/preload";
|
|
26
|
-
|
|
27
|
-
try {
|
|
28
|
-
const isCALLazyLoadingEnabled = LiveConfig.getValueByKey("feature_cal_lazy_loading") === "true";
|
|
29
|
-
setShouldSkipTokenLoading(Boolean(isCALLazyLoadingEnabled));
|
|
30
|
-
} catch (error) {
|
|
31
|
-
setShouldSkipTokenLoading(false);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
23
|
const createSigner: CreateSigner<EvmSigner> = (transport: Transport) => {
|
|
35
24
|
if (isDmkTransport(transport)) {
|
|
36
25
|
return new DmkSignerEth(transport.dmk, transport.sessionId);
|
|
@@ -57,7 +46,6 @@ const getCurrencyConfig = (currency: CryptoCurrency) => {
|
|
|
57
46
|
const bridge: Bridge<EvmTransaction> = createBridges(
|
|
58
47
|
executeWithSigner(createSigner),
|
|
59
48
|
getCurrencyConfig,
|
|
60
|
-
getCryptoAssetsStore,
|
|
61
49
|
);
|
|
62
50
|
|
|
63
51
|
const messageSigner = {
|