@ledgerhq/live-common 34.51.0-nightly.9 → 34.52.0-nightly.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/account/helpers.d.ts +10 -0
- package/lib/account/helpers.d.ts.map +1 -1
- package/lib/account/helpers.js +43 -16
- package/lib/account/helpers.js.map +1 -1
- package/lib/bridge/generic-alpaca/estimateMaxSpendable.js +1 -1
- package/lib/bridge/generic-alpaca/estimateMaxSpendable.js.map +1 -1
- package/lib/bridge/generic-alpaca/prepareTransaction.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/prepareTransaction.js +45 -37
- package/lib/bridge/generic-alpaca/prepareTransaction.js.map +1 -1
- package/lib/bridge/generic-alpaca/signOperation.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/signOperation.js +20 -0
- package/lib/bridge/generic-alpaca/signOperation.js.map +1 -1
- package/lib/bridge/generic-alpaca/utils.js +1 -1
- package/lib/bridge/generic-alpaca/utils.js.map +1 -1
- package/lib/config/index.d.ts +2 -2
- package/lib/config/index.d.ts.map +1 -1
- package/lib/config/index.js.map +1 -1
- package/lib/dada-client/hooks/useDrawerConfiguration.d.ts +19 -0
- package/lib/dada-client/hooks/useDrawerConfiguration.d.ts.map +1 -0
- package/lib/dada-client/hooks/useDrawerConfiguration.js +45 -0
- package/lib/dada-client/hooks/useDrawerConfiguration.js.map +1 -0
- package/lib/e2e/data/deviceLabelsData.d.ts +8 -0
- package/lib/e2e/data/deviceLabelsData.d.ts.map +1 -1
- package/lib/e2e/data/deviceLabelsData.js +62 -2
- package/lib/e2e/data/deviceLabelsData.js.map +1 -1
- package/lib/e2e/deviceInteraction/ButtonDeviceSimulator.d.ts +3 -0
- package/lib/e2e/deviceInteraction/ButtonDeviceSimulator.d.ts.map +1 -0
- package/lib/e2e/deviceInteraction/ButtonDeviceSimulator.js +26 -0
- package/lib/e2e/deviceInteraction/ButtonDeviceSimulator.js.map +1 -0
- package/lib/e2e/deviceInteraction/TouchDeviceSimulator.d.ts +4 -0
- package/lib/e2e/deviceInteraction/TouchDeviceSimulator.d.ts.map +1 -0
- package/lib/e2e/deviceInteraction/TouchDeviceSimulator.js +50 -0
- package/lib/e2e/deviceInteraction/TouchDeviceSimulator.js.map +1 -0
- package/lib/e2e/enum/Account.d.ts +2 -4
- package/lib/e2e/enum/Account.d.ts.map +1 -1
- package/lib/e2e/enum/Account.js +5 -8
- package/lib/e2e/enum/Account.js.map +1 -1
- package/lib/e2e/enum/Device.d.ts +1 -0
- package/lib/e2e/enum/Device.d.ts.map +1 -1
- package/lib/e2e/enum/Device.js +1 -0
- package/lib/e2e/enum/Device.js.map +1 -1
- package/lib/e2e/enum/DeviceLabels.d.ts +10 -2
- package/lib/e2e/enum/DeviceLabels.d.ts.map +1 -1
- package/lib/e2e/enum/DeviceLabels.js +9 -1
- package/lib/e2e/enum/DeviceLabels.js.map +1 -1
- package/lib/e2e/families/algorand.d.ts.map +1 -1
- package/lib/e2e/families/algorand.js +10 -2
- package/lib/e2e/families/algorand.js.map +1 -1
- package/lib/e2e/families/aptos.d.ts +2 -1
- package/lib/e2e/families/aptos.d.ts.map +1 -1
- package/lib/e2e/families/aptos.js +12 -4
- package/lib/e2e/families/aptos.js.map +1 -1
- package/lib/e2e/families/bitcoin.d.ts.map +1 -1
- package/lib/e2e/families/bitcoin.js +25 -15
- package/lib/e2e/families/bitcoin.js.map +1 -1
- package/lib/e2e/families/cardano.d.ts.map +1 -1
- package/lib/e2e/families/cardano.js +122 -46
- package/lib/e2e/families/cardano.js.map +1 -1
- package/lib/e2e/families/celo.d.ts.map +1 -1
- package/lib/e2e/families/celo.js +11 -1
- package/lib/e2e/families/celo.js.map +1 -1
- package/lib/e2e/families/cosmos.d.ts.map +1 -1
- package/lib/e2e/families/cosmos.js +16 -3
- package/lib/e2e/families/cosmos.js.map +1 -1
- package/lib/e2e/families/evm.d.ts +1 -2
- package/lib/e2e/families/evm.d.ts.map +1 -1
- package/lib/e2e/families/evm.js +28 -13
- package/lib/e2e/families/evm.js.map +1 -1
- package/lib/e2e/families/hedera.d.ts.map +1 -1
- package/lib/e2e/families/hedera.js +3 -2
- package/lib/e2e/families/hedera.js.map +1 -1
- package/lib/e2e/families/kaspa.d.ts +2 -1
- package/lib/e2e/families/kaspa.d.ts.map +1 -1
- package/lib/e2e/families/kaspa.js +12 -4
- package/lib/e2e/families/kaspa.js.map +1 -1
- package/lib/e2e/families/multiversX.d.ts.map +1 -1
- package/lib/e2e/families/multiversX.js +11 -1
- package/lib/e2e/families/multiversX.js.map +1 -1
- package/lib/e2e/families/near.d.ts.map +1 -1
- package/lib/e2e/families/near.js +15 -4
- package/lib/e2e/families/near.js.map +1 -1
- package/lib/e2e/families/osmosis.d.ts.map +1 -1
- package/lib/e2e/families/osmosis.js +11 -1
- package/lib/e2e/families/osmosis.js.map +1 -1
- package/lib/e2e/families/polkadot.d.ts.map +1 -1
- package/lib/e2e/families/polkadot.js +10 -2
- package/lib/e2e/families/polkadot.js.map +1 -1
- package/lib/e2e/families/solana.d.ts.map +1 -1
- package/lib/e2e/families/solana.js +16 -3
- package/lib/e2e/families/solana.js.map +1 -1
- package/lib/e2e/families/stellar.d.ts.map +1 -1
- package/lib/e2e/families/stellar.js +10 -2
- package/lib/e2e/families/stellar.js.map +1 -1
- package/lib/e2e/families/sui.d.ts +2 -1
- package/lib/e2e/families/sui.d.ts.map +1 -1
- package/lib/e2e/families/sui.js +11 -3
- package/lib/e2e/families/sui.js.map +1 -1
- package/lib/e2e/families/tezos.d.ts.map +1 -1
- package/lib/e2e/families/tezos.js +12 -3
- package/lib/e2e/families/tezos.js.map +1 -1
- package/lib/e2e/families/tron.d.ts.map +1 -1
- package/lib/e2e/families/tron.js +10 -2
- package/lib/e2e/families/tron.js.map +1 -1
- package/lib/e2e/families/xrp.d.ts.map +1 -1
- package/lib/e2e/families/xrp.js +10 -2
- package/lib/e2e/families/xrp.js.map +1 -1
- package/lib/e2e/index.d.ts +4 -2
- package/lib/e2e/index.d.ts.map +1 -1
- package/lib/e2e/models/Transaction.d.ts +0 -5
- package/lib/e2e/models/Transaction.d.ts.map +1 -1
- package/lib/e2e/models/Transaction.js +1 -9
- package/lib/e2e/models/Transaction.js.map +1 -1
- package/lib/e2e/speculos.d.ts +13 -4
- package/lib/e2e/speculos.d.ts.map +1 -1
- package/lib/e2e/speculos.js +141 -75
- package/lib/e2e/speculos.js.map +1 -1
- package/lib/e2e/speculosAppVersion.d.ts +1 -0
- package/lib/e2e/speculosAppVersion.d.ts.map +1 -1
- package/lib/e2e/speculosAppVersion.js +9 -1
- package/lib/e2e/speculosAppVersion.js.map +1 -1
- package/lib/exchange/index.d.ts.map +1 -1
- package/lib/exchange/index.js +4 -15
- package/lib/exchange/index.js.map +1 -1
- package/lib/exchange/swap/getCompleteSwapHistory.d.ts +1 -1
- package/lib/exchange/swap/getCompleteSwapHistory.d.ts.map +1 -1
- package/lib/exchange/swap/getCompleteSwapHistory.js +5 -5
- package/lib/exchange/swap/getCompleteSwapHistory.js.map +1 -1
- package/lib/exchange/swap/hooks/useSelectableCurrencies.d.ts.map +1 -1
- package/lib/exchange/swap/hooks/useSelectableCurrencies.js +16 -4
- package/lib/exchange/swap/hooks/useSelectableCurrencies.js.map +1 -1
- package/lib/featureFlags/defaultFeatures.d.ts +3 -0
- package/lib/featureFlags/defaultFeatures.d.ts.map +1 -1
- package/lib/featureFlags/defaultFeatures.js +2 -1
- 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/generated/specs.d.ts +1 -1
- package/lib/load/speculos.d.ts.map +1 -1
- package/lib/load/speculos.js +1 -0
- package/lib/load/speculos.js.map +1 -1
- package/lib/market/hooks/useLargeMoverChartData.d.ts +1 -2
- package/lib/market/hooks/useLargeMoverChartData.d.ts.map +1 -1
- package/lib/market/hooks/useLargeMoverChartData.js.map +1 -1
- package/lib/market/hooks/useLargeMoverCurrencies.d.ts +1 -2
- package/lib/market/hooks/useLargeMoverCurrencies.d.ts.map +1 -1
- package/lib/market/hooks/useLargeMoverCurrencies.js +1 -3
- package/lib/market/hooks/useLargeMoverCurrencies.js.map +1 -1
- package/lib/market/utils/currencyFormatter.d.ts +1 -1
- package/lib/market/utils/currencyFormatter.d.ts.map +1 -1
- package/lib/market/utils/currencyFormatter.js +1 -1
- package/lib/market/utils/currencyFormatter.js.map +1 -1
- package/lib/modularDrawer/hooks/modules/useLeftApyModule.d.ts +1 -1
- package/lib/modularDrawer/hooks/modules/useLeftMarketTrendModule.d.ts +1 -1
- package/lib/modularDrawer/hooks/modules/useRightMarketTrendModule.d.ts +1 -1
- package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.d.ts +1 -2
- package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.d.ts.map +1 -1
- package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js +3 -0
- package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js.map +1 -1
- package/lib/modularDrawer/hooks/useRightBalanceAsset.d.ts +1 -1
- package/lib/wallet-api/constants.d.ts +2 -2
- package/lib-es/account/helpers.d.ts +10 -0
- package/lib-es/account/helpers.d.ts.map +1 -1
- package/lib-es/account/helpers.js +26 -0
- package/lib-es/account/helpers.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/estimateMaxSpendable.js +1 -1
- package/lib-es/bridge/generic-alpaca/estimateMaxSpendable.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/prepareTransaction.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/prepareTransaction.js +45 -37
- package/lib-es/bridge/generic-alpaca/prepareTransaction.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/signOperation.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/signOperation.js +17 -0
- package/lib-es/bridge/generic-alpaca/signOperation.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/utils.js +1 -1
- package/lib-es/bridge/generic-alpaca/utils.js.map +1 -1
- package/lib-es/config/index.d.ts +2 -2
- package/lib-es/config/index.d.ts.map +1 -1
- package/lib-es/config/index.js.map +1 -1
- package/lib-es/dada-client/hooks/useDrawerConfiguration.d.ts +19 -0
- package/lib-es/dada-client/hooks/useDrawerConfiguration.d.ts.map +1 -0
- package/lib-es/dada-client/hooks/useDrawerConfiguration.js +38 -0
- package/lib-es/dada-client/hooks/useDrawerConfiguration.js.map +1 -0
- package/lib-es/e2e/data/deviceLabelsData.d.ts +8 -0
- package/lib-es/e2e/data/deviceLabelsData.d.ts.map +1 -1
- package/lib-es/e2e/data/deviceLabelsData.js +62 -2
- package/lib-es/e2e/data/deviceLabelsData.js.map +1 -1
- package/lib-es/e2e/deviceInteraction/ButtonDeviceSimulator.d.ts +3 -0
- package/lib-es/e2e/deviceInteraction/ButtonDeviceSimulator.d.ts.map +1 -0
- package/lib-es/e2e/deviceInteraction/ButtonDeviceSimulator.js +18 -0
- package/lib-es/e2e/deviceInteraction/ButtonDeviceSimulator.js.map +1 -0
- package/lib-es/e2e/deviceInteraction/TouchDeviceSimulator.d.ts +4 -0
- package/lib-es/e2e/deviceInteraction/TouchDeviceSimulator.d.ts.map +1 -0
- package/lib-es/e2e/deviceInteraction/TouchDeviceSimulator.js +41 -0
- package/lib-es/e2e/deviceInteraction/TouchDeviceSimulator.js.map +1 -0
- package/lib-es/e2e/enum/Account.d.ts +2 -4
- package/lib-es/e2e/enum/Account.d.ts.map +1 -1
- package/lib-es/e2e/enum/Account.js +5 -8
- package/lib-es/e2e/enum/Account.js.map +1 -1
- package/lib-es/e2e/enum/Device.d.ts +1 -0
- package/lib-es/e2e/enum/Device.d.ts.map +1 -1
- package/lib-es/e2e/enum/Device.js +1 -0
- package/lib-es/e2e/enum/Device.js.map +1 -1
- package/lib-es/e2e/enum/DeviceLabels.d.ts +10 -2
- package/lib-es/e2e/enum/DeviceLabels.d.ts.map +1 -1
- package/lib-es/e2e/enum/DeviceLabels.js +9 -1
- package/lib-es/e2e/enum/DeviceLabels.js.map +1 -1
- package/lib-es/e2e/families/algorand.d.ts.map +1 -1
- package/lib-es/e2e/families/algorand.js +11 -3
- package/lib-es/e2e/families/algorand.js.map +1 -1
- package/lib-es/e2e/families/aptos.d.ts +2 -1
- package/lib-es/e2e/families/aptos.d.ts.map +1 -1
- package/lib-es/e2e/families/aptos.js +12 -4
- package/lib-es/e2e/families/aptos.js.map +1 -1
- package/lib-es/e2e/families/bitcoin.d.ts.map +1 -1
- package/lib-es/e2e/families/bitcoin.js +27 -17
- package/lib-es/e2e/families/bitcoin.js.map +1 -1
- package/lib-es/e2e/families/cardano.d.ts.map +1 -1
- package/lib-es/e2e/families/cardano.js +121 -45
- package/lib-es/e2e/families/cardano.js.map +1 -1
- package/lib-es/e2e/families/celo.d.ts.map +1 -1
- package/lib-es/e2e/families/celo.js +12 -2
- package/lib-es/e2e/families/celo.js.map +1 -1
- package/lib-es/e2e/families/cosmos.d.ts.map +1 -1
- package/lib-es/e2e/families/cosmos.js +17 -4
- package/lib-es/e2e/families/cosmos.js.map +1 -1
- package/lib-es/e2e/families/evm.d.ts +1 -2
- package/lib-es/e2e/families/evm.d.ts.map +1 -1
- package/lib-es/e2e/families/evm.js +25 -9
- package/lib-es/e2e/families/evm.js.map +1 -1
- package/lib-es/e2e/families/hedera.d.ts.map +1 -1
- package/lib-es/e2e/families/hedera.js +2 -1
- package/lib-es/e2e/families/hedera.js.map +1 -1
- package/lib-es/e2e/families/kaspa.d.ts +2 -1
- package/lib-es/e2e/families/kaspa.d.ts.map +1 -1
- package/lib-es/e2e/families/kaspa.js +12 -4
- package/lib-es/e2e/families/kaspa.js.map +1 -1
- package/lib-es/e2e/families/multiversX.d.ts.map +1 -1
- package/lib-es/e2e/families/multiversX.js +12 -2
- package/lib-es/e2e/families/multiversX.js.map +1 -1
- package/lib-es/e2e/families/near.d.ts.map +1 -1
- package/lib-es/e2e/families/near.js +16 -5
- package/lib-es/e2e/families/near.js.map +1 -1
- package/lib-es/e2e/families/osmosis.d.ts.map +1 -1
- package/lib-es/e2e/families/osmosis.js +12 -2
- package/lib-es/e2e/families/osmosis.js.map +1 -1
- package/lib-es/e2e/families/polkadot.d.ts.map +1 -1
- package/lib-es/e2e/families/polkadot.js +11 -3
- package/lib-es/e2e/families/polkadot.js.map +1 -1
- package/lib-es/e2e/families/solana.d.ts.map +1 -1
- package/lib-es/e2e/families/solana.js +17 -4
- package/lib-es/e2e/families/solana.js.map +1 -1
- package/lib-es/e2e/families/stellar.d.ts.map +1 -1
- package/lib-es/e2e/families/stellar.js +11 -3
- package/lib-es/e2e/families/stellar.js.map +1 -1
- package/lib-es/e2e/families/sui.d.ts +2 -1
- package/lib-es/e2e/families/sui.d.ts.map +1 -1
- package/lib-es/e2e/families/sui.js +12 -4
- package/lib-es/e2e/families/sui.js.map +1 -1
- package/lib-es/e2e/families/tezos.d.ts.map +1 -1
- package/lib-es/e2e/families/tezos.js +12 -3
- package/lib-es/e2e/families/tezos.js.map +1 -1
- package/lib-es/e2e/families/tron.d.ts.map +1 -1
- package/lib-es/e2e/families/tron.js +11 -3
- package/lib-es/e2e/families/tron.js.map +1 -1
- package/lib-es/e2e/families/xrp.d.ts.map +1 -1
- package/lib-es/e2e/families/xrp.js +11 -3
- package/lib-es/e2e/families/xrp.js.map +1 -1
- package/lib-es/e2e/index.d.ts +4 -2
- package/lib-es/e2e/index.d.ts.map +1 -1
- package/lib-es/e2e/models/Transaction.d.ts +0 -5
- package/lib-es/e2e/models/Transaction.d.ts.map +1 -1
- package/lib-es/e2e/models/Transaction.js +0 -7
- package/lib-es/e2e/models/Transaction.js.map +1 -1
- package/lib-es/e2e/speculos.d.ts +13 -4
- package/lib-es/e2e/speculos.d.ts.map +1 -1
- package/lib-es/e2e/speculos.js +134 -71
- package/lib-es/e2e/speculos.js.map +1 -1
- package/lib-es/e2e/speculosAppVersion.d.ts +1 -0
- package/lib-es/e2e/speculosAppVersion.d.ts.map +1 -1
- package/lib-es/e2e/speculosAppVersion.js +7 -0
- package/lib-es/e2e/speculosAppVersion.js.map +1 -1
- package/lib-es/exchange/index.d.ts.map +1 -1
- package/lib-es/exchange/index.js +4 -15
- package/lib-es/exchange/index.js.map +1 -1
- package/lib-es/exchange/swap/getCompleteSwapHistory.d.ts +1 -1
- package/lib-es/exchange/swap/getCompleteSwapHistory.d.ts.map +1 -1
- package/lib-es/exchange/swap/getCompleteSwapHistory.js +5 -5
- package/lib-es/exchange/swap/getCompleteSwapHistory.js.map +1 -1
- package/lib-es/exchange/swap/hooks/useSelectableCurrencies.d.ts.map +1 -1
- package/lib-es/exchange/swap/hooks/useSelectableCurrencies.js +18 -6
- package/lib-es/exchange/swap/hooks/useSelectableCurrencies.js.map +1 -1
- package/lib-es/featureFlags/defaultFeatures.d.ts +3 -0
- package/lib-es/featureFlags/defaultFeatures.d.ts.map +1 -1
- package/lib-es/featureFlags/defaultFeatures.js +2 -1
- 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/generated/specs.d.ts +1 -1
- package/lib-es/load/speculos.d.ts.map +1 -1
- package/lib-es/load/speculos.js +1 -0
- package/lib-es/load/speculos.js.map +1 -1
- package/lib-es/market/hooks/useLargeMoverChartData.d.ts +1 -2
- package/lib-es/market/hooks/useLargeMoverChartData.d.ts.map +1 -1
- package/lib-es/market/hooks/useLargeMoverChartData.js.map +1 -1
- package/lib-es/market/hooks/useLargeMoverCurrencies.d.ts +1 -2
- package/lib-es/market/hooks/useLargeMoverCurrencies.d.ts.map +1 -1
- package/lib-es/market/hooks/useLargeMoverCurrencies.js +1 -3
- package/lib-es/market/hooks/useLargeMoverCurrencies.js.map +1 -1
- package/lib-es/market/utils/currencyFormatter.d.ts +1 -1
- package/lib-es/market/utils/currencyFormatter.d.ts.map +1 -1
- package/lib-es/market/utils/currencyFormatter.js +1 -1
- package/lib-es/market/utils/currencyFormatter.js.map +1 -1
- package/lib-es/modularDrawer/hooks/modules/useLeftApyModule.d.ts +1 -1
- package/lib-es/modularDrawer/hooks/modules/useLeftMarketTrendModule.d.ts +1 -1
- package/lib-es/modularDrawer/hooks/modules/useRightMarketTrendModule.d.ts +1 -1
- package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.d.ts +1 -2
- package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.d.ts.map +1 -1
- package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js +3 -0
- package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js.map +1 -1
- package/lib-es/modularDrawer/hooks/useRightBalanceAsset.d.ts +1 -1
- package/lib-es/wallet-api/constants.d.ts +2 -2
- package/package.json +55 -55
- package/src/account/helpers.test.ts +209 -0
- package/src/account/helpers.ts +34 -0
- package/src/bridge/cache.test.ts +2 -2
- package/src/bridge/generic-alpaca/estimateMaxSpendable.ts +1 -1
- package/src/bridge/generic-alpaca/prepareTransaction.ts +69 -46
- package/src/bridge/generic-alpaca/signOperation.ts +20 -0
- package/src/bridge/generic-alpaca/tests/prepareTransaction.test.ts +109 -191
- package/src/bridge/generic-alpaca/utils.test.ts +15 -12
- package/src/bridge/generic-alpaca/utils.ts +1 -1
- package/src/config/index.ts +2 -4
- package/src/currencies/sortByMarketcap.test.ts +10 -7
- package/src/dada-client/hooks/useDrawerConfiguration.ts +65 -0
- package/src/e2e/data/deviceLabelsData.ts +70 -2
- package/src/e2e/deviceInteraction/ButtonDeviceSimulator.ts +23 -0
- package/src/e2e/deviceInteraction/TouchDeviceSimulator.ts +52 -0
- package/src/e2e/enum/Account.ts +1 -16
- package/src/e2e/enum/Device.ts +1 -0
- package/src/e2e/enum/DeviceLabels.ts +9 -1
- package/src/e2e/families/algorand.ts +10 -4
- package/src/e2e/families/aptos.ts +12 -4
- package/src/e2e/families/bitcoin.ts +25 -18
- package/src/e2e/families/cardano.ts +137 -50
- package/src/e2e/families/celo.ts +11 -2
- package/src/e2e/families/cosmos.ts +15 -9
- package/src/e2e/families/evm.ts +28 -11
- package/src/e2e/families/hedera.ts +2 -1
- package/src/e2e/families/kaspa.ts +12 -4
- package/src/e2e/families/multiversX.ts +11 -2
- package/src/e2e/families/near.ts +15 -6
- package/src/e2e/families/osmosis.ts +11 -2
- package/src/e2e/families/polkadot.ts +10 -3
- package/src/e2e/families/solana.ts +15 -9
- package/src/e2e/families/stellar.ts +10 -3
- package/src/e2e/families/sui.ts +12 -4
- package/src/e2e/families/tezos.ts +11 -3
- package/src/e2e/families/tron.ts +10 -3
- package/src/e2e/families/xrp.ts +10 -3
- package/src/e2e/models/Transaction.ts +0 -13
- package/src/e2e/speculos.ts +160 -89
- package/src/e2e/speculosAppVersion.ts +8 -0
- package/src/exchange/index.ts +4 -15
- package/src/exchange/swap/getCompleteSwapHistory.ts +5 -5
- package/src/exchange/swap/hooks/useFromState.test.ts +11 -4
- package/src/exchange/swap/hooks/useReverseAccounts.test.ts +11 -4
- package/src/exchange/swap/hooks/useSelectableCurrencies.test.ts +14 -8
- package/src/exchange/swap/hooks/useSelectableCurrencies.ts +23 -6
- package/src/exchange/swap/hooks/useToState.test.ts +11 -4
- package/src/exchange/swap/hooks/useUpdateMaxAmount.test.ts +11 -4
- package/src/exchange/swap/utils/index.test.ts +10 -4
- package/src/families/algorand/bridge.integration.test.ts +1 -1
- package/src/families/bitcoin/__snapshots__/bridge.integration.test.ts.snap +3 -3
- package/src/families/cardano/bridge.integration.test.ts +1 -1
- package/src/families/cosmos/datasets/__snapshots__/cosmos.integration.test.ts.snap +25 -2
- package/src/families/evm/bridge.integration.test.ts +1 -1
- package/src/families/hedera/__snapshots__/bridge.integration.test.ts.snap +25 -5
- package/src/families/icon/bridge.integration.test.ts +1 -1
- package/src/families/multiversx/bridge.integration.test.ts +1 -2
- package/src/families/near/bridge.integration.test.ts +1 -1
- package/src/families/solana/bridge.integration.test.ts +1 -1
- package/src/families/sui/bridge.integration.test.ts +1 -1
- package/src/families/ton/bridge.integration.test.ts +1 -1
- package/src/featureFlags/defaultFeatures.ts +2 -1
- package/src/load/speculos.ts +1 -0
- package/src/market/hooks/useLargeMoverChartData.ts +1 -2
- package/src/market/hooks/useLargeMoverCurrencies.ts +3 -6
- package/src/market/utils/currencyFormatter.ts +2 -2
- package/src/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.ts +3 -0
- package/lib/e2e/enum/Nft.d.ts +0 -15
- package/lib/e2e/enum/Nft.d.ts.map +0 -1
- package/lib/e2e/enum/Nft.js +0 -25
- package/lib/e2e/enum/Nft.js.map +0 -1
- package/lib-es/e2e/enum/Nft.d.ts +0 -15
- package/lib-es/e2e/enum/Nft.d.ts.map +0 -1
- package/lib-es/e2e/enum/Nft.js +0 -21
- package/lib-es/e2e/enum/Nft.js.map +0 -1
- package/src/e2e/enum/Nft.ts +0 -57
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import "../../../__tests__/test-helpers/dom-polyfill";
|
|
5
5
|
import { renderHook, act } from "@testing-library/react";
|
|
6
|
-
import { getCryptoCurrencyById
|
|
6
|
+
import { getCryptoCurrencyById } from "@ledgerhq/cryptoassets";
|
|
7
7
|
import { selectorStateDefaultValues, useToState } from ".";
|
|
8
8
|
import { genTokenAccount } from "@ledgerhq/coin-framework/mocks/account";
|
|
9
9
|
import { genAccount } from "../../../mock/account";
|
|
@@ -12,9 +12,16 @@ import type { Account } from "@ledgerhq/types-live";
|
|
|
12
12
|
|
|
13
13
|
const BTC = getCryptoCurrencyById("bitcoin");
|
|
14
14
|
const ETH = getCryptoCurrencyById("ethereum");
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
const USDT = {
|
|
16
|
+
type: "TokenCurrency" as const,
|
|
17
|
+
id: "ethereum/erc20/usd_tether__erc20_",
|
|
18
|
+
name: "Tether USD (ERC-20)",
|
|
19
|
+
ticker: "USDT",
|
|
20
|
+
units: [{ name: "Tether USD", code: "USDT", magnitude: 6 }],
|
|
21
|
+
contractAddress: "0xdac17f958d2ee523a2206206994597c13d831ec7",
|
|
22
|
+
parentCurrency: ETH,
|
|
23
|
+
tokenType: "erc20" as const,
|
|
24
|
+
};
|
|
18
25
|
|
|
19
26
|
const selectedAccount = genAccount("mocked-account-selected", { currency: ETH });
|
|
20
27
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @jest-environment jsdom
|
|
3
3
|
*/
|
|
4
4
|
import "../../../__tests__/test-helpers/dom-polyfill";
|
|
5
|
-
import { getCryptoCurrencyById
|
|
5
|
+
import { getCryptoCurrencyById } from "@ledgerhq/cryptoassets";
|
|
6
6
|
import { act, renderHook } from "@testing-library/react";
|
|
7
7
|
import BigNumber from "bignumber.js";
|
|
8
8
|
import { checkAccountSupported } from "../../../account/index";
|
|
@@ -19,9 +19,16 @@ jest.mock("../../../families/evm/bridge/mock");
|
|
|
19
19
|
const mockedEstimateMaxSpendable = jest.mocked(ethBridge.accountBridge.estimateMaxSpendable);
|
|
20
20
|
|
|
21
21
|
const ETH = getCryptoCurrencyById("ethereum");
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
const USDT = {
|
|
23
|
+
type: "TokenCurrency" as const,
|
|
24
|
+
id: "ethereum/erc20/usd_tether__erc20_",
|
|
25
|
+
name: "Tether USD (ERC-20)",
|
|
26
|
+
ticker: "USDT",
|
|
27
|
+
units: [{ name: "Tether USD", code: "USDT", magnitude: 6 }],
|
|
28
|
+
contractAddress: "0xdac17f958d2ee523a2206206994597c13d831ec7",
|
|
29
|
+
parentCurrency: ETH,
|
|
30
|
+
tokenType: "erc20" as const,
|
|
31
|
+
};
|
|
25
32
|
|
|
26
33
|
const parentAccount = genAccount("parent-account", {
|
|
27
34
|
currency: ETH,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { findTokenById } from "@ledgerhq/cryptoassets";
|
|
2
1
|
import type { CryptoCurrency, TokenCurrency } from "@ledgerhq/types-cryptoassets";
|
|
3
2
|
import type { Account, TokenAccount } from "@ledgerhq/types-live";
|
|
4
3
|
import BigNumber from "bignumber.js";
|
|
@@ -87,9 +86,16 @@ describe("swap/utils/getAccountTuplesForCurrency", () => {
|
|
|
87
86
|
});
|
|
88
87
|
|
|
89
88
|
describe("TokenCurrency", () => {
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
const aaveToken = Object.freeze({
|
|
90
|
+
type: "TokenCurrency" as const,
|
|
91
|
+
id: "ethereum/erc20/aave",
|
|
92
|
+
name: "Aave Token",
|
|
93
|
+
ticker: "AAVE",
|
|
94
|
+
units: [{ name: "Aave Token", code: "AAVE", magnitude: 18 }],
|
|
95
|
+
contractAddress: "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9",
|
|
96
|
+
parentCurrency: getCryptoCurrencyById("ethereum"),
|
|
97
|
+
tokenType: "erc20" as const,
|
|
98
|
+
});
|
|
93
99
|
|
|
94
100
|
test("returns correct parent accounts including a new subAccount when a TokenCurrency is provided", () => {
|
|
95
101
|
const ethAccounts = [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../__tests__/test-helpers/setup";
|
|
2
2
|
import { testBridge } from "../../__tests__/test-helpers/bridge";
|
|
3
|
-
import { dataset } from "@ledgerhq/coin-algorand/bridge.
|
|
3
|
+
import { dataset } from "@ledgerhq/coin-algorand/test/bridge.dataset";
|
|
4
4
|
|
|
5
5
|
testBridge(dataset);
|
|
@@ -10513,7 +10513,7 @@ exports[`bitcoin_cash currency bridge scanAccounts bitcoin_cash seed 1 1`] = `
|
|
|
10513
10513
|
"bitcoinResources": {},
|
|
10514
10514
|
"currencyId": "bitcoin_cash",
|
|
10515
10515
|
"derivationMode": "unsplit",
|
|
10516
|
-
"freshAddress": "
|
|
10516
|
+
"freshAddress": "qzam62zsdr43xdc58xs7effux924f0wvj5hpzy230a",
|
|
10517
10517
|
"freshAddressPath": "44'/0'/0'/0/19",
|
|
10518
10518
|
"id": "js:2:bitcoin_cash:xpub6BuPWhjLqutPV8SF4RMrrn8c3t7uBZbz4CBbThpbg9GYjqRMncra9mjgSfWSK7uMDz37hhzJ8wvkbDDQQJt6VgwLoszvmPiSBtLA1bPLLSn:unsplit",
|
|
10519
10519
|
"index": 0,
|
|
@@ -10531,7 +10531,7 @@ exports[`bitcoin_cash currency bridge scanAccounts bitcoin_cash seed 1 1`] = `
|
|
|
10531
10531
|
"bitcoinResources": {},
|
|
10532
10532
|
"currencyId": "bitcoin_cash",
|
|
10533
10533
|
"derivationMode": "",
|
|
10534
|
-
"freshAddress": "
|
|
10534
|
+
"freshAddress": "qrpv5gkjr7t734nc9j5dmaln02rhzntl2cv0u822y5",
|
|
10535
10535
|
"freshAddressPath": "44'/145'/0'/0/23",
|
|
10536
10536
|
"id": "js:2:bitcoin_cash:xpub6D7pqJa4V3SFSigcsRaFL2mpfG7469osrMkk4ieR2uk8y1v3nuQUD8W8v36PLWQtVRSggSQM7jLpGNKH7sqCaoPSJEp9wZCVkRnMWoiUUXa:",
|
|
10537
10537
|
"index": 0,
|
|
@@ -10549,7 +10549,7 @@ exports[`bitcoin_cash currency bridge scanAccounts bitcoin_cash seed 1 1`] = `
|
|
|
10549
10549
|
"bitcoinResources": {},
|
|
10550
10550
|
"currencyId": "bitcoin_cash",
|
|
10551
10551
|
"derivationMode": "",
|
|
10552
|
-
"freshAddress": "
|
|
10552
|
+
"freshAddress": "qqgaflq75ze7k9k40uf5f6k7dvsafu8zdckqw2styt",
|
|
10553
10553
|
"freshAddressPath": "44'/145'/1'/0/0",
|
|
10554
10554
|
"id": "js:2:bitcoin_cash:xpub6D7pqJa4V3SFVc2TjqQaz1N6gCs5vTjznBSAyEE9es1j5nTb2uKXbihXQuaUURKJ59hEVQZctuCSC8t1MURbeiSmZFDTBsJ9QJCS5crNrBG:",
|
|
10555
10555
|
"index": 1,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../__tests__/test-helpers/setup";
|
|
2
2
|
import { testBridge } from "../../__tests__/test-helpers/bridge";
|
|
3
|
-
import { dataset } from "@ledgerhq/coin-cardano/bridge.
|
|
3
|
+
import { dataset } from "@ledgerhq/coin-cardano/test/bridge.dataset";
|
|
4
4
|
|
|
5
5
|
testBridge(dataset);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
exports[`cosmos currency bridge scanAccounts cosmos seed 1 1`] = `
|
|
4
4
|
[
|
|
5
5
|
{
|
|
6
|
-
"balance": "
|
|
6
|
+
"balance": "7287916",
|
|
7
7
|
"currencyId": "cosmos",
|
|
8
8
|
"derivationMode": "",
|
|
9
9
|
"freshAddress": "cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl",
|
|
@@ -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": "4643030",
|
|
16
16
|
"swapHistory": [],
|
|
17
17
|
"syncHash": undefined,
|
|
18
18
|
"used": true,
|
|
@@ -1707,6 +1707,29 @@ exports[`cosmos currency bridge scanAccounts cosmos seed 1 2`] = `
|
|
|
1707
1707
|
"type": "OUT",
|
|
1708
1708
|
"value": "10174",
|
|
1709
1709
|
},
|
|
1710
|
+
{
|
|
1711
|
+
"accountId": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:",
|
|
1712
|
+
"blockHash": null,
|
|
1713
|
+
"blockHeight": 27946941,
|
|
1714
|
+
"extra": {
|
|
1715
|
+
"memo": "Ledger Live",
|
|
1716
|
+
"validators": [
|
|
1717
|
+
{
|
|
1718
|
+
"address": "cosmosvaloper1c4k24jzduc365kywrsvf5ujz4ya6mwympnc4en",
|
|
1719
|
+
"amount": "10675",
|
|
1720
|
+
},
|
|
1721
|
+
],
|
|
1722
|
+
},
|
|
1723
|
+
"fee": "17953",
|
|
1724
|
+
"hasFailed": false,
|
|
1725
|
+
"hash": "977096B11DCF020506A34072FF02D1C3DA9E70A281121F9A209D061715697590",
|
|
1726
|
+
"id": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:-977096B11DCF020506A34072FF02D1C3DA9E70A281121F9A209D061715697590-UNDELEGATE",
|
|
1727
|
+
"recipients": [],
|
|
1728
|
+
"senders": [],
|
|
1729
|
+
"transactionSequenceNumber": 182,
|
|
1730
|
+
"type": "UNDELEGATE",
|
|
1731
|
+
"value": "17953",
|
|
1732
|
+
},
|
|
1710
1733
|
{
|
|
1711
1734
|
"accountId": "js:2:cosmos:cosmos1g84934jpu3v5de5yqukkkhxmcvsw3u2ajxvpdl:",
|
|
1712
1735
|
"blockHash": null,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { dataset } from "@ledgerhq/coin-evm/
|
|
1
|
+
import { dataset } from "@ledgerhq/coin-evm/test/bridge.dataset";
|
|
2
2
|
import { testBridge } from "../../__tests__/test-helpers/bridge";
|
|
3
3
|
import "../../__tests__/test-helpers/setup";
|
|
4
4
|
|
|
@@ -120,7 +120,7 @@ exports[`hedera currency bridge scanAccounts hedera seed 1 1`] = `
|
|
|
120
120
|
"used": true,
|
|
121
121
|
},
|
|
122
122
|
{
|
|
123
|
-
"balance": "
|
|
123
|
+
"balance": "771245057",
|
|
124
124
|
"currencyId": "hedera",
|
|
125
125
|
"derivationMode": "hederaBip44",
|
|
126
126
|
"freshAddress": "0.0.8313485",
|
|
@@ -131,22 +131,22 @@ exports[`hedera currency bridge scanAccounts hedera seed 1 1`] = `
|
|
|
131
131
|
},
|
|
132
132
|
"id": "js:2:hedera:0.0.8313485:hederaBip44",
|
|
133
133
|
"index": 4,
|
|
134
|
-
"operationsCount":
|
|
134
|
+
"operationsCount": 22,
|
|
135
135
|
"pendingOperations": [],
|
|
136
136
|
"seedIdentifier": "9e92a312233d5fd6b5a723875aeea2cea81a8e48ffc00341cff6dffcfd3ab7f2",
|
|
137
|
-
"spendableBalance": "
|
|
137
|
+
"spendableBalance": "771245057",
|
|
138
138
|
"subAccounts": [],
|
|
139
139
|
"swapHistory": [],
|
|
140
140
|
"syncHash": "0x30c71e3f",
|
|
141
141
|
"used": true,
|
|
142
142
|
},
|
|
143
143
|
{
|
|
144
|
-
"balance": "
|
|
144
|
+
"balance": "241000000",
|
|
145
145
|
"id": "js:2:hedera:0.0.8313485:hederaBip44+hedera%2Fhts%2Ftune~!underscore!~fm~!underscore!~0.0.127877",
|
|
146
146
|
"operationsCount": 0,
|
|
147
147
|
"parentId": "js:2:hedera:0.0.8313485:hederaBip44",
|
|
148
148
|
"pendingOperations": [],
|
|
149
|
-
"spendableBalance": "
|
|
149
|
+
"spendableBalance": "241000000",
|
|
150
150
|
"swapHistory": [],
|
|
151
151
|
"tokenId": "hedera/hts/tune_fm_0.0.127877",
|
|
152
152
|
"type": "TokenAccountRaw",
|
|
@@ -1951,6 +1951,26 @@ exports[`hedera currency bridge scanAccounts hedera seed 1 2`] = `
|
|
|
1951
1951
|
"type": "FEES",
|
|
1952
1952
|
"value": "26918289",
|
|
1953
1953
|
},
|
|
1954
|
+
{
|
|
1955
|
+
"accountId": "js:2:hedera:0.0.8313485:hederaBip44",
|
|
1956
|
+
"blockHash": null,
|
|
1957
|
+
"blockHeight": 5,
|
|
1958
|
+
"extra": {
|
|
1959
|
+
"consensusTimestamp": "1760435993.267662000",
|
|
1960
|
+
},
|
|
1961
|
+
"fee": "557852",
|
|
1962
|
+
"hasFailed": false,
|
|
1963
|
+
"hash": "shGaR01gNESn4WAfLYVOycTQ-lJoWNlWYY15u8SADLZiXbv08ozatmW7DfZDceoM",
|
|
1964
|
+
"id": "js:2:hedera:0.0.8313485:hederaBip44-shGaR01gNESn4WAfLYVOycTQ-lJoWNlWYY15u8SADLZiXbv08ozatmW7DfZDceoM-FEES",
|
|
1965
|
+
"recipients": [
|
|
1966
|
+
"0.0.10006055",
|
|
1967
|
+
],
|
|
1968
|
+
"senders": [
|
|
1969
|
+
"0.0.8313485",
|
|
1970
|
+
],
|
|
1971
|
+
"type": "FEES",
|
|
1972
|
+
"value": "557852",
|
|
1973
|
+
},
|
|
1954
1974
|
{
|
|
1955
1975
|
"accountId": "js:2:hedera:0.0.8313485:hederaBip44",
|
|
1956
1976
|
"blockHash": null,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../__tests__/test-helpers/setup";
|
|
2
2
|
import { testBridge } from "../../__tests__/test-helpers/bridge";
|
|
3
|
-
import { dataset } from "@ledgerhq/coin-icon/bridge.
|
|
3
|
+
import { dataset } from "@ledgerhq/coin-icon/test/bridge.dataset";
|
|
4
4
|
|
|
5
5
|
testBridge(dataset);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import "../../__tests__/test-helpers/setup";
|
|
2
2
|
import { testBridge } from "../../__tests__/test-helpers/bridge";
|
|
3
|
-
import { dataset } from "@ledgerhq/coin-multiversx/bridge.
|
|
4
|
-
import "@ledgerhq/coin-multiversx/bridge.integration.test";
|
|
3
|
+
import { dataset } from "@ledgerhq/coin-multiversx/test/bridge.dataset";
|
|
5
4
|
|
|
6
5
|
testBridge(dataset);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../__tests__/test-helpers/setup";
|
|
2
2
|
import { testBridge } from "../../__tests__/test-helpers/bridge";
|
|
3
|
-
import { dataset } from "@ledgerhq/coin-near/bridge.
|
|
3
|
+
import { dataset } from "@ledgerhq/coin-near/test/bridge.dataset";
|
|
4
4
|
|
|
5
5
|
testBridge(dataset);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../__tests__/test-helpers/setup";
|
|
2
2
|
import { testBridge } from "../../__tests__/test-helpers/bridge";
|
|
3
|
-
import { dataset } from "@ledgerhq/coin-solana/bridge.
|
|
3
|
+
import { dataset } from "@ledgerhq/coin-solana/test/bridge.dataset";
|
|
4
4
|
|
|
5
5
|
testBridge(dataset);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../__tests__/test-helpers/setup";
|
|
2
2
|
import { testBridge } from "../../__tests__/test-helpers/bridge";
|
|
3
|
-
import { dataset } from "@ledgerhq/coin-sui/
|
|
3
|
+
import { dataset } from "@ledgerhq/coin-sui/test/bridge.dataset";
|
|
4
4
|
|
|
5
5
|
testBridge(dataset);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { dataset } from "@ledgerhq/coin-ton/
|
|
1
|
+
import { dataset } from "@ledgerhq/coin-ton/test/bridge.dataset";
|
|
2
2
|
import { testBridge } from "../../__tests__/test-helpers/bridge";
|
|
3
3
|
import "../../__tests__/test-helpers/setup";
|
|
4
4
|
|
|
@@ -33,6 +33,7 @@ export const initFeature = <T>(opts?: Feature<T>) => {
|
|
|
33
33
|
* Currency Features.
|
|
34
34
|
*/
|
|
35
35
|
export const CURRENCY_DEFAULT_FEATURES = {
|
|
36
|
+
currencyPolkadot: { enabled: true },
|
|
36
37
|
currencyArbitrum: DEFAULT_FEATURE,
|
|
37
38
|
currencyArbitrumSepolia: DEFAULT_FEATURE,
|
|
38
39
|
currencyAstar: DEFAULT_FEATURE,
|
|
@@ -439,7 +440,7 @@ export const DEFAULT_FEATURES: Features = {
|
|
|
439
440
|
},
|
|
440
441
|
},
|
|
441
442
|
|
|
442
|
-
|
|
443
|
+
ptxEarnDrawerConfiguration: {
|
|
443
444
|
enabled: false,
|
|
444
445
|
params: {},
|
|
445
446
|
},
|
package/src/load/speculos.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { useQueries } from "@tanstack/react-query";
|
|
|
2
2
|
import { fetchCurrencyChartData } from "../api";
|
|
3
3
|
import { QUERY_KEY } from "../utils/queryKeys";
|
|
4
4
|
import { REFETCH_TIME_ONE_MINUTE, BASIC_REFETCH } from "../utils/timers";
|
|
5
|
-
import { MarketCoinDataChart } from "../utils/types";
|
|
6
5
|
|
|
7
6
|
type UseLargeMoverChartDataParams = {
|
|
8
7
|
ids: string[];
|
|
@@ -29,7 +28,7 @@ export const useLargeMoverChartData = ({
|
|
|
29
28
|
|
|
30
29
|
const chartDataArray = ids.map((id, index) => ({
|
|
31
30
|
idChartData: id,
|
|
32
|
-
chartData: chartQueries[index]?.data
|
|
31
|
+
chartData: chartQueries[index]?.data,
|
|
33
32
|
isLoading: chartQueries[index]?.isLoading || false,
|
|
34
33
|
isError: chartQueries[index]?.isError || false,
|
|
35
34
|
}));
|
|
@@ -2,11 +2,8 @@ import { useQueries } from "@tanstack/react-query";
|
|
|
2
2
|
import { fetchCurrency } from "../api";
|
|
3
3
|
import { QUERY_KEY } from "../utils/queryKeys";
|
|
4
4
|
import { REFETCH_TIME_ONE_MINUTE, BASIC_REFETCH } from "../utils/timers";
|
|
5
|
-
import { MarketItemResponse
|
|
5
|
+
import { MarketItemResponse } from "../utils/types";
|
|
6
6
|
import { format } from "../utils/currencyFormatter";
|
|
7
|
-
import { listCryptoCurrencies } from "@ledgerhq/cryptoassets/currencies";
|
|
8
|
-
|
|
9
|
-
const cryptoCurrenciesList = [...listCryptoCurrencies()];
|
|
10
7
|
|
|
11
8
|
type UseLargeMoverCurrenciesParams = {
|
|
12
9
|
ids: string[];
|
|
@@ -23,13 +20,13 @@ export const useLargeMoverCurrencies = ({
|
|
|
23
20
|
queryFn: () => fetchCurrency({ id, counterCurrency }),
|
|
24
21
|
refetchInterval: REFETCH_TIME_ONE_MINUTE * BASIC_REFETCH,
|
|
25
22
|
staleTime: REFETCH_TIME_ONE_MINUTE * BASIC_REFETCH,
|
|
26
|
-
select: (data: MarketItemResponse) => format(data
|
|
23
|
+
select: (data: MarketItemResponse) => format(data),
|
|
27
24
|
})),
|
|
28
25
|
});
|
|
29
26
|
|
|
30
27
|
return ids.map((id, index) => ({
|
|
31
28
|
id,
|
|
32
|
-
data: currencyQueries[index]?.data
|
|
29
|
+
data: currencyQueries[index]?.data,
|
|
33
30
|
isLoading: currencyQueries[index]?.isLoading || false,
|
|
34
31
|
isError: currencyQueries[index]?.isError || false,
|
|
35
32
|
}));
|
|
@@ -54,11 +54,11 @@ export function currencyFormatter(
|
|
|
54
54
|
|
|
55
55
|
export const format = (
|
|
56
56
|
currency: MarketItemResponse,
|
|
57
|
-
cryptoCurrenciesList
|
|
57
|
+
cryptoCurrenciesList?: (CryptoCurrency | TokenCurrency)[],
|
|
58
58
|
): CurrencyData => {
|
|
59
59
|
const ledgerIdsSet = new Set(currency.ledgerIds.map(id => id.toLowerCase()));
|
|
60
60
|
|
|
61
|
-
const internalCurrency = cryptoCurrenciesList
|
|
61
|
+
const internalCurrency = cryptoCurrenciesList?.find(({ id }) =>
|
|
62
62
|
ledgerIdsSet.has(id.toLowerCase()),
|
|
63
63
|
);
|
|
64
64
|
|
|
@@ -76,6 +76,7 @@ export function useCurrenciesUnderFeatureFlag() {
|
|
|
76
76
|
const westend = useFeature("currencyWestend");
|
|
77
77
|
const assetHubWestend = useFeature("currencyAssetHubWestend");
|
|
78
78
|
const assetHubPolkadot = useFeature("currencyAssetHubPolkadot");
|
|
79
|
+
const polkadot = useFeature("currencyPolkadot");
|
|
79
80
|
|
|
80
81
|
const featureFlaggedCurrencies = useMemo(
|
|
81
82
|
(): Partial<Record<CryptoCurrencyId, Feature<unknown> | null>> => ({
|
|
@@ -148,6 +149,7 @@ export function useCurrenciesUnderFeatureFlag() {
|
|
|
148
149
|
westend,
|
|
149
150
|
assethub_westend: assetHubWestend,
|
|
150
151
|
assethub_polkadot: assetHubPolkadot,
|
|
152
|
+
polkadot,
|
|
151
153
|
}),
|
|
152
154
|
[
|
|
153
155
|
aptos,
|
|
@@ -219,6 +221,7 @@ export function useCurrenciesUnderFeatureFlag() {
|
|
|
219
221
|
westend,
|
|
220
222
|
assetHubWestend,
|
|
221
223
|
assetHubPolkadot,
|
|
224
|
+
polkadot,
|
|
222
225
|
],
|
|
223
226
|
);
|
|
224
227
|
|
package/lib/e2e/enum/Nft.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare class Nft {
|
|
2
|
-
readonly collectionName: string;
|
|
3
|
-
readonly nftName: string;
|
|
4
|
-
readonly nftContract: string;
|
|
5
|
-
readonly nftStandard: string;
|
|
6
|
-
readonly tokenId?: number | undefined;
|
|
7
|
-
constructor(collectionName: string, nftName: string, nftContract: string, nftStandard: string, tokenId?: number | undefined);
|
|
8
|
-
static readonly ANTITUS: Nft;
|
|
9
|
-
static readonly PODIUM: Nft;
|
|
10
|
-
static readonly NY_LA_MUSE: Nft;
|
|
11
|
-
static readonly ANIME_SHIPS_494: Nft;
|
|
12
|
-
static readonly BISHOP_OF_STORMS: Nft;
|
|
13
|
-
static readonly COMMON_TOWER_MAP: Nft;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=Nft.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Nft.d.ts","sourceRoot":"","sources":["../../../src/e2e/enum/Nft.ts"],"names":[],"mappings":"AAAA,qBAAa,GAAG;aAEI,cAAc,EAAE,MAAM;aACtB,OAAO,EAAE,MAAM;aACf,WAAW,EAAE,MAAM;aACnB,WAAW,EAAE,MAAM;aACnB,OAAO,CAAC;gBAJR,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,oBAAQ;IAGlC,MAAM,CAAC,QAAQ,CAAC,OAAO,MAMrB;IAEF,MAAM,CAAC,QAAQ,CAAC,MAAM,MAMpB;IAEF,MAAM,CAAC,QAAQ,CAAC,UAAU,MAMxB;IAEF,MAAM,CAAC,QAAQ,CAAC,eAAe,MAM7B;IAEF,MAAM,CAAC,QAAQ,CAAC,gBAAgB,MAM9B;IAEF,MAAM,CAAC,QAAQ,CAAC,gBAAgB,MAM9B;CACH"}
|
package/lib/e2e/enum/Nft.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Nft = void 0;
|
|
4
|
-
class Nft {
|
|
5
|
-
collectionName;
|
|
6
|
-
nftName;
|
|
7
|
-
nftContract;
|
|
8
|
-
nftStandard;
|
|
9
|
-
tokenId;
|
|
10
|
-
constructor(collectionName, nftName, nftContract, nftStandard, tokenId) {
|
|
11
|
-
this.collectionName = collectionName;
|
|
12
|
-
this.nftName = nftName;
|
|
13
|
-
this.nftContract = nftContract;
|
|
14
|
-
this.nftStandard = nftStandard;
|
|
15
|
-
this.tokenId = tokenId;
|
|
16
|
-
}
|
|
17
|
-
static ANTITUS = new Nft("parallel", "Antius's Forecast", "0x76BE3b62873462d2142405439777e971754E8E77", "ERC-1155", 10237);
|
|
18
|
-
static PODIUM = new Nft("Pointshark", "Podium", "0x4f3A894f0655E4Bea7f809C2ccEc0c5E43E7E7a9", "ERC-721", 9);
|
|
19
|
-
static NY_LA_MUSE = new Nft("Rarible", "NY la muse", "0xB66a603f4cFe17e3D27B87a8BfCaD319856518B8", "ERC-1155", undefined);
|
|
20
|
-
static ANIME_SHIPS_494 = new Nft("Anime Ships", "494", "0x95CCfd0d848B96AdfF5bCfe757505c64a0048CA4", "ERC-1155", 494);
|
|
21
|
-
static BISHOP_OF_STORMS = new Nft("Anichess Orb of Power", "Bishop of Storms", "0x473989BF6409D21f8A7Fdd7133a40F9251cC1839", "ERC-1155", 3);
|
|
22
|
-
static COMMON_TOWER_MAP = new Nft("TOWER Inventory", "Common TOWER Map", "0x2B88Ce7b01E6BdBB18f9703e01286608cF77e805", "ERC-1155", 22);
|
|
23
|
-
}
|
|
24
|
-
exports.Nft = Nft;
|
|
25
|
-
//# sourceMappingURL=Nft.js.map
|
package/lib/e2e/enum/Nft.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Nft.js","sourceRoot":"","sources":["../../../src/e2e/enum/Nft.ts"],"names":[],"mappings":";;;AAAA,MAAa,GAAG;IAEI;IACA;IACA;IACA;IACA;IALlB,YACkB,cAAsB,EACtB,OAAe,EACf,WAAmB,EACnB,WAAmB,EACnB,OAAgB;QAJhB,mBAAc,GAAd,cAAc,CAAQ;QACtB,YAAO,GAAP,OAAO,CAAQ;QACf,gBAAW,GAAX,WAAW,CAAQ;QACnB,gBAAW,GAAX,WAAW,CAAQ;QACnB,YAAO,GAAP,OAAO,CAAS;IAC/B,CAAC;IAEJ,MAAM,CAAU,OAAO,GAAG,IAAI,GAAG,CAC/B,UAAU,EACV,mBAAmB,EACnB,4CAA4C,EAC5C,UAAU,EACV,KAAK,CACN,CAAC;IAEF,MAAM,CAAU,MAAM,GAAG,IAAI,GAAG,CAC9B,YAAY,EACZ,QAAQ,EACR,4CAA4C,EAC5C,SAAS,EACT,CAAC,CACF,CAAC;IAEF,MAAM,CAAU,UAAU,GAAG,IAAI,GAAG,CAClC,SAAS,EACT,YAAY,EACZ,4CAA4C,EAC5C,UAAU,EACV,SAAS,CACV,CAAC;IAEF,MAAM,CAAU,eAAe,GAAG,IAAI,GAAG,CACvC,aAAa,EACb,KAAK,EACL,4CAA4C,EAC5C,UAAU,EACV,GAAG,CACJ,CAAC;IAEF,MAAM,CAAU,gBAAgB,GAAG,IAAI,GAAG,CACxC,uBAAuB,EACvB,kBAAkB,EAClB,4CAA4C,EAC5C,UAAU,EACV,CAAC,CACF,CAAC;IAEF,MAAM,CAAU,gBAAgB,GAAG,IAAI,GAAG,CACxC,iBAAiB,EACjB,kBAAkB,EAClB,4CAA4C,EAC5C,UAAU,EACV,EAAE,CACH,CAAC;;AAvDJ,kBAwDC"}
|
package/lib-es/e2e/enum/Nft.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare class Nft {
|
|
2
|
-
readonly collectionName: string;
|
|
3
|
-
readonly nftName: string;
|
|
4
|
-
readonly nftContract: string;
|
|
5
|
-
readonly nftStandard: string;
|
|
6
|
-
readonly tokenId?: number | undefined;
|
|
7
|
-
constructor(collectionName: string, nftName: string, nftContract: string, nftStandard: string, tokenId?: number | undefined);
|
|
8
|
-
static readonly ANTITUS: Nft;
|
|
9
|
-
static readonly PODIUM: Nft;
|
|
10
|
-
static readonly NY_LA_MUSE: Nft;
|
|
11
|
-
static readonly ANIME_SHIPS_494: Nft;
|
|
12
|
-
static readonly BISHOP_OF_STORMS: Nft;
|
|
13
|
-
static readonly COMMON_TOWER_MAP: Nft;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=Nft.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Nft.d.ts","sourceRoot":"","sources":["../../../src/e2e/enum/Nft.ts"],"names":[],"mappings":"AAAA,qBAAa,GAAG;aAEI,cAAc,EAAE,MAAM;aACtB,OAAO,EAAE,MAAM;aACf,WAAW,EAAE,MAAM;aACnB,WAAW,EAAE,MAAM;aACnB,OAAO,CAAC;gBAJR,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,oBAAQ;IAGlC,MAAM,CAAC,QAAQ,CAAC,OAAO,MAMrB;IAEF,MAAM,CAAC,QAAQ,CAAC,MAAM,MAMpB;IAEF,MAAM,CAAC,QAAQ,CAAC,UAAU,MAMxB;IAEF,MAAM,CAAC,QAAQ,CAAC,eAAe,MAM7B;IAEF,MAAM,CAAC,QAAQ,CAAC,gBAAgB,MAM9B;IAEF,MAAM,CAAC,QAAQ,CAAC,gBAAgB,MAM9B;CACH"}
|
package/lib-es/e2e/enum/Nft.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export class Nft {
|
|
2
|
-
collectionName;
|
|
3
|
-
nftName;
|
|
4
|
-
nftContract;
|
|
5
|
-
nftStandard;
|
|
6
|
-
tokenId;
|
|
7
|
-
constructor(collectionName, nftName, nftContract, nftStandard, tokenId) {
|
|
8
|
-
this.collectionName = collectionName;
|
|
9
|
-
this.nftName = nftName;
|
|
10
|
-
this.nftContract = nftContract;
|
|
11
|
-
this.nftStandard = nftStandard;
|
|
12
|
-
this.tokenId = tokenId;
|
|
13
|
-
}
|
|
14
|
-
static ANTITUS = new Nft("parallel", "Antius's Forecast", "0x76BE3b62873462d2142405439777e971754E8E77", "ERC-1155", 10237);
|
|
15
|
-
static PODIUM = new Nft("Pointshark", "Podium", "0x4f3A894f0655E4Bea7f809C2ccEc0c5E43E7E7a9", "ERC-721", 9);
|
|
16
|
-
static NY_LA_MUSE = new Nft("Rarible", "NY la muse", "0xB66a603f4cFe17e3D27B87a8BfCaD319856518B8", "ERC-1155", undefined);
|
|
17
|
-
static ANIME_SHIPS_494 = new Nft("Anime Ships", "494", "0x95CCfd0d848B96AdfF5bCfe757505c64a0048CA4", "ERC-1155", 494);
|
|
18
|
-
static BISHOP_OF_STORMS = new Nft("Anichess Orb of Power", "Bishop of Storms", "0x473989BF6409D21f8A7Fdd7133a40F9251cC1839", "ERC-1155", 3);
|
|
19
|
-
static COMMON_TOWER_MAP = new Nft("TOWER Inventory", "Common TOWER Map", "0x2B88Ce7b01E6BdBB18f9703e01286608cF77e805", "ERC-1155", 22);
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=Nft.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Nft.js","sourceRoot":"","sources":["../../../src/e2e/enum/Nft.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,GAAG;IAEI;IACA;IACA;IACA;IACA;IALlB,YACkB,cAAsB,EACtB,OAAe,EACf,WAAmB,EACnB,WAAmB,EACnB,OAAgB;QAJhB,mBAAc,GAAd,cAAc,CAAQ;QACtB,YAAO,GAAP,OAAO,CAAQ;QACf,gBAAW,GAAX,WAAW,CAAQ;QACnB,gBAAW,GAAX,WAAW,CAAQ;QACnB,YAAO,GAAP,OAAO,CAAS;IAC/B,CAAC;IAEJ,MAAM,CAAU,OAAO,GAAG,IAAI,GAAG,CAC/B,UAAU,EACV,mBAAmB,EACnB,4CAA4C,EAC5C,UAAU,EACV,KAAK,CACN,CAAC;IAEF,MAAM,CAAU,MAAM,GAAG,IAAI,GAAG,CAC9B,YAAY,EACZ,QAAQ,EACR,4CAA4C,EAC5C,SAAS,EACT,CAAC,CACF,CAAC;IAEF,MAAM,CAAU,UAAU,GAAG,IAAI,GAAG,CAClC,SAAS,EACT,YAAY,EACZ,4CAA4C,EAC5C,UAAU,EACV,SAAS,CACV,CAAC;IAEF,MAAM,CAAU,eAAe,GAAG,IAAI,GAAG,CACvC,aAAa,EACb,KAAK,EACL,4CAA4C,EAC5C,UAAU,EACV,GAAG,CACJ,CAAC;IAEF,MAAM,CAAU,gBAAgB,GAAG,IAAI,GAAG,CACxC,uBAAuB,EACvB,kBAAkB,EAClB,4CAA4C,EAC5C,UAAU,EACV,CAAC,CACF,CAAC;IAEF,MAAM,CAAU,gBAAgB,GAAG,IAAI,GAAG,CACxC,iBAAiB,EACjB,kBAAkB,EAClB,4CAA4C,EAC5C,UAAU,EACV,EAAE,CACH,CAAC"}
|
package/src/e2e/enum/Nft.ts
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
export class Nft {
|
|
2
|
-
constructor(
|
|
3
|
-
public readonly collectionName: string,
|
|
4
|
-
public readonly nftName: string,
|
|
5
|
-
public readonly nftContract: string,
|
|
6
|
-
public readonly nftStandard: string,
|
|
7
|
-
public readonly tokenId?: number,
|
|
8
|
-
) {}
|
|
9
|
-
|
|
10
|
-
static readonly ANTITUS = new Nft(
|
|
11
|
-
"parallel",
|
|
12
|
-
"Antius's Forecast",
|
|
13
|
-
"0x76BE3b62873462d2142405439777e971754E8E77",
|
|
14
|
-
"ERC-1155",
|
|
15
|
-
10237,
|
|
16
|
-
);
|
|
17
|
-
|
|
18
|
-
static readonly PODIUM = new Nft(
|
|
19
|
-
"Pointshark",
|
|
20
|
-
"Podium",
|
|
21
|
-
"0x4f3A894f0655E4Bea7f809C2ccEc0c5E43E7E7a9",
|
|
22
|
-
"ERC-721",
|
|
23
|
-
9,
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
static readonly NY_LA_MUSE = new Nft(
|
|
27
|
-
"Rarible",
|
|
28
|
-
"NY la muse",
|
|
29
|
-
"0xB66a603f4cFe17e3D27B87a8BfCaD319856518B8",
|
|
30
|
-
"ERC-1155",
|
|
31
|
-
undefined,
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
static readonly ANIME_SHIPS_494 = new Nft(
|
|
35
|
-
"Anime Ships",
|
|
36
|
-
"494",
|
|
37
|
-
"0x95CCfd0d848B96AdfF5bCfe757505c64a0048CA4",
|
|
38
|
-
"ERC-1155",
|
|
39
|
-
494,
|
|
40
|
-
);
|
|
41
|
-
|
|
42
|
-
static readonly BISHOP_OF_STORMS = new Nft(
|
|
43
|
-
"Anichess Orb of Power",
|
|
44
|
-
"Bishop of Storms",
|
|
45
|
-
"0x473989BF6409D21f8A7Fdd7133a40F9251cC1839",
|
|
46
|
-
"ERC-1155",
|
|
47
|
-
3,
|
|
48
|
-
);
|
|
49
|
-
|
|
50
|
-
static readonly COMMON_TOWER_MAP = new Nft(
|
|
51
|
-
"TOWER Inventory",
|
|
52
|
-
"Common TOWER Map",
|
|
53
|
-
"0x2B88Ce7b01E6BdBB18f9703e01286608cF77e805",
|
|
54
|
-
"ERC-1155",
|
|
55
|
-
22,
|
|
56
|
-
);
|
|
57
|
-
}
|