@ledgerhq/live-common 27.0.0 → 27.0.1-next.0
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__/families/bitcoin/wallet-btc/xpub.syncing.integration.test.js +2 -2
- package/lib/__tests__/test-helpers/environment.d.ts +2 -0
- package/lib/__tests__/test-helpers/environment.d.ts.map +1 -0
- package/lib/__tests__/test-helpers/environment.js +107 -0
- package/lib/__tests__/test-helpers/environment.js.map +1 -0
- package/lib/__tests__/test-helpers/setup.d.ts +1 -1
- package/lib/__tests__/test-helpers/setup.d.ts.map +1 -1
- package/lib/__tests__/test-helpers/setup.js +1 -101
- package/lib/__tests__/test-helpers/setup.js.map +1 -1
- package/lib/account/serialization.d.ts.map +1 -1
- package/lib/account/serialization.js +83 -40
- package/lib/account/serialization.js.map +1 -1
- package/lib/bot/bot-test-context.d.ts +3 -0
- package/lib/bot/bot-test-context.d.ts.map +1 -0
- package/lib/bot/bot-test-context.js +26 -0
- package/lib/bot/bot-test-context.js.map +1 -0
- package/lib/bot/bot-test-context.test.d.ts +2 -0
- package/lib/bot/bot-test-context.test.d.ts.map +1 -0
- package/lib/bot/bot-test-context.test.js +41 -0
- package/lib/bot/bot-test-context.test.js.map +1 -0
- package/lib/bot/cli.d.ts +2 -0
- package/lib/bot/cli.d.ts.map +1 -0
- package/lib/bot/cli.js +14 -0
- package/lib/bot/cli.js.map +1 -0
- package/lib/bot/engine.d.ts +5 -5
- package/lib/bot/engine.d.ts.map +1 -1
- package/lib/bot/engine.js +161 -112
- package/lib/bot/engine.js.map +1 -1
- package/lib/bot/formatters.d.ts +2 -2
- package/lib/bot/formatters.d.ts.map +1 -1
- package/lib/bot/formatters.js +41 -15
- package/lib/bot/formatters.js.map +1 -1
- package/lib/bot/index.d.ts +1 -1
- package/lib/bot/index.d.ts.map +1 -1
- package/lib/bot/index.js +90 -15
- package/lib/bot/index.js.map +1 -1
- package/lib/bot/specs.d.ts +2 -1
- package/lib/bot/specs.d.ts.map +1 -1
- package/lib/bot/specs.js +13 -9
- package/lib/bot/specs.js.map +1 -1
- package/lib/bot/types.d.ts +5 -2
- package/lib/bot/types.d.ts.map +1 -1
- package/lib/countervalues/logic.integration.test.js +65 -0
- package/lib/countervalues/logic.integration.test.js.map +1 -1
- package/lib/countervalues/modules/weth.d.ts.map +1 -1
- package/lib/countervalues/modules/weth.js +5 -10
- package/lib/countervalues/modules/weth.js.map +1 -1
- package/lib/currencies/sortByMarketcap.d.ts +0 -2
- package/lib/currencies/sortByMarketcap.d.ts.map +1 -1
- package/lib/currencies/sortByMarketcap.js +3 -17
- package/lib/currencies/sortByMarketcap.js.map +1 -1
- package/lib/currencies/sortByMarketcap.test.js +0 -5
- package/lib/currencies/sortByMarketcap.test.js.map +1 -1
- package/lib/env.js +1 -1
- package/lib/families/algorand/specs.d.ts.map +1 -1
- package/lib/families/algorand/specs.js +18 -10
- package/lib/families/algorand/specs.js.map +1 -1
- package/lib/families/algorand/speculos-deviceActions.d.ts +1 -4
- package/lib/families/algorand/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/algorand/speculos-deviceActions.js +25 -8
- package/lib/families/algorand/speculos-deviceActions.js.map +1 -1
- package/lib/families/bitcoin/bridge/mock.d.ts.map +1 -1
- package/lib/families/bitcoin/bridge/mock.js +6 -1
- package/lib/families/bitcoin/bridge/mock.js.map +1 -1
- package/lib/families/bitcoin/datasets/bitcoin_cash.d.ts.map +1 -1
- package/lib/families/bitcoin/datasets/bitcoin_cash.js +1 -1
- package/lib/families/bitcoin/datasets/bitcoin_cash.js.map +1 -1
- package/lib/families/bitcoin/datasets/dash.d.ts.map +1 -1
- package/lib/families/bitcoin/datasets/dash.js +1 -1
- package/lib/families/bitcoin/datasets/dash.js.map +1 -1
- package/lib/families/bitcoin/datasets/decred.d.ts.map +1 -1
- package/lib/families/bitcoin/datasets/decred.js +1 -1
- package/lib/families/bitcoin/datasets/decred.js.map +1 -1
- package/lib/families/bitcoin/datasets/digibyte.d.ts.map +1 -1
- package/lib/families/bitcoin/datasets/digibyte.js +8 -2
- package/lib/families/bitcoin/datasets/digibyte.js.map +1 -1
- package/lib/families/bitcoin/datasets/dogecoin.d.ts.map +1 -1
- package/lib/families/bitcoin/datasets/dogecoin.js +1 -1
- package/lib/families/bitcoin/datasets/dogecoin.js.map +1 -1
- package/lib/families/bitcoin/datasets/komodo.js +1 -1
- package/lib/families/bitcoin/datasets/komodo.js.map +1 -1
- package/lib/families/bitcoin/datasets/litecoin.d.ts.map +1 -1
- package/lib/families/bitcoin/datasets/litecoin.js +8 -2
- package/lib/families/bitcoin/datasets/litecoin.js.map +1 -1
- package/lib/families/bitcoin/datasets/peercoin.js +1 -1
- package/lib/families/bitcoin/datasets/peercoin.js.map +1 -1
- package/lib/families/bitcoin/datasets/pivx.js +1 -1
- package/lib/families/bitcoin/datasets/pivx.js.map +1 -1
- package/lib/families/bitcoin/datasets/qtum.js +1 -1
- package/lib/families/bitcoin/datasets/qtum.js.map +1 -1
- package/lib/families/bitcoin/datasets/stakenet.d.ts.map +1 -1
- package/lib/families/bitcoin/datasets/stakenet.js +1 -1
- package/lib/families/bitcoin/datasets/stakenet.js.map +1 -1
- package/lib/families/bitcoin/datasets/vertcoin.d.ts.map +1 -1
- package/lib/families/bitcoin/datasets/vertcoin.js +1 -1
- package/lib/families/bitcoin/datasets/vertcoin.js.map +1 -1
- package/lib/families/bitcoin/datasets/viacoin.d.ts.map +1 -1
- package/lib/families/bitcoin/datasets/viacoin.js +1 -1
- package/lib/families/bitcoin/datasets/viacoin.js.map +1 -1
- package/lib/families/bitcoin/datasets/zcash.d.ts.map +1 -1
- package/lib/families/bitcoin/datasets/zcash.js +1 -1
- package/lib/families/bitcoin/datasets/zcash.js.map +1 -1
- package/lib/families/bitcoin/datasets/zencash.d.ts.map +1 -1
- package/lib/families/bitcoin/datasets/zencash.js +1 -1
- package/lib/families/bitcoin/datasets/zencash.js.map +1 -1
- package/lib/families/bitcoin/platformAdapter.test.d.ts +2 -0
- package/lib/families/bitcoin/platformAdapter.test.d.ts.map +1 -0
- package/lib/families/bitcoin/platformAdapter.test.js +48 -0
- package/lib/families/bitcoin/platformAdapter.test.js.map +1 -0
- package/lib/families/bitcoin/specs.d.ts.map +1 -1
- package/lib/families/bitcoin/specs.js +62 -24
- package/lib/families/bitcoin/specs.js.map +1 -1
- package/lib/families/bitcoin/speculos-deviceActions.d.ts +1 -4
- package/lib/families/bitcoin/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/bitcoin/speculos-deviceActions.js +2 -4
- package/lib/families/bitcoin/speculos-deviceActions.js.map +1 -1
- package/lib/families/cardano/js-estimateMaxSpendable.js +1 -1
- package/lib/families/cardano/js-estimateMaxSpendable.js.map +1 -1
- package/lib/families/cardano/specs.d.ts.map +1 -1
- package/lib/families/cardano/specs.js +19 -8
- package/lib/families/cardano/specs.js.map +1 -1
- package/lib/families/cardano/speculos-deviceActions.d.ts +1 -4
- package/lib/families/cardano/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/cardano/speculos-deviceActions.js +2 -2
- package/lib/families/cardano/speculos-deviceActions.js.map +1 -1
- package/lib/families/celo/specs.d.ts.map +1 -1
- package/lib/families/celo/specs.js +2 -0
- package/lib/families/celo/specs.js.map +1 -1
- package/lib/families/celo/speculos-deviceActions.d.ts +1 -4
- package/lib/families/celo/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/celo/speculos-deviceActions.js +2 -4
- package/lib/families/celo/speculos-deviceActions.js.map +1 -1
- package/lib/families/cosmos/specs.d.ts.map +1 -1
- package/lib/families/cosmos/specs.js +41 -25
- package/lib/families/cosmos/specs.js.map +1 -1
- package/lib/families/cosmos/speculos-deviceActions.d.ts +1 -4
- package/lib/families/cosmos/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/cosmos/speculos-deviceActions.js +2 -4
- package/lib/families/cosmos/speculos-deviceActions.js.map +1 -1
- package/lib/families/crypto_org/specs.d.ts.map +1 -1
- package/lib/families/crypto_org/specs.js +3 -0
- package/lib/families/crypto_org/specs.js.map +1 -1
- package/lib/families/crypto_org/speculos-deviceActions.d.ts +1 -4
- package/lib/families/crypto_org/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/crypto_org/speculos-deviceActions.js +2 -2
- package/lib/families/crypto_org/speculos-deviceActions.js.map +1 -1
- package/lib/families/elrond/specs.d.ts.map +1 -1
- package/lib/families/elrond/specs.js +15 -2
- package/lib/families/elrond/specs.js.map +1 -1
- package/lib/families/elrond/speculos-deviceActions.d.ts +1 -4
- package/lib/families/elrond/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/elrond/speculos-deviceActions.js +2 -4
- package/lib/families/elrond/speculos-deviceActions.js.map +1 -1
- package/lib/families/ethereum/platformAdapter.test.d.ts +2 -0
- package/lib/families/ethereum/platformAdapter.test.d.ts.map +1 -0
- package/lib/families/ethereum/platformAdapter.test.js +88 -0
- package/lib/families/ethereum/platformAdapter.test.js.map +1 -0
- package/lib/families/ethereum/specs.d.ts.map +1 -1
- package/lib/families/ethereum/specs.js +36 -12
- package/lib/families/ethereum/specs.js.map +1 -1
- package/lib/families/ethereum/speculos-deviceActions.d.ts +1 -4
- package/lib/families/ethereum/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/ethereum/speculos-deviceActions.js +2 -4
- package/lib/families/ethereum/speculos-deviceActions.js.map +1 -1
- package/lib/families/filecoin/specs.d.ts.map +1 -1
- package/lib/families/filecoin/specs.js +2 -0
- package/lib/families/filecoin/specs.js.map +1 -1
- package/lib/families/filecoin/speculos-deviceActions.d.ts +1 -4
- package/lib/families/filecoin/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/filecoin/speculos-deviceActions.js +2 -2
- package/lib/families/filecoin/speculos-deviceActions.js.map +1 -1
- package/lib/families/hedera/specs.d.ts.map +1 -1
- package/lib/families/hedera/specs.js +11 -3
- package/lib/families/hedera/specs.js.map +1 -1
- package/lib/families/hedera/speculos-deviceActions.d.ts +1 -4
- package/lib/families/hedera/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/hedera/speculos-deviceActions.js +4 -4
- package/lib/families/hedera/speculos-deviceActions.js.map +1 -1
- package/lib/families/osmosis/specs.d.ts.map +1 -1
- package/lib/families/osmosis/specs.js +13 -5
- package/lib/families/osmosis/specs.js.map +1 -1
- package/lib/families/osmosis/speculos-deviceActions.d.ts +1 -4
- package/lib/families/osmosis/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/osmosis/speculos-deviceActions.js +2 -4
- package/lib/families/osmosis/speculos-deviceActions.js.map +1 -1
- package/lib/families/polkadot/platformAdapter.test.d.ts +2 -0
- package/lib/families/polkadot/platformAdapter.test.d.ts.map +1 -0
- package/lib/families/polkadot/platformAdapter.test.js +51 -0
- package/lib/families/polkadot/platformAdapter.test.js.map +1 -0
- package/lib/families/polkadot/specs.d.ts.map +1 -1
- package/lib/families/polkadot/specs.js +12 -1
- package/lib/families/polkadot/specs.js.map +1 -1
- package/lib/families/polkadot/speculos-deviceActions.d.ts +1 -4
- package/lib/families/polkadot/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/polkadot/speculos-deviceActions.js +2 -4
- package/lib/families/polkadot/speculos-deviceActions.js.map +1 -1
- package/lib/families/ripple/platformAdapter.test.d.ts +2 -0
- package/lib/families/ripple/platformAdapter.test.d.ts.map +1 -0
- package/lib/families/ripple/platformAdapter.test.js +51 -0
- package/lib/families/ripple/platformAdapter.test.js.map +1 -0
- package/lib/families/ripple/specs.d.ts.map +1 -1
- package/lib/families/ripple/specs.js +9 -4
- package/lib/families/ripple/specs.js.map +1 -1
- package/lib/families/ripple/speculos-deviceActions.d.ts +1 -4
- package/lib/families/ripple/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/ripple/speculos-deviceActions.js +2 -4
- package/lib/families/ripple/speculos-deviceActions.js.map +1 -1
- package/lib/families/solana/specs.d.ts.map +1 -1
- package/lib/families/solana/specs.js +29 -11
- package/lib/families/solana/specs.js.map +1 -1
- package/lib/families/solana/speculos-deviceActions.d.ts +0 -5
- package/lib/families/solana/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/solana/speculos-deviceActions.js +0 -4
- package/lib/families/solana/speculos-deviceActions.js.map +1 -1
- package/lib/families/stellar/api/horizon.d.ts.map +1 -1
- package/lib/families/stellar/api/horizon.js +15 -10
- package/lib/families/stellar/api/horizon.js.map +1 -1
- package/lib/families/stellar/specs.d.ts.map +1 -1
- package/lib/families/stellar/specs.js +30 -12
- package/lib/families/stellar/specs.js.map +1 -1
- package/lib/families/stellar/speculos-deviceActions.d.ts +1 -4
- package/lib/families/stellar/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/stellar/speculos-deviceActions.js +2 -4
- package/lib/families/stellar/speculos-deviceActions.js.map +1 -1
- package/lib/families/tezos/bakers.whitelist-default.d.ts.map +1 -1
- package/lib/families/tezos/bakers.whitelist-default.js +1 -1
- package/lib/families/tezos/bakers.whitelist-default.js.map +1 -1
- package/lib/families/tezos/specs.d.ts.map +1 -1
- package/lib/families/tezos/specs.js +2 -0
- package/lib/families/tezos/specs.js.map +1 -1
- package/lib/families/tezos/speculos-deviceActions.d.ts +1 -4
- package/lib/families/tezos/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/tezos/speculos-deviceActions.js +2 -2
- package/lib/families/tezos/speculos-deviceActions.js.map +1 -1
- package/lib/families/tron/specs.d.ts.map +1 -1
- package/lib/families/tron/specs.js +49 -17
- package/lib/families/tron/specs.js.map +1 -1
- package/lib/families/tron/speculos-deviceActions.d.ts +1 -4
- package/lib/families/tron/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/tron/speculos-deviceActions.js +2 -4
- package/lib/families/tron/speculos-deviceActions.js.map +1 -1
- package/lib/hw/getGenuineCheckFromDeviceId.d.ts +22 -0
- package/lib/hw/getGenuineCheckFromDeviceId.d.ts.map +1 -0
- package/lib/hw/getGenuineCheckFromDeviceId.js +49 -0
- package/lib/hw/getGenuineCheckFromDeviceId.js.map +1 -0
- package/lib/hw/getGenuineCheckFromDeviceId.test.d.ts +2 -0
- package/lib/hw/getGenuineCheckFromDeviceId.test.d.ts.map +1 -0
- package/lib/hw/getGenuineCheckFromDeviceId.test.js +84 -0
- package/lib/hw/getGenuineCheckFromDeviceId.test.js.map +1 -0
- package/lib/hw/getLatestAvailableFirmwareFromDeviceId.d.ts +17 -0
- package/lib/hw/getLatestAvailableFirmwareFromDeviceId.d.ts.map +1 -0
- package/lib/hw/getLatestAvailableFirmwareFromDeviceId.js +27 -0
- package/lib/hw/getLatestAvailableFirmwareFromDeviceId.js.map +1 -0
- package/lib/hw/hooks/useGenuineCheck.d.ts +34 -0
- package/lib/hw/hooks/useGenuineCheck.d.ts.map +1 -0
- package/lib/hw/hooks/useGenuineCheck.js +115 -0
- package/lib/hw/hooks/useGenuineCheck.js.map +1 -0
- package/lib/hw/hooks/useGenuineCheck.test.d.ts +2 -0
- package/lib/hw/hooks/useGenuineCheck.test.d.ts.map +1 -0
- package/lib/hw/hooks/useGenuineCheck.test.js +316 -0
- package/lib/hw/hooks/useGenuineCheck.test.js.map +1 -0
- package/lib/hw/hooks/useGetLatestAvailableFirmware.d.ts +29 -0
- package/lib/hw/hooks/useGetLatestAvailableFirmware.d.ts.map +1 -0
- package/lib/hw/hooks/useGetLatestAvailableFirmware.js +72 -0
- package/lib/hw/hooks/useGetLatestAvailableFirmware.js.map +1 -0
- package/lib/hw/hooks/useGetLatestAvailableFirmware.test.d.ts +2 -0
- package/lib/hw/hooks/useGetLatestAvailableFirmware.test.d.ts.map +1 -0
- package/lib/hw/hooks/useGetLatestAvailableFirmware.test.js +155 -0
- package/lib/hw/hooks/useGetLatestAvailableFirmware.test.js.map +1 -0
- package/lib/load/speculos.d.ts +1 -0
- package/lib/load/speculos.d.ts.map +1 -1
- package/lib/load/speculos.js +2 -1
- package/lib/load/speculos.js.map +1 -1
- package/lib/mock/fixtures/cryptoCurrencies.d.ts +5 -0
- package/lib/mock/fixtures/cryptoCurrencies.d.ts.map +1 -0
- package/lib/mock/fixtures/cryptoCurrencies.js +91 -0
- package/lib/mock/fixtures/cryptoCurrencies.js.map +1 -0
- package/lib/platform/converters.test.js +44 -218
- package/lib/platform/converters.test.js.map +1 -1
- package/lib/platform/logic.d.ts +44 -0
- package/lib/platform/logic.d.ts.map +1 -1
- package/lib/platform/logic.js +147 -1
- package/lib/platform/logic.js.map +1 -1
- package/lib/platform/logic.test.d.ts +2 -0
- package/lib/platform/logic.test.d.ts.map +1 -0
- package/lib/platform/logic.test.js +903 -0
- package/lib/platform/logic.test.js.map +1 -0
- package/lib/platform/react.d.ts +6 -0
- package/lib/platform/react.d.ts.map +1 -1
- package/lib/platform/react.js +6 -0
- package/lib/platform/react.js.map +1 -1
- package/lib/platform/tracking.d.ts +1 -1
- package/lib/platform/tracking.d.ts.map +1 -1
- package/lib/platform/tracking.test.js +14 -41
- package/lib/platform/tracking.test.js.map +1 -1
- package/lib/reconciliation.d.ts.map +1 -1
- package/lib/reconciliation.js +28 -10
- package/lib/reconciliation.js.map +1 -1
- package/package.json +5 -6
- package/src/__tests__/families/bitcoin/wallet-btc/xpub.syncing.integration.test.ts +2 -2
- package/src/__tests__/test-helpers/environment.ts +91 -0
- package/src/__tests__/test-helpers/setup.ts +2 -91
- package/src/account/serialization.ts +103 -64
- package/src/bot/bot-test-context.test.ts +37 -0
- package/src/bot/bot-test-context.ts +24 -0
- package/src/bot/cli.ts +18 -0
- package/src/bot/engine.ts +109 -73
- package/src/bot/formatters.ts +40 -14
- package/src/bot/index.ts +124 -18
- package/src/bot/specs.ts +10 -5
- package/src/bot/types.ts +7 -3
- package/src/countervalues/logic.integration.test.ts +50 -0
- package/src/countervalues/modules/weth.ts +9 -12
- package/src/currencies/__snapshots__/sortByMarketcap.test.ts.snap +59 -1
- package/src/currencies/sortByMarketcap.test.ts +1 -12
- package/src/currencies/sortByMarketcap.ts +2 -22
- package/src/env.ts +1 -1
- package/src/families/algorand/__snapshots__/bridge.integration.test.ts.snap +733 -8
- package/src/families/algorand/specs.ts +26 -16
- package/src/families/algorand/speculos-deviceActions.ts +31 -10
- package/src/families/bitcoin/__snapshots__/bridge.integration.test.ts.snap +43309 -7957
- package/src/families/bitcoin/bridge/mock.ts +7 -1
- package/src/families/bitcoin/datasets/bitcoin_cash.ts +73 -13
- package/src/families/bitcoin/datasets/dash.ts +29 -17
- package/src/families/bitcoin/datasets/decred.ts +42 -12
- package/src/families/bitcoin/datasets/digibyte.ts +9 -3
- package/src/families/bitcoin/datasets/dogecoin.ts +29 -17
- package/src/families/bitcoin/datasets/komodo.ts +22 -22
- package/src/families/bitcoin/datasets/litecoin.ts +9 -3
- package/src/families/bitcoin/datasets/peercoin.ts +17 -17
- package/src/families/bitcoin/datasets/pivx.ts +17 -17
- package/src/families/bitcoin/datasets/qtum.ts +40 -40
- package/src/families/bitcoin/datasets/stakenet.ts +56 -26
- package/src/families/bitcoin/datasets/vertcoin.ts +43 -55
- package/src/families/bitcoin/datasets/viacoin.ts +35 -23
- package/src/families/bitcoin/datasets/zcash.ts +78 -12
- package/src/families/bitcoin/datasets/zencash.ts +56 -10
- package/src/families/bitcoin/platformAdapter.test.ts +58 -0
- package/src/families/bitcoin/specs.ts +81 -41
- package/src/families/bitcoin/speculos-deviceActions.ts +68 -69
- package/src/families/cardano/js-estimateMaxSpendable.ts +1 -1
- package/src/families/cardano/specs.ts +28 -11
- package/src/families/cardano/speculos-deviceActions.ts +65 -66
- package/src/families/celo/specs.ts +2 -0
- package/src/families/celo/speculos-deviceActions.ts +42 -43
- package/src/families/cosmos/__snapshots__/bridge.integration.test.ts.snap +246 -5
- package/src/families/cosmos/specs.ts +44 -28
- package/src/families/cosmos/speculos-deviceActions.ts +82 -83
- package/src/families/crypto_org/specs.ts +3 -0
- package/src/families/crypto_org/speculos-deviceActions.ts +58 -59
- package/src/families/elrond/specs.ts +21 -4
- package/src/families/elrond/speculos-deviceActions.ts +41 -42
- package/src/families/ethereum/__snapshots__/bridge.integration.test.ts.snap +90 -90
- package/src/families/ethereum/platformAdapter.test.ts +112 -0
- package/src/families/ethereum/specs.ts +47 -23
- package/src/families/ethereum/speculos-deviceActions.ts +93 -95
- package/src/families/filecoin/specs.ts +2 -1
- package/src/families/filecoin/speculos-deviceActions.ts +61 -62
- package/src/families/hedera/__snapshots__/bridge.integration.test.ts.snap +57 -2
- package/src/families/hedera/specs.ts +13 -5
- package/src/families/hedera/speculos-deviceActions.ts +59 -60
- package/src/families/osmosis/specs.ts +15 -7
- package/src/families/osmosis/speculos-deviceActions.ts +82 -83
- package/src/families/polkadot/platformAdapter.test.ts +61 -0
- package/src/families/polkadot/specs.ts +20 -2
- package/src/families/polkadot/speculos-deviceActions.ts +83 -82
- package/src/families/ripple/platformAdapter.test.ts +54 -0
- package/src/families/ripple/specs.ts +14 -7
- package/src/families/ripple/speculos-deviceActions.ts +72 -73
- package/src/families/solana/specs.ts +33 -14
- package/src/families/solana/speculos-deviceActions.ts +0 -5
- package/src/families/stellar/api/horizon.ts +10 -6
- package/src/families/stellar/specs.ts +37 -19
- package/src/families/stellar/speculos-deviceActions.ts +85 -87
- package/src/families/tezos/bakers.whitelist-default.ts +0 -1
- package/src/families/tezos/specs.ts +2 -0
- package/src/families/tezos/speculos-deviceActions.ts +76 -77
- package/src/families/tron/specs.ts +67 -30
- package/src/families/tron/speculos-deviceActions.ts +81 -84
- package/src/hw/getGenuineCheckFromDeviceId.test.ts +98 -0
- package/src/hw/getGenuineCheckFromDeviceId.ts +61 -0
- package/src/hw/getLatestAvailableFirmwareFromDeviceId.ts +37 -0
- package/src/hw/hooks/useGenuineCheck.test.ts +232 -0
- package/src/hw/hooks/useGenuineCheck.ts +138 -0
- package/src/hw/hooks/useGetLatestAvailableFirmware.test.ts +111 -0
- package/src/hw/hooks/useGetLatestAvailableFirmware.ts +90 -0
- package/src/load/speculos.ts +2 -0
- package/src/mock/fixtures/cryptoCurrencies.ts +88 -0
- package/src/platform/converters.test.ts +49 -282
- package/src/platform/logic.test.ts +756 -0
- package/src/platform/logic.ts +285 -0
- package/src/platform/react.ts +6 -0
- package/src/platform/tracking.test.ts +6 -7
- package/src/platform/tracking.ts +1 -1
- package/src/reconciliation.ts +66 -43
- package/lib/bot/test.bot.d.ts +0 -2
- package/lib/bot/test.bot.d.ts.map +0 -1
- package/lib/bot/test.bot.js +0 -62
- package/lib/bot/test.bot.js.map +0 -1
- package/lib/generated/speculos-deviceActions.d.ts +0 -56
- package/lib/generated/speculos-deviceActions.d.ts.map +0 -1
- package/lib/generated/speculos-deviceActions.js +0 -42
- package/lib/generated/speculos-deviceActions.js.map +0 -1
- package/src/bot/test.bot.ts +0 -21
- package/src/generated/speculos-deviceActions.ts +0 -37
|
@@ -987,6 +987,7 @@ Array [
|
|
|
987
987
|
"ethereum/erc20/global_coin_research",
|
|
988
988
|
"ethereum/erc20/bitstash",
|
|
989
989
|
"ethereum/erc20/joint",
|
|
990
|
+
"polygon/erc20/enegra",
|
|
990
991
|
"ethereum/erc20/cyberfm_radio",
|
|
991
992
|
"ethereum/erc20/bonuscloud_token",
|
|
992
993
|
"ethereum/erc20/connectjob",
|
|
@@ -1410,6 +1411,7 @@ Array [
|
|
|
1410
1411
|
"ethereum/erc20/[fct]_firmachain_token",
|
|
1411
1412
|
"ethereum/erc20/_injective_protocol",
|
|
1412
1413
|
"ethereum/erc20/a2dao_token",
|
|
1414
|
+
"ethereum/erc20/a_hunters_dream",
|
|
1413
1415
|
"ethereum/erc20/aave",
|
|
1414
1416
|
"ethereum/erc20/aave_amm_market_dai",
|
|
1415
1417
|
"ethereum/erc20/aave_amm_market_usdc",
|
|
@@ -1427,7 +1429,6 @@ Array [
|
|
|
1427
1429
|
"ethereum/erc20/aave_interest_bearing_gusd_v2",
|
|
1428
1430
|
"ethereum/erc20/aave_interest_bearing_knc",
|
|
1429
1431
|
"ethereum/erc20/aave_interest_bearing_knc_v2",
|
|
1430
|
-
"ethereum/erc20/aave_interest_bearing_link",
|
|
1431
1432
|
"ethereum/erc20/aave_interest_bearing_link_v2",
|
|
1432
1433
|
"ethereum/erc20/aave_interest_bearing_mana_v2",
|
|
1433
1434
|
"ethereum/erc20/aave_interest_bearing_mkr_v2",
|
|
@@ -1621,10 +1622,12 @@ Array [
|
|
|
1621
1622
|
"ethereum/erc20/art_blocks_curated_fidenza_855",
|
|
1622
1623
|
"ethereum/erc20/art_blocks_curated_full_set",
|
|
1623
1624
|
"ethereum/erc20/arteon",
|
|
1625
|
+
"ethereum/erc20/artificial_liquid_intelligence_token",
|
|
1624
1626
|
"ethereum/erc20/artista",
|
|
1625
1627
|
"ethereum/erc20/artm",
|
|
1626
1628
|
"ethereum/erc20/artwook_coin",
|
|
1627
1629
|
"ethereum/erc20/artx_token",
|
|
1630
|
+
"ethereum/erc20/arweave",
|
|
1628
1631
|
"ethereum/erc20/arx",
|
|
1629
1632
|
"ethereum/erc20/asec",
|
|
1630
1633
|
"ethereum/erc20/askobar_network",
|
|
@@ -1794,6 +1797,7 @@ Array [
|
|
|
1794
1797
|
"ethereum/erc20/bf_token",
|
|
1795
1798
|
"ethereum/erc20/bgt",
|
|
1796
1799
|
"ethereum/erc20/bhpcash",
|
|
1800
|
+
"ethereum/erc20/biconomy_token",
|
|
1797
1801
|
"ethereum/erc20/bidao",
|
|
1798
1802
|
"ethereum/erc20/bigcash",
|
|
1799
1803
|
"ethereum/erc20/bigocoin",
|
|
@@ -1887,6 +1891,7 @@ Array [
|
|
|
1887
1891
|
"ethereum/erc20/block_array",
|
|
1888
1892
|
"ethereum/erc20/block_duelers",
|
|
1889
1893
|
"ethereum/erc20/blockbank",
|
|
1894
|
+
"ethereum/erc20/blockcert",
|
|
1890
1895
|
"ethereum/erc20/blockchain_cuties_universe_governance_token",
|
|
1891
1896
|
"ethereum/erc20/blockchain_io",
|
|
1892
1897
|
"ethereum/erc20/blockchain_token_2_0",
|
|
@@ -1914,6 +1919,7 @@ Array [
|
|
|
1914
1919
|
"ethereum/erc20/bns_token",
|
|
1915
1920
|
"ethereum/erc20/bnt_smart_token_relay",
|
|
1916
1921
|
"ethereum/erc20/boa",
|
|
1922
|
+
"ethereum/erc20/bobc",
|
|
1917
1923
|
"ethereum/erc20/bobo_cash",
|
|
1918
1924
|
"ethereum/erc20/boldman",
|
|
1919
1925
|
"ethereum/erc20/bond",
|
|
@@ -2122,6 +2128,7 @@ Array [
|
|
|
2122
2128
|
"ethereum/erc20/classie",
|
|
2123
2129
|
"ethereum/erc20/claymore",
|
|
2124
2130
|
"ethereum/erc20/clearinghouse_token",
|
|
2131
|
+
"ethereum/erc20/clearpool",
|
|
2125
2132
|
"ethereum/erc20/clever",
|
|
2126
2133
|
"ethereum/erc20/clientelecoin",
|
|
2127
2134
|
"ethereum/erc20/climatecoin",
|
|
@@ -2153,6 +2160,7 @@ Array [
|
|
|
2153
2160
|
"ethereum/erc20/coin_merge",
|
|
2154
2161
|
"ethereum/erc20/coin_utility_token",
|
|
2155
2162
|
"ethereum/erc20/coinanalyst",
|
|
2163
|
+
"ethereum/erc20/coinbase_wrapped_staked_eth",
|
|
2156
2164
|
"ethereum/erc20/coinbene_future_token",
|
|
2157
2165
|
"ethereum/erc20/coincrowd",
|
|
2158
2166
|
"ethereum/erc20/coinloan",
|
|
@@ -2225,6 +2233,7 @@ Array [
|
|
|
2225
2233
|
"ethereum/erc20/cornichon",
|
|
2226
2234
|
"ethereum/erc20/corra",
|
|
2227
2235
|
"ethereum/erc20/coshi_inu",
|
|
2236
|
+
"ethereum/erc20/cosplaytoken_",
|
|
2228
2237
|
"ethereum/erc20/coss",
|
|
2229
2238
|
"ethereum/erc20/coss_token",
|
|
2230
2239
|
"ethereum/erc20/cost_coin",
|
|
@@ -2392,6 +2401,7 @@ Array [
|
|
|
2392
2401
|
"ethereum/erc20/decentral_games",
|
|
2393
2402
|
"ethereum/erc20/decentralizecurrency",
|
|
2394
2403
|
"ethereum/erc20/decentralized_insurance_protocol",
|
|
2404
|
+
"ethereum/erc20/decentraweb",
|
|
2395
2405
|
"ethereum/erc20/decenturion_token",
|
|
2396
2406
|
"ethereum/erc20/decurian",
|
|
2397
2407
|
"ethereum/erc20/deeper_network",
|
|
@@ -2433,6 +2443,7 @@ Array [
|
|
|
2433
2443
|
"ethereum/erc20/degrain",
|
|
2434
2444
|
"ethereum/erc20/dehive_finance",
|
|
2435
2445
|
"ethereum/erc20/deipool",
|
|
2446
|
+
"ethereum/erc20/dejitaru_tsuka",
|
|
2436
2447
|
"ethereum/erc20/delphi_tech_token",
|
|
2437
2448
|
"ethereum/erc20/delta_exchange_token",
|
|
2438
2449
|
"ethereum/erc20/delta_financial",
|
|
@@ -2670,6 +2681,7 @@ Array [
|
|
|
2670
2681
|
"ethereum/erc20/energysculpture",
|
|
2671
2682
|
"ethereum/erc20/enex_space",
|
|
2672
2683
|
"ethereum/erc20/engagementtoken",
|
|
2684
|
+
"ethereum/erc20/enjinstarter",
|
|
2673
2685
|
"ethereum/erc20/enkronostoken",
|
|
2674
2686
|
"ethereum/erc20/enreachdao",
|
|
2675
2687
|
"ethereum/erc20/entanmo",
|
|
@@ -3112,6 +3124,7 @@ Array [
|
|
|
3112
3124
|
"ethereum/erc20/gtc_token",
|
|
3113
3125
|
"ethereum/erc20/gtkt",
|
|
3114
3126
|
"ethereum/erc20/guarded_ether",
|
|
3127
|
+
"ethereum/erc20/guarded_ether_old",
|
|
3115
3128
|
"ethereum/erc20/guild_of_guardians",
|
|
3116
3129
|
"ethereum/erc20/guld_erc20",
|
|
3117
3130
|
"ethereum/erc20/gunthy",
|
|
@@ -3280,6 +3293,7 @@ Array [
|
|
|
3280
3293
|
"ethereum/erc20/inari",
|
|
3281
3294
|
"ethereum/erc20/inbit_token",
|
|
3282
3295
|
"ethereum/erc20/index",
|
|
3296
|
+
"ethereum/erc20/inferno",
|
|
3283
3297
|
"ethereum/erc20/infi",
|
|
3284
3298
|
"ethereum/erc20/infinito_token",
|
|
3285
3299
|
"ethereum/erc20/infinity_pad_token",
|
|
@@ -3463,6 +3477,7 @@ Array [
|
|
|
3463
3477
|
"ethereum/erc20/labs_group",
|
|
3464
3478
|
"ethereum/erc20/lady_luck",
|
|
3465
3479
|
"ethereum/erc20/ladz",
|
|
3480
|
+
"ethereum/erc20/laika",
|
|
3466
3481
|
"ethereum/erc20/laikaprotocol",
|
|
3467
3482
|
"ethereum/erc20/lance_coin",
|
|
3468
3483
|
"ethereum/erc20/lancer_token",
|
|
@@ -3560,6 +3575,7 @@ Array [
|
|
|
3560
3575
|
"ethereum/erc20/luckstartoken",
|
|
3561
3576
|
"ethereum/erc20/lucky",
|
|
3562
3577
|
"ethereum/erc20/lucky_maneki",
|
|
3578
|
+
"ethereum/erc20/luckyblock",
|
|
3563
3579
|
"ethereum/erc20/luckyseventoken",
|
|
3564
3580
|
"ethereum/erc20/ludena_protocol",
|
|
3565
3581
|
"ethereum/erc20/ludos_protocol",
|
|
@@ -3652,6 +3668,7 @@ Array [
|
|
|
3652
3668
|
"ethereum/erc20/meridian_network",
|
|
3653
3669
|
"ethereum/erc20/merit_circle",
|
|
3654
3670
|
"ethereum/erc20/meshbox",
|
|
3671
|
+
"ethereum/erc20/messier",
|
|
3655
3672
|
"ethereum/erc20/meta",
|
|
3656
3673
|
"ethereum/erc20/meta_bots",
|
|
3657
3674
|
"ethereum/erc20/meta_network",
|
|
@@ -3962,6 +3979,7 @@ Array [
|
|
|
3962
3979
|
"ethereum/erc20/orica",
|
|
3963
3980
|
"ethereum/erc20/orient",
|
|
3964
3981
|
"ethereum/erc20/orientum_plus",
|
|
3982
|
+
"ethereum/erc20/origin_dollar",
|
|
3965
3983
|
"ethereum/erc20/orion_protocol",
|
|
3966
3984
|
"ethereum/erc20/orium",
|
|
3967
3985
|
"ethereum/erc20/ormecash",
|
|
@@ -4191,6 +4209,7 @@ Array [
|
|
|
4191
4209
|
"ethereum/erc20/proxy",
|
|
4192
4210
|
"ethereum/erc20/prsp",
|
|
4193
4211
|
"ethereum/erc20/prtn_project",
|
|
4212
|
+
"ethereum/erc20/pstake_finance",
|
|
4194
4213
|
"ethereum/erc20/psyche",
|
|
4195
4214
|
"ethereum/erc20/pteria",
|
|
4196
4215
|
"ethereum/erc20/ptokens_ltc",
|
|
@@ -4510,6 +4529,7 @@ Array [
|
|
|
4510
4529
|
"ethereum/erc20/shih_tzu",
|
|
4511
4530
|
"ethereum/erc20/shikokuaido",
|
|
4512
4531
|
"ethereum/erc20/shill",
|
|
4532
|
+
"ethereum/erc20/shina_inu",
|
|
4513
4533
|
"ethereum/erc20/shinchan_token",
|
|
4514
4534
|
"ethereum/erc20/shincoin",
|
|
4515
4535
|
"ethereum/erc20/shinigami_inu",
|
|
@@ -4626,6 +4646,7 @@ Array [
|
|
|
4626
4646
|
"ethereum/erc20/spell_token",
|
|
4627
4647
|
"ethereum/erc20/spenderx",
|
|
4628
4648
|
"ethereum/erc20/sperax",
|
|
4649
|
+
"ethereum/erc20/sperax_",
|
|
4629
4650
|
"ethereum/erc20/spherium_token",
|
|
4630
4651
|
"ethereum/erc20/spheroid",
|
|
4631
4652
|
"ethereum/erc20/spice",
|
|
@@ -4677,6 +4698,7 @@ Array [
|
|
|
4677
4698
|
"ethereum/erc20/starblock",
|
|
4678
4699
|
"ethereum/erc20/starbugs_mystic_axie",
|
|
4679
4700
|
"ethereum/erc20/starcurve",
|
|
4701
|
+
"ethereum/erc20/stargatetoken",
|
|
4680
4702
|
"ethereum/erc20/stargazeprotocol_com",
|
|
4681
4703
|
"ethereum/erc20/stark_chain",
|
|
4682
4704
|
"ethereum/erc20/starlink",
|
|
@@ -4835,6 +4857,7 @@ Array [
|
|
|
4835
4857
|
"ethereum/erc20/talent_coin",
|
|
4836
4858
|
"ethereum/erc20/talkado",
|
|
4837
4859
|
"ethereum/erc20/tama_egg_niftygotchi",
|
|
4860
|
+
"ethereum/erc20/tamadoge",
|
|
4838
4861
|
"ethereum/erc20/tamy_token",
|
|
4839
4862
|
"ethereum/erc20/tangguotao_token",
|
|
4840
4863
|
"ethereum/erc20/tapcoin",
|
|
@@ -4878,6 +4901,7 @@ Array [
|
|
|
4878
4901
|
"ethereum/erc20/tessla",
|
|
4879
4902
|
"ethereum/erc20/thaler",
|
|
4880
4903
|
"ethereum/erc20/the_4th_pillar_token",
|
|
4904
|
+
"ethereum/erc20/the_ancient_order",
|
|
4881
4905
|
"ethereum/erc20/the_beeple_collection",
|
|
4882
4906
|
"ethereum/erc20/the_bitcoin_family",
|
|
4883
4907
|
"ethereum/erc20/the_bridge",
|
|
@@ -5050,6 +5074,7 @@ Array [
|
|
|
5050
5074
|
"ethereum/erc20/umbrella",
|
|
5051
5075
|
"ethereum/erc20/umbrellacoin",
|
|
5052
5076
|
"ethereum/erc20/umbriatoken",
|
|
5077
|
+
"ethereum/erc20/umee",
|
|
5053
5078
|
"ethereum/erc20/umitoken",
|
|
5054
5079
|
"ethereum/erc20/umka",
|
|
5055
5080
|
"ethereum/erc20/unagii_dai_stablecoin",
|
|
@@ -5174,6 +5199,7 @@ Array [
|
|
|
5174
5199
|
"ethereum/erc20/vempire_gamer_token",
|
|
5175
5200
|
"ethereum/erc20/vendit_token",
|
|
5176
5201
|
"ethereum/erc20/venus",
|
|
5202
|
+
"ethereum/erc20/veogv",
|
|
5177
5203
|
"ethereum/erc20/veros_",
|
|
5178
5204
|
"ethereum/erc20/verox",
|
|
5179
5205
|
"ethereum/erc20/versicoin",
|
|
@@ -5229,6 +5255,7 @@ Array [
|
|
|
5229
5255
|
"ethereum/erc20/w3bpush",
|
|
5230
5256
|
"ethereum/erc20/wadzpay_old",
|
|
5231
5257
|
"ethereum/erc20/wadzpay_token",
|
|
5258
|
+
"ethereum/erc20/wagmi_games",
|
|
5232
5259
|
"ethereum/erc20/waifu",
|
|
5233
5260
|
"ethereum/erc20/waifu_nft_collection",
|
|
5234
5261
|
"ethereum/erc20/waifusion",
|
|
@@ -5283,6 +5310,7 @@ Array [
|
|
|
5283
5310
|
"ethereum/erc20/wolk_token",
|
|
5284
5311
|
"ethereum/erc20/wolverinu",
|
|
5285
5312
|
"ethereum/erc20/wolves_of_wall_street",
|
|
5313
|
+
"ethereum/erc20/wombat",
|
|
5286
5314
|
"ethereum/erc20/woofy",
|
|
5287
5315
|
"ethereum/erc20/woonk",
|
|
5288
5316
|
"ethereum/erc20/woonkly",
|
|
@@ -5336,6 +5364,7 @@ Array [
|
|
|
5336
5364
|
"ethereum/erc20/wrapped_ncg",
|
|
5337
5365
|
"ethereum/erc20/wrapped_omi_token",
|
|
5338
5366
|
"ethereum/erc20/wrapped_origin_axie",
|
|
5367
|
+
"ethereum/erc20/wrapped_ousd",
|
|
5339
5368
|
"ethereum/erc20/wrapped_prcy",
|
|
5340
5369
|
"ethereum/erc20/wrapped_scrt",
|
|
5341
5370
|
"ethereum/erc20/wrapped_shift",
|
|
@@ -5578,6 +5607,12 @@ Array [
|
|
|
5578
5607
|
"ethereum/erc20/zyxtoken",
|
|
5579
5608
|
"ethereum/erc20/zzz_finance",
|
|
5580
5609
|
"ethereum/erc20/zzz_v2",
|
|
5610
|
+
"ethereum_goerli/erc20/chainlink_token",
|
|
5611
|
+
"ethereum_goerli/erc20/dai_stablecoin",
|
|
5612
|
+
"ethereum_goerli/erc20/faucettoken",
|
|
5613
|
+
"ethereum_goerli/erc20/mock_usdc",
|
|
5614
|
+
"ethereum_goerli/erc20/usdc",
|
|
5615
|
+
"ethereum_goerli/erc20/wrapped_ether",
|
|
5581
5616
|
"ethereum_ropsten/erc20/17_small_electric_chairs",
|
|
5582
5617
|
"ethereum_ropsten/erc20/_plasma",
|
|
5583
5618
|
"ethereum_ropsten/erc20/compound",
|
|
@@ -5613,6 +5648,7 @@ Array [
|
|
|
5613
5648
|
"polygon/erc20/abachi",
|
|
5614
5649
|
"polygon/erc20/adamant",
|
|
5615
5650
|
"polygon/erc20/adept_camp_doge_coin",
|
|
5651
|
+
"polygon/erc20/affyn",
|
|
5616
5652
|
"polygon/erc20/ageur",
|
|
5617
5653
|
"polygon/erc20/aioz_network",
|
|
5618
5654
|
"polygon/erc20/algebra",
|
|
@@ -5717,6 +5753,7 @@ Array [
|
|
|
5717
5753
|
"polygon/erc20/fusion",
|
|
5718
5754
|
"polygon/erc20/gains_network",
|
|
5719
5755
|
"polygon/erc20/gemini_dollar",
|
|
5756
|
+
"polygon/erc20/geniux",
|
|
5720
5757
|
"polygon/erc20/gitcoin_(pos)",
|
|
5721
5758
|
"polygon/erc20/gnosis",
|
|
5722
5759
|
"polygon/erc20/golem_network_token",
|
|
@@ -5843,6 +5880,7 @@ Array [
|
|
|
5843
5880
|
"polygon/erc20/rendoge",
|
|
5844
5881
|
"polygon/erc20/renfil",
|
|
5845
5882
|
"polygon/erc20/request",
|
|
5883
|
+
"polygon/erc20/revolt_2_earn",
|
|
5846
5884
|
"polygon/erc20/ricochet",
|
|
5847
5885
|
"polygon/erc20/ripiocreditnetwork",
|
|
5848
5886
|
"polygon/erc20/rlc",
|
|
@@ -5860,6 +5898,7 @@ Array [
|
|
|
5860
5898
|
"polygon/erc20/shopping.io",
|
|
5861
5899
|
"polygon/erc20/singularitynet_token",
|
|
5862
5900
|
"polygon/erc20/spacerat",
|
|
5901
|
+
"polygon/erc20/stable_one_rocket",
|
|
5863
5902
|
"polygon/erc20/stacker_ventures_token",
|
|
5864
5903
|
"polygon/erc20/stacker_ventures_token_(pos)",
|
|
5865
5904
|
"polygon/erc20/stackos",
|
|
@@ -5911,6 +5950,7 @@ Array [
|
|
|
5911
5950
|
"polygon/erc20/telcoin",
|
|
5912
5951
|
"polygon/erc20/tellor_tributes",
|
|
5913
5952
|
"polygon/erc20/the_employment_commons_work_token_(pos)",
|
|
5953
|
+
"polygon/erc20/the_sporkdao_token_(pos)",
|
|
5914
5954
|
"polygon/erc20/tidal_token",
|
|
5915
5955
|
"polygon/erc20/torn_token",
|
|
5916
5956
|
"polygon/erc20/trueusd",
|
|
@@ -5968,6 +6008,7 @@ Array [
|
|
|
5968
6008
|
"bsc/bep20/alpacatoken",
|
|
5969
6009
|
"bsc/bep20/alpatoken",
|
|
5970
6010
|
"bsc/bep20/alphatoken",
|
|
6011
|
+
"bsc/bep20/alpine_fan_token",
|
|
5971
6012
|
"bsc/bep20/altura",
|
|
5972
6013
|
"bsc/bep20/amc_fight_night",
|
|
5973
6014
|
"bsc/bep20/ampl_secured_by_meter_passport",
|
|
@@ -5984,6 +6025,7 @@ Array [
|
|
|
5984
6025
|
"bsc/bep20/arrano",
|
|
5985
6026
|
"bsc/bep20/artrade_token",
|
|
5986
6027
|
"bsc/bep20/aurox_token",
|
|
6028
|
+
"bsc/bep20/ausmt_v2",
|
|
5987
6029
|
"bsc/bep20/autocrypto",
|
|
5988
6030
|
"bsc/bep20/automata",
|
|
5989
6031
|
"bsc/bep20/autov2",
|
|
@@ -6067,8 +6109,10 @@ Array [
|
|
|
6067
6109
|
"bsc/bep20/bittorrent",
|
|
6068
6110
|
"bsc/bep20/bitwell_token",
|
|
6069
6111
|
"bsc/bep20/blinktoken",
|
|
6112
|
+
"bsc/bep20/blok",
|
|
6070
6113
|
"bsc/bep20/bnb48_club_token",
|
|
6071
6114
|
"bsc/bep20/bnb_network",
|
|
6115
|
+
"bsc/bep20/bobc",
|
|
6072
6116
|
"bsc/bep20/boletoken",
|
|
6073
6117
|
"bsc/bep20/bondly",
|
|
6074
6118
|
"bsc/bep20/boringdao",
|
|
@@ -6090,14 +6134,17 @@ Array [
|
|
|
6090
6134
|
"bsc/bep20/catecoin",
|
|
6091
6135
|
"bsc/bep20/catecoin_old",
|
|
6092
6136
|
"bsc/bep20/ceek",
|
|
6137
|
+
"bsc/bep20/cellframe_token",
|
|
6093
6138
|
"bsc/bep20/cerby_token",
|
|
6094
6139
|
"bsc/bep20/certik_token",
|
|
6095
6140
|
"bsc/bep20/chainport.io-peg_xcad_token",
|
|
6141
|
+
"bsc/bep20/checkdot",
|
|
6096
6142
|
"bsc/bep20/cheesemaker.farm",
|
|
6097
6143
|
"bsc/bep20/chess",
|
|
6098
6144
|
"bsc/bep20/chi_gastoken_by_1inch",
|
|
6099
6145
|
"bsc/bep20/chroma",
|
|
6100
6146
|
"bsc/bep20/clintex",
|
|
6147
|
+
"bsc/bep20/coalphoenix",
|
|
6101
6148
|
"bsc/bep20/coin98",
|
|
6102
6149
|
"bsc/bep20/coin_merge",
|
|
6103
6150
|
"bsc/bep20/concentrated_voting_power",
|
|
@@ -6214,6 +6261,7 @@ Array [
|
|
|
6214
6261
|
"bsc/bep20/helmet.insure_governance_token",
|
|
6215
6262
|
"bsc/bep20/honey_token",
|
|
6216
6263
|
"bsc/bep20/hootoken",
|
|
6264
|
+
"bsc/bep20/horde",
|
|
6217
6265
|
"bsc/bep20/horizon_protocol",
|
|
6218
6266
|
"bsc/bep20/hot_cross_token",
|
|
6219
6267
|
"bsc/bep20/hotbit_token",
|
|
@@ -6265,10 +6313,12 @@ Array [
|
|
|
6265
6313
|
"bsc/bep20/meme_lordz",
|
|
6266
6314
|
"bsc/bep20/mercor_token",
|
|
6267
6315
|
"bsc/bep20/metafluence",
|
|
6316
|
+
"bsc/bep20/metagame_arena",
|
|
6268
6317
|
"bsc/bep20/metahero",
|
|
6269
6318
|
"bsc/bep20/metaloop_tech",
|
|
6270
6319
|
"bsc/bep20/micropets",
|
|
6271
6320
|
"bsc/bep20/milk_protocol",
|
|
6321
|
+
"bsc/bep20/miotac",
|
|
6272
6322
|
"bsc/bep20/mist",
|
|
6273
6323
|
"bsc/bep20/mix",
|
|
6274
6324
|
"bsc/bep20/mobox",
|
|
@@ -6293,6 +6343,7 @@ Array [
|
|
|
6293
6343
|
"bsc/bep20/nerve",
|
|
6294
6344
|
"bsc/bep20/nervenetwork",
|
|
6295
6345
|
"bsc/bep20/newscrypto",
|
|
6346
|
+
"bsc/bep20/nextep",
|
|
6296
6347
|
"bsc/bep20/nftart.finance",
|
|
6297
6348
|
"bsc/bep20/nftb",
|
|
6298
6349
|
"bsc/bep20/nftbooks",
|
|
@@ -6355,6 +6406,7 @@ Array [
|
|
|
6355
6406
|
"bsc/bep20/ramen_token",
|
|
6356
6407
|
"bsc/bep20/ramp_defi",
|
|
6357
6408
|
"bsc/bep20/rangers_protocol_gas",
|
|
6409
|
+
"bsc/bep20/raptor_v3",
|
|
6358
6410
|
"bsc/bep20/raven_protocol",
|
|
6359
6411
|
"bsc/bep20/rbx",
|
|
6360
6412
|
"bsc/bep20/reef.finance",
|
|
@@ -6375,6 +6427,7 @@ Array [
|
|
|
6375
6427
|
"bsc/bep20/safepal_token",
|
|
6376
6428
|
"bsc/bep20/safuu",
|
|
6377
6429
|
"bsc/bep20/saketoken",
|
|
6430
|
+
"bsc/bep20/satoshi_island_coin",
|
|
6378
6431
|
"bsc/bep20/saudi_shiba_inu",
|
|
6379
6432
|
"bsc/bep20/scallop",
|
|
6380
6433
|
"bsc/bep20/sector",
|
|
@@ -6383,11 +6436,14 @@ Array [
|
|
|
6383
6436
|
"bsc/bep20/shambala",
|
|
6384
6437
|
"bsc/bep20/shard",
|
|
6385
6438
|
"bsc/bep20/shiba_inu",
|
|
6439
|
+
"bsc/bep20/shibatrust",
|
|
6386
6440
|
"bsc/bep20/shibnobi",
|
|
6387
6441
|
"bsc/bep20/shield_protocol",
|
|
6388
6442
|
"bsc/bep20/shill",
|
|
6389
6443
|
"bsc/bep20/shirtum",
|
|
6444
|
+
"bsc/bep20/singularity_dao",
|
|
6390
6445
|
"bsc/bep20/smart_advertising_transaction_token",
|
|
6446
|
+
"bsc/bep20/snappy_doge",
|
|
6391
6447
|
"bsc/bep20/socialdefi",
|
|
6392
6448
|
"bsc/bep20/solana_farm",
|
|
6393
6449
|
"bsc/bep20/spartan_protocol_token_v2",
|
|
@@ -6486,6 +6542,7 @@ Array [
|
|
|
6486
6542
|
"bsc/bep20/weather",
|
|
6487
6543
|
"bsc/bep20/weed_inu",
|
|
6488
6544
|
"bsc/bep20/weetwo",
|
|
6545
|
+
"bsc/bep20/wesendit",
|
|
6489
6546
|
"bsc/bep20/weyu",
|
|
6490
6547
|
"bsc/bep20/wink",
|
|
6491
6548
|
"bsc/bep20/wootrade_network",
|
|
@@ -6513,6 +6570,7 @@ Array [
|
|
|
6513
6570
|
"bsc/bep20/zmine_token",
|
|
6514
6571
|
"bsc/bep20/zomainfinity",
|
|
6515
6572
|
"bsc/bep20/zombie_inu",
|
|
6573
|
+
"bsc/bep20/zuna",
|
|
6516
6574
|
"algorand/asa/31566704",
|
|
6517
6575
|
"algorand/asa/312769",
|
|
6518
6576
|
"algorand/asa/6587142",
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
sortByMarketcapV1,
|
|
3
|
-
sortByMarketcapV2,
|
|
4
|
-
sortByMarketcap,
|
|
5
|
-
} from "./sortByMarketcap";
|
|
1
|
+
import { sortByMarketcap } from "./sortByMarketcap";
|
|
6
2
|
import { listCryptoCurrencies, listTokens } from ".";
|
|
7
3
|
import { getBTCValues } from "../countervalues/mock";
|
|
8
4
|
|
|
@@ -11,10 +7,3 @@ test("sortByMarketcap snapshot", () => {
|
|
|
11
7
|
const tickers = Object.keys(getBTCValues());
|
|
12
8
|
expect(sortByMarketcap(list, tickers).map((c) => c.id)).toMatchSnapshot();
|
|
13
9
|
});
|
|
14
|
-
test("sortByMarketcapV2 = sortByMarketcapV1", () => {
|
|
15
|
-
const list = [...listCryptoCurrencies(), ...listTokens()];
|
|
16
|
-
const tickers = Object.keys(getBTCValues());
|
|
17
|
-
expect(sortByMarketcapV2(list, tickers).map((c) => c.id)).toMatchObject(
|
|
18
|
-
sortByMarketcapV1(list, tickers).map((c) => c.id)
|
|
19
|
-
);
|
|
20
|
-
});
|
|
@@ -3,24 +3,7 @@ import { useState, useEffect } from "react";
|
|
|
3
3
|
import { makeLRUCache } from "../cache";
|
|
4
4
|
import api from "../countervalues/api";
|
|
5
5
|
import { listCryptoCurrencies, listTokens } from "../currencies";
|
|
6
|
-
export const sortByMarketcapV1 = <C extends Currency>(
|
|
7
|
-
currencies: C[],
|
|
8
|
-
tickers: string[]
|
|
9
|
-
): C[] => {
|
|
10
|
-
const list = currencies.slice(0);
|
|
11
|
-
const prependList: C[] = [];
|
|
12
|
-
tickers.forEach((ticker) => {
|
|
13
|
-
const item = list.find(
|
|
14
|
-
(c) => !c.disableCountervalue && c.ticker === ticker
|
|
15
|
-
);
|
|
16
6
|
|
|
17
|
-
if (item) {
|
|
18
|
-
list.splice(list.indexOf(item), 1);
|
|
19
|
-
prependList.push(item);
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
return prependList.concat(list);
|
|
23
|
-
};
|
|
24
7
|
// FIXME in future we would put it back in ledgerjs to be more "dynamic"
|
|
25
8
|
let currenciesAndTokenWithCountervaluesByTicker:
|
|
26
9
|
| Map<string, Currency>
|
|
@@ -45,7 +28,7 @@ function lazyLoadTickerMap() {
|
|
|
45
28
|
return m;
|
|
46
29
|
}
|
|
47
30
|
|
|
48
|
-
export const
|
|
31
|
+
export const sortByMarketcap = <C extends Currency>(
|
|
49
32
|
currencies: C[],
|
|
50
33
|
tickers: string[]
|
|
51
34
|
): C[] => {
|
|
@@ -66,10 +49,7 @@ export const sortByMarketcapV2 = <C extends Currency>(
|
|
|
66
49
|
});
|
|
67
50
|
return prependList.concat(list);
|
|
68
51
|
};
|
|
69
|
-
|
|
70
|
-
currencies: C[],
|
|
71
|
-
tickers: string[]
|
|
72
|
-
) => C[] = sortByMarketcapV2;
|
|
52
|
+
|
|
73
53
|
let marketcapTickersCache;
|
|
74
54
|
export const getMarketcapTickers: () => Promise<string[]> = makeLRUCache(() =>
|
|
75
55
|
api.fetchMarketcapTickers().then((tickers) => {
|
package/src/env.ts
CHANGED