@ledgerhq/live-common 34.53.0-nightly.20251120023735 → 34.53.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__/test-helpers/bridge.d.ts.map +1 -1
- package/lib/__tests__/test-helpers/bridge.js +4 -0
- package/lib/__tests__/test-helpers/bridge.js.map +1 -1
- package/lib/__tests__/test-helpers/environment.js +0 -3
- package/lib/__tests__/test-helpers/environment.js.map +1 -1
- package/lib/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/getAccountShape.js +10 -12
- package/lib/bridge/generic-alpaca/getAccountShape.js.map +1 -1
- package/lib/currencies/helpers.d.ts +3 -1
- package/lib/currencies/helpers.d.ts.map +1 -1
- package/lib/currencies/helpers.js +27 -1
- package/lib/currencies/helpers.js.map +1 -1
- package/lib/dada-client/hooks/useAssetsData.d.ts +0 -1
- package/lib/dada-client/hooks/useAssetsData.d.ts.map +1 -1
- package/lib/dada-client/hooks/useAssetsData.js +0 -1
- package/lib/dada-client/hooks/useAssetsData.js.map +1 -1
- package/lib/deposit/helper.d.ts +8 -0
- package/lib/deposit/helper.d.ts.map +1 -0
- package/lib/deposit/helper.js +125 -0
- package/lib/deposit/helper.js.map +1 -0
- package/lib/deposit/index.d.ts +3 -0
- package/lib/deposit/index.d.ts.map +1 -0
- package/lib/deposit/index.js +6 -0
- package/lib/deposit/index.js.map +1 -0
- package/lib/deposit/mock.d.ts +75 -0
- package/lib/deposit/mock.d.ts.map +1 -0
- package/lib/deposit/mock.js +15111 -0
- package/lib/deposit/mock.js.map +1 -0
- package/lib/deposit/type.d.ts +17 -0
- package/lib/deposit/type.d.ts.map +1 -1
- package/lib/deposit/type.js.map +1 -1
- package/lib/deposit/useGroupedCurrenciesByProvider.hook.d.ts +3 -0
- package/lib/deposit/useGroupedCurrenciesByProvider.hook.d.ts.map +1 -0
- package/lib/deposit/useGroupedCurrenciesByProvider.hook.js +40 -0
- package/lib/deposit/useGroupedCurrenciesByProvider.hook.js.map +1 -0
- package/lib/deviceSDK/hooks/useBatteryStatuses.d.ts +1 -2
- package/lib/deviceSDK/hooks/useBatteryStatuses.d.ts.map +1 -1
- package/lib/deviceSDK/hooks/useBatteryStatuses.js +2 -4
- package/lib/deviceSDK/hooks/useBatteryStatuses.js.map +1 -1
- package/lib/deviceSDK/tasks/core.d.ts +1 -1
- package/lib/deviceSDK/tasks/core.d.ts.map +1 -1
- package/lib/deviceSDK/tasks/core.js +1 -1
- package/lib/deviceSDK/tasks/core.js.map +1 -1
- package/lib/deviceSDK/tasks/getDeviceInfo.d.ts.map +1 -1
- package/lib/deviceSDK/tasks/getDeviceInfo.js +0 -2
- package/lib/deviceSDK/tasks/getDeviceInfo.js.map +1 -1
- package/lib/deviceSDK/tasks/getLatestFirmware.d.ts.map +1 -1
- package/lib/deviceSDK/tasks/getLatestFirmware.js +2 -2
- package/lib/deviceSDK/tasks/getLatestFirmware.js.map +1 -1
- package/lib/deviceSDK/tasks/updateFirmware.d.ts.map +1 -1
- package/lib/deviceSDK/tasks/updateFirmware.js +0 -1
- package/lib/deviceSDK/tasks/updateFirmware.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/enum/Account.d.ts +1 -0
- package/lib/e2e/enum/Account.d.ts.map +1 -1
- package/lib/e2e/enum/Account.js +1 -0
- package/lib/e2e/enum/Account.js.map +1 -1
- package/lib/e2e/enum/Currency.d.ts +1 -0
- package/lib/e2e/enum/Currency.d.ts.map +1 -1
- package/lib/e2e/enum/Currency.js +6 -2
- package/lib/e2e/enum/Currency.js.map +1 -1
- package/lib/e2e/families/algorand.d.ts +1 -1
- package/lib/e2e/families/algorand.d.ts.map +1 -1
- package/lib/e2e/families/algorand.js +5 -5
- package/lib/e2e/families/algorand.js.map +1 -1
- package/lib/e2e/families/aptos.d.ts +2 -2
- package/lib/e2e/families/aptos.d.ts.map +1 -1
- package/lib/e2e/families/aptos.js +9 -9
- package/lib/e2e/families/aptos.js.map +1 -1
- package/lib/e2e/families/bitcoin.d.ts +2 -2
- package/lib/e2e/families/bitcoin.d.ts.map +1 -1
- package/lib/e2e/families/bitcoin.js +11 -11
- package/lib/e2e/families/bitcoin.js.map +1 -1
- package/lib/e2e/families/cardano.d.ts +0 -6
- package/lib/e2e/families/cardano.d.ts.map +1 -1
- package/lib/e2e/families/cardano.js +26 -28
- package/lib/e2e/families/cardano.js.map +1 -1
- package/lib/e2e/families/celo.d.ts +1 -1
- package/lib/e2e/families/celo.d.ts.map +1 -1
- package/lib/e2e/families/celo.js +5 -5
- package/lib/e2e/families/celo.js.map +1 -1
- package/lib/e2e/families/cosmos.d.ts +2 -2
- package/lib/e2e/families/cosmos.d.ts.map +1 -1
- package/lib/e2e/families/cosmos.js +9 -9
- package/lib/e2e/families/cosmos.js.map +1 -1
- package/lib/e2e/families/evm.d.ts +0 -2
- package/lib/e2e/families/evm.d.ts.map +1 -1
- package/lib/e2e/families/evm.js +12 -13
- package/lib/e2e/families/evm.js.map +1 -1
- package/lib/e2e/families/hedera.d.ts +1 -1
- package/lib/e2e/families/hedera.d.ts.map +1 -1
- package/lib/e2e/families/hedera.js +5 -5
- package/lib/e2e/families/hedera.js.map +1 -1
- package/lib/e2e/families/kaspa.d.ts +2 -2
- package/lib/e2e/families/kaspa.d.ts.map +1 -1
- package/lib/e2e/families/kaspa.js +9 -9
- package/lib/e2e/families/kaspa.js.map +1 -1
- package/lib/e2e/families/multiversX.d.ts +1 -1
- package/lib/e2e/families/multiversX.d.ts.map +1 -1
- package/lib/e2e/families/multiversX.js +5 -5
- package/lib/e2e/families/multiversX.js.map +1 -1
- package/lib/e2e/families/near.d.ts +1 -1
- package/lib/e2e/families/near.d.ts.map +1 -1
- package/lib/e2e/families/near.js +6 -6
- package/lib/e2e/families/near.js.map +1 -1
- package/lib/e2e/families/osmosis.d.ts +1 -1
- package/lib/e2e/families/osmosis.d.ts.map +1 -1
- package/lib/e2e/families/osmosis.js +5 -5
- package/lib/e2e/families/osmosis.js.map +1 -1
- package/lib/e2e/families/polkadot.d.ts +1 -1
- package/lib/e2e/families/polkadot.d.ts.map +1 -1
- package/lib/e2e/families/polkadot.js +5 -5
- package/lib/e2e/families/polkadot.js.map +1 -1
- package/lib/e2e/families/solana.d.ts +2 -2
- package/lib/e2e/families/solana.d.ts.map +1 -1
- package/lib/e2e/families/solana.js +9 -9
- package/lib/e2e/families/solana.js.map +1 -1
- package/lib/e2e/families/stellar.d.ts +1 -1
- package/lib/e2e/families/stellar.d.ts.map +1 -1
- package/lib/e2e/families/stellar.js +5 -5
- package/lib/e2e/families/stellar.js.map +1 -1
- package/lib/e2e/families/sui.d.ts +1 -1
- package/lib/e2e/families/sui.d.ts.map +1 -1
- package/lib/e2e/families/sui.js +5 -5
- package/lib/e2e/families/sui.js.map +1 -1
- package/lib/e2e/families/tezos.d.ts +1 -1
- package/lib/e2e/families/tezos.d.ts.map +1 -1
- package/lib/e2e/families/tezos.js +8 -7
- package/lib/e2e/families/tezos.js.map +1 -1
- package/lib/e2e/families/tron.d.ts +1 -1
- package/lib/e2e/families/tron.d.ts.map +1 -1
- package/lib/e2e/families/tron.js +5 -5
- package/lib/e2e/families/tron.js.map +1 -1
- package/lib/e2e/families/xrp.d.ts +1 -1
- package/lib/e2e/families/xrp.d.ts.map +1 -1
- package/lib/e2e/families/xrp.js +5 -5
- package/lib/e2e/families/xrp.js.map +1 -1
- package/lib/e2e/index.d.ts +0 -15
- package/lib/e2e/index.d.ts.map +1 -1
- package/lib/e2e/speculos.d.ts +11 -11
- package/lib/e2e/speculos.d.ts.map +1 -1
- package/lib/e2e/speculos.js +78 -78
- package/lib/e2e/speculos.js.map +1 -1
- package/lib/exchange/providers/swap.d.ts +0 -1
- package/lib/exchange/providers/swap.d.ts.map +1 -1
- package/lib/exchange/providers/swap.js +1 -5
- package/lib/exchange/providers/swap.js.map +1 -1
- package/lib/exchange/swap/hooks/v5/useFetchCurrencyAll.d.ts.map +1 -1
- package/lib/exchange/swap/hooks/v5/useFetchCurrencyAll.js +3 -2
- package/lib/exchange/swap/hooks/v5/useFetchCurrencyAll.js.map +1 -1
- package/lib/exchange/swap/hooks/v5/useFilteredProviders.d.ts.map +1 -1
- package/lib/exchange/swap/hooks/v5/useFilteredProviders.js +10 -15
- package/lib/exchange/swap/hooks/v5/useFilteredProviders.js.map +1 -1
- package/lib/families/canton/bridge/mock.d.ts.map +1 -1
- package/lib/families/canton/bridge/mock.js +0 -1
- package/lib/families/canton/bridge/mock.js.map +1 -1
- package/lib/families/evm/config.d.ts.map +1 -1
- package/lib/families/evm/config.js +0 -49
- package/lib/families/evm/config.js.map +1 -1
- package/lib/featureFlags/defaultFeatures.d.ts +0 -3
- package/lib/featureFlags/defaultFeatures.d.ts.map +1 -1
- package/lib/featureFlags/defaultFeatures.js +0 -6
- 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/market/hooks/useMarketDataProvider.js +0 -1
- package/lib/market/hooks/useMarketDataProvider.js.map +1 -1
- package/lib/market/utils/types.d.ts +0 -1
- package/lib/market/utils/types.d.ts.map +1 -1
- package/lib/market/utils/types.js.map +1 -1
- package/lib/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.d.ts +22 -0
- package/lib/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.d.ts.map +1 -0
- package/lib/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.js +41 -0
- package/lib/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.js.map +1 -0
- package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.d.ts.map +1 -1
- package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js +0 -11
- package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js.map +1 -1
- package/lib/modularDrawer/hooks/useNetworkAccountCounts.d.ts +5 -1
- package/lib/modularDrawer/hooks/useNetworkAccountCounts.d.ts.map +1 -1
- package/lib/modularDrawer/hooks/useNetworkAccountCounts.js +2 -2
- package/lib/modularDrawer/hooks/useNetworkAccountCounts.js.map +1 -1
- package/lib/modularDrawer/modules/createNetworkConfiguration.d.ts +1 -1
- package/lib/modularDrawer/modules/createNetworkConfiguration.d.ts.map +1 -1
- package/lib/modularDrawer/modules/createNetworkConfiguration.js +2 -1
- package/lib/modularDrawer/modules/createNetworkConfiguration.js.map +1 -1
- package/lib/modularDrawer/utils/currencyUtils.d.ts +10 -0
- package/lib/modularDrawer/utils/currencyUtils.d.ts.map +1 -0
- package/lib/modularDrawer/utils/currencyUtils.js +74 -0
- package/lib/modularDrawer/utils/currencyUtils.js.map +1 -0
- package/lib/modularDrawer/utils/{groupCurrenciesByAsset.d.ts → groupCurrenciesByProvider.d.ts} +2 -2
- package/lib/modularDrawer/utils/groupCurrenciesByProvider.d.ts.map +1 -0
- package/lib/modularDrawer/utils/groupCurrenciesByProvider.js +21 -0
- package/lib/modularDrawer/utils/groupCurrenciesByProvider.js.map +1 -0
- package/lib/modularDrawer/utils/index.d.ts +1 -1
- package/lib/modularDrawer/utils/index.d.ts.map +1 -1
- package/lib/modularDrawer/utils/index.js +3 -3
- package/lib/modularDrawer/utils/index.js.map +1 -1
- package/lib/modularDrawer/utils/type.d.ts +5 -0
- package/lib/modularDrawer/utils/type.d.ts.map +1 -1
- package/lib/platform/filters.d.ts +2 -1
- package/lib/platform/filters.d.ts.map +1 -1
- package/lib/platform/filters.js +17 -1
- package/lib/platform/filters.js.map +1 -1
- package/lib/platform/helpers.d.ts +5 -1
- package/lib/platform/helpers.d.ts.map +1 -1
- package/lib/platform/helpers.js +33 -1
- package/lib/platform/helpers.js.map +1 -1
- package/lib/platform/react.d.ts +3 -2
- package/lib/platform/react.d.ts.map +1 -1
- package/lib/platform/react.js +16 -66
- package/lib/platform/react.js.map +1 -1
- package/lib/platform/types.d.ts +3 -3
- package/lib/platform/types.d.ts.map +1 -1
- package/lib/postOnboarding/reducer.d.ts +0 -2
- package/lib/postOnboarding/reducer.d.ts.map +1 -1
- package/lib/utils/getAccountTuplesForCurrency.d.ts +1 -1
- package/lib/utils/getAccountTuplesForCurrency.d.ts.map +1 -1
- package/lib/utils/getAccountTuplesForCurrency.js +3 -2
- package/lib/utils/getAccountTuplesForCurrency.js.map +1 -1
- package/lib/wallet-api/Exchange/server.d.ts.map +1 -1
- package/lib/wallet-api/Exchange/server.js +4 -5
- package/lib/wallet-api/Exchange/server.js.map +1 -1
- package/lib/wallet-api/converters.d.ts +0 -1
- package/lib/wallet-api/converters.d.ts.map +1 -1
- package/lib/wallet-api/converters.js +2 -7
- package/lib/wallet-api/converters.js.map +1 -1
- package/lib/wallet-api/react.d.ts +11 -6
- package/lib/wallet-api/react.d.ts.map +1 -1
- package/lib/wallet-api/react.js +135 -293
- package/lib/wallet-api/react.js.map +1 -1
- package/lib/wallet-api/tracking.d.ts +0 -6
- package/lib/wallet-api/tracking.d.ts.map +1 -1
- package/lib/wallet-api/tracking.js +0 -20
- package/lib/wallet-api/tracking.js.map +1 -1
- package/lib/wallet-api/types.d.ts +0 -3
- package/lib/wallet-api/types.d.ts.map +1 -1
- package/lib/wallet-api/useDappLogic.d.ts.map +1 -1
- package/lib/wallet-api/useDappLogic.js +80 -65
- package/lib/wallet-api/useDappLogic.js.map +1 -1
- package/lib/wallet-api/utils/deriveAccountIdForManifest.d.ts +0 -6
- package/lib/wallet-api/utils/deriveAccountIdForManifest.d.ts.map +1 -1
- package/lib/wallet-api/utils/deriveAccountIdForManifest.js +3 -13
- package/lib/wallet-api/utils/deriveAccountIdForManifest.js.map +1 -1
- package/lib-es/__tests__/test-helpers/bridge.d.ts.map +1 -1
- package/lib-es/__tests__/test-helpers/bridge.js +4 -0
- package/lib-es/__tests__/test-helpers/bridge.js.map +1 -1
- package/lib-es/__tests__/test-helpers/environment.js +0 -3
- package/lib-es/__tests__/test-helpers/environment.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/getAccountShape.js +11 -13
- package/lib-es/bridge/generic-alpaca/getAccountShape.js.map +1 -1
- package/lib-es/currencies/helpers.d.ts +3 -1
- package/lib-es/currencies/helpers.d.ts.map +1 -1
- package/lib-es/currencies/helpers.js +24 -0
- package/lib-es/currencies/helpers.js.map +1 -1
- package/lib-es/dada-client/hooks/useAssetsData.d.ts +0 -1
- package/lib-es/dada-client/hooks/useAssetsData.d.ts.map +1 -1
- package/lib-es/dada-client/hooks/useAssetsData.js +0 -1
- package/lib-es/dada-client/hooks/useAssetsData.js.map +1 -1
- package/lib-es/deposit/helper.d.ts +8 -0
- package/lib-es/deposit/helper.d.ts.map +1 -0
- package/lib-es/deposit/helper.js +117 -0
- package/lib-es/deposit/helper.js.map +1 -0
- package/lib-es/deposit/index.d.ts +3 -0
- package/lib-es/deposit/index.d.ts.map +1 -0
- package/lib-es/deposit/index.js +3 -0
- package/lib-es/deposit/index.js.map +1 -0
- package/lib-es/deposit/mock.d.ts +75 -0
- package/lib-es/deposit/mock.d.ts.map +1 -0
- package/lib-es/deposit/mock.js +15108 -0
- package/lib-es/deposit/mock.js.map +1 -0
- package/lib-es/deposit/type.d.ts +17 -0
- package/lib-es/deposit/type.d.ts.map +1 -1
- package/lib-es/deposit/type.js.map +1 -1
- package/lib-es/deposit/useGroupedCurrenciesByProvider.hook.d.ts +3 -0
- package/lib-es/deposit/useGroupedCurrenciesByProvider.hook.d.ts.map +1 -0
- package/lib-es/deposit/useGroupedCurrenciesByProvider.hook.js +36 -0
- package/lib-es/deposit/useGroupedCurrenciesByProvider.hook.js.map +1 -0
- package/lib-es/deviceSDK/hooks/useBatteryStatuses.d.ts +1 -2
- package/lib-es/deviceSDK/hooks/useBatteryStatuses.d.ts.map +1 -1
- package/lib-es/deviceSDK/hooks/useBatteryStatuses.js +2 -4
- package/lib-es/deviceSDK/hooks/useBatteryStatuses.js.map +1 -1
- package/lib-es/deviceSDK/tasks/core.d.ts +1 -1
- package/lib-es/deviceSDK/tasks/core.d.ts.map +1 -1
- package/lib-es/deviceSDK/tasks/core.js +1 -1
- package/lib-es/deviceSDK/tasks/core.js.map +1 -1
- package/lib-es/deviceSDK/tasks/getDeviceInfo.d.ts.map +1 -1
- package/lib-es/deviceSDK/tasks/getDeviceInfo.js +0 -2
- package/lib-es/deviceSDK/tasks/getDeviceInfo.js.map +1 -1
- package/lib-es/deviceSDK/tasks/getLatestFirmware.d.ts.map +1 -1
- package/lib-es/deviceSDK/tasks/getLatestFirmware.js +2 -2
- package/lib-es/deviceSDK/tasks/getLatestFirmware.js.map +1 -1
- package/lib-es/deviceSDK/tasks/updateFirmware.d.ts.map +1 -1
- package/lib-es/deviceSDK/tasks/updateFirmware.js +1 -2
- package/lib-es/deviceSDK/tasks/updateFirmware.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/enum/Account.d.ts +1 -0
- package/lib-es/e2e/enum/Account.d.ts.map +1 -1
- package/lib-es/e2e/enum/Account.js +1 -0
- package/lib-es/e2e/enum/Account.js.map +1 -1
- package/lib-es/e2e/enum/Currency.d.ts +1 -0
- package/lib-es/e2e/enum/Currency.d.ts.map +1 -1
- package/lib-es/e2e/enum/Currency.js +6 -2
- package/lib-es/e2e/enum/Currency.js.map +1 -1
- package/lib-es/e2e/families/algorand.d.ts +1 -1
- package/lib-es/e2e/families/algorand.d.ts.map +1 -1
- package/lib-es/e2e/families/algorand.js +4 -5
- package/lib-es/e2e/families/algorand.js.map +1 -1
- package/lib-es/e2e/families/aptos.d.ts +2 -2
- package/lib-es/e2e/families/aptos.d.ts.map +1 -1
- package/lib-es/e2e/families/aptos.js +7 -9
- package/lib-es/e2e/families/aptos.js.map +1 -1
- package/lib-es/e2e/families/bitcoin.d.ts +2 -2
- package/lib-es/e2e/families/bitcoin.d.ts.map +1 -1
- package/lib-es/e2e/families/bitcoin.js +9 -11
- package/lib-es/e2e/families/bitcoin.js.map +1 -1
- package/lib-es/e2e/families/cardano.d.ts +0 -6
- package/lib-es/e2e/families/cardano.d.ts.map +1 -1
- package/lib-es/e2e/families/cardano.js +21 -23
- package/lib-es/e2e/families/cardano.js.map +1 -1
- package/lib-es/e2e/families/celo.d.ts +1 -1
- package/lib-es/e2e/families/celo.d.ts.map +1 -1
- package/lib-es/e2e/families/celo.js +4 -5
- package/lib-es/e2e/families/celo.js.map +1 -1
- package/lib-es/e2e/families/cosmos.d.ts +2 -2
- package/lib-es/e2e/families/cosmos.d.ts.map +1 -1
- package/lib-es/e2e/families/cosmos.js +7 -9
- package/lib-es/e2e/families/cosmos.js.map +1 -1
- package/lib-es/e2e/families/evm.d.ts +0 -2
- package/lib-es/e2e/families/evm.d.ts.map +1 -1
- package/lib-es/e2e/families/evm.js +9 -10
- package/lib-es/e2e/families/evm.js.map +1 -1
- package/lib-es/e2e/families/hedera.d.ts +1 -1
- package/lib-es/e2e/families/hedera.d.ts.map +1 -1
- package/lib-es/e2e/families/hedera.js +4 -5
- package/lib-es/e2e/families/hedera.js.map +1 -1
- package/lib-es/e2e/families/kaspa.d.ts +2 -2
- package/lib-es/e2e/families/kaspa.d.ts.map +1 -1
- package/lib-es/e2e/families/kaspa.js +7 -9
- package/lib-es/e2e/families/kaspa.js.map +1 -1
- package/lib-es/e2e/families/multiversX.d.ts +1 -1
- package/lib-es/e2e/families/multiversX.d.ts.map +1 -1
- package/lib-es/e2e/families/multiversX.js +4 -5
- package/lib-es/e2e/families/multiversX.js.map +1 -1
- package/lib-es/e2e/families/near.d.ts +1 -1
- package/lib-es/e2e/families/near.d.ts.map +1 -1
- package/lib-es/e2e/families/near.js +5 -6
- package/lib-es/e2e/families/near.js.map +1 -1
- package/lib-es/e2e/families/osmosis.d.ts +1 -1
- package/lib-es/e2e/families/osmosis.d.ts.map +1 -1
- package/lib-es/e2e/families/osmosis.js +4 -5
- package/lib-es/e2e/families/osmosis.js.map +1 -1
- package/lib-es/e2e/families/polkadot.d.ts +1 -1
- package/lib-es/e2e/families/polkadot.d.ts.map +1 -1
- package/lib-es/e2e/families/polkadot.js +4 -5
- package/lib-es/e2e/families/polkadot.js.map +1 -1
- package/lib-es/e2e/families/solana.d.ts +2 -2
- package/lib-es/e2e/families/solana.d.ts.map +1 -1
- package/lib-es/e2e/families/solana.js +7 -9
- package/lib-es/e2e/families/solana.js.map +1 -1
- package/lib-es/e2e/families/stellar.d.ts +1 -1
- package/lib-es/e2e/families/stellar.d.ts.map +1 -1
- package/lib-es/e2e/families/stellar.js +4 -5
- package/lib-es/e2e/families/stellar.js.map +1 -1
- package/lib-es/e2e/families/sui.d.ts +1 -1
- package/lib-es/e2e/families/sui.d.ts.map +1 -1
- package/lib-es/e2e/families/sui.js +4 -5
- package/lib-es/e2e/families/sui.js.map +1 -1
- package/lib-es/e2e/families/tezos.d.ts +1 -1
- package/lib-es/e2e/families/tezos.d.ts.map +1 -1
- package/lib-es/e2e/families/tezos.js +8 -8
- package/lib-es/e2e/families/tezos.js.map +1 -1
- package/lib-es/e2e/families/tron.d.ts +1 -1
- package/lib-es/e2e/families/tron.d.ts.map +1 -1
- package/lib-es/e2e/families/tron.js +4 -5
- package/lib-es/e2e/families/tron.js.map +1 -1
- package/lib-es/e2e/families/xrp.d.ts +1 -1
- package/lib-es/e2e/families/xrp.d.ts.map +1 -1
- package/lib-es/e2e/families/xrp.js +4 -5
- package/lib-es/e2e/families/xrp.js.map +1 -1
- package/lib-es/e2e/index.d.ts +0 -15
- package/lib-es/e2e/index.d.ts.map +1 -1
- package/lib-es/e2e/speculos.d.ts +11 -11
- package/lib-es/e2e/speculos.d.ts.map +1 -1
- package/lib-es/e2e/speculos.js +43 -54
- package/lib-es/e2e/speculos.js.map +1 -1
- package/lib-es/exchange/providers/swap.d.ts +0 -1
- package/lib-es/exchange/providers/swap.d.ts.map +1 -1
- package/lib-es/exchange/providers/swap.js +0 -3
- package/lib-es/exchange/providers/swap.js.map +1 -1
- package/lib-es/exchange/swap/hooks/v5/useFetchCurrencyAll.d.ts.map +1 -1
- package/lib-es/exchange/swap/hooks/v5/useFetchCurrencyAll.js +3 -2
- package/lib-es/exchange/swap/hooks/v5/useFetchCurrencyAll.js.map +1 -1
- package/lib-es/exchange/swap/hooks/v5/useFilteredProviders.d.ts.map +1 -1
- package/lib-es/exchange/swap/hooks/v5/useFilteredProviders.js +12 -17
- package/lib-es/exchange/swap/hooks/v5/useFilteredProviders.js.map +1 -1
- package/lib-es/families/canton/bridge/mock.d.ts.map +1 -1
- package/lib-es/families/canton/bridge/mock.js +0 -1
- package/lib-es/families/canton/bridge/mock.js.map +1 -1
- package/lib-es/families/evm/config.d.ts.map +1 -1
- package/lib-es/families/evm/config.js +0 -49
- package/lib-es/families/evm/config.js.map +1 -1
- package/lib-es/featureFlags/defaultFeatures.d.ts +0 -3
- package/lib-es/featureFlags/defaultFeatures.d.ts.map +1 -1
- package/lib-es/featureFlags/defaultFeatures.js +0 -6
- 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/market/hooks/useMarketDataProvider.js +0 -1
- package/lib-es/market/hooks/useMarketDataProvider.js.map +1 -1
- package/lib-es/market/utils/types.d.ts +0 -1
- package/lib-es/market/utils/types.d.ts.map +1 -1
- package/lib-es/market/utils/types.js.map +1 -1
- package/lib-es/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.d.ts +22 -0
- package/lib-es/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.d.ts.map +1 -0
- package/lib-es/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.js +38 -0
- package/lib-es/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.js.map +1 -0
- package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.d.ts.map +1 -1
- package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js +0 -11
- package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js.map +1 -1
- package/lib-es/modularDrawer/hooks/useNetworkAccountCounts.d.ts +5 -1
- package/lib-es/modularDrawer/hooks/useNetworkAccountCounts.d.ts.map +1 -1
- package/lib-es/modularDrawer/hooks/useNetworkAccountCounts.js +2 -2
- package/lib-es/modularDrawer/hooks/useNetworkAccountCounts.js.map +1 -1
- package/lib-es/modularDrawer/modules/createNetworkConfiguration.d.ts +1 -1
- package/lib-es/modularDrawer/modules/createNetworkConfiguration.d.ts.map +1 -1
- package/lib-es/modularDrawer/modules/createNetworkConfiguration.js +2 -1
- package/lib-es/modularDrawer/modules/createNetworkConfiguration.js.map +1 -1
- package/lib-es/modularDrawer/utils/currencyUtils.d.ts +10 -0
- package/lib-es/modularDrawer/utils/currencyUtils.d.ts.map +1 -0
- package/lib-es/modularDrawer/utils/currencyUtils.js +65 -0
- package/lib-es/modularDrawer/utils/currencyUtils.js.map +1 -0
- package/lib-es/modularDrawer/utils/{groupCurrenciesByAsset.d.ts → groupCurrenciesByProvider.d.ts} +2 -2
- package/lib-es/modularDrawer/utils/groupCurrenciesByProvider.d.ts.map +1 -0
- package/lib-es/modularDrawer/utils/{groupCurrenciesByAsset.js → groupCurrenciesByProvider.js} +6 -6
- package/lib-es/modularDrawer/utils/groupCurrenciesByProvider.js.map +1 -0
- package/lib-es/modularDrawer/utils/index.d.ts +1 -1
- package/lib-es/modularDrawer/utils/index.d.ts.map +1 -1
- package/lib-es/modularDrawer/utils/index.js +1 -1
- package/lib-es/modularDrawer/utils/index.js.map +1 -1
- package/lib-es/modularDrawer/utils/type.d.ts +5 -0
- package/lib-es/modularDrawer/utils/type.d.ts.map +1 -1
- package/lib-es/platform/filters.d.ts +2 -1
- package/lib-es/platform/filters.d.ts.map +1 -1
- package/lib-es/platform/filters.js +15 -0
- package/lib-es/platform/filters.js.map +1 -1
- package/lib-es/platform/helpers.d.ts +5 -1
- package/lib-es/platform/helpers.d.ts.map +1 -1
- package/lib-es/platform/helpers.js +30 -1
- package/lib-es/platform/helpers.js.map +1 -1
- package/lib-es/platform/react.d.ts +3 -2
- package/lib-es/platform/react.d.ts.map +1 -1
- package/lib-es/platform/react.js +16 -67
- package/lib-es/platform/react.js.map +1 -1
- package/lib-es/platform/types.d.ts +3 -3
- package/lib-es/platform/types.d.ts.map +1 -1
- package/lib-es/postOnboarding/reducer.d.ts +0 -2
- package/lib-es/postOnboarding/reducer.d.ts.map +1 -1
- package/lib-es/utils/getAccountTuplesForCurrency.d.ts +1 -1
- package/lib-es/utils/getAccountTuplesForCurrency.d.ts.map +1 -1
- package/lib-es/utils/getAccountTuplesForCurrency.js +3 -2
- package/lib-es/utils/getAccountTuplesForCurrency.js.map +1 -1
- package/lib-es/wallet-api/Exchange/server.d.ts.map +1 -1
- package/lib-es/wallet-api/Exchange/server.js +4 -5
- package/lib-es/wallet-api/Exchange/server.js.map +1 -1
- package/lib-es/wallet-api/converters.d.ts +0 -1
- package/lib-es/wallet-api/converters.d.ts.map +1 -1
- package/lib-es/wallet-api/converters.js +1 -5
- package/lib-es/wallet-api/converters.js.map +1 -1
- package/lib-es/wallet-api/react.d.ts +11 -6
- package/lib-es/wallet-api/react.d.ts.map +1 -1
- package/lib-es/wallet-api/react.js +131 -291
- package/lib-es/wallet-api/react.js.map +1 -1
- package/lib-es/wallet-api/tracking.d.ts +0 -6
- package/lib-es/wallet-api/tracking.d.ts.map +1 -1
- package/lib-es/wallet-api/tracking.js +0 -20
- package/lib-es/wallet-api/tracking.js.map +1 -1
- package/lib-es/wallet-api/types.d.ts +0 -3
- package/lib-es/wallet-api/types.d.ts.map +1 -1
- package/lib-es/wallet-api/useDappLogic.d.ts.map +1 -1
- package/lib-es/wallet-api/useDappLogic.js +77 -62
- package/lib-es/wallet-api/useDappLogic.js.map +1 -1
- package/lib-es/wallet-api/utils/deriveAccountIdForManifest.d.ts +0 -6
- package/lib-es/wallet-api/utils/deriveAccountIdForManifest.d.ts.map +1 -1
- package/lib-es/wallet-api/utils/deriveAccountIdForManifest.js +2 -11
- package/lib-es/wallet-api/utils/deriveAccountIdForManifest.js.map +1 -1
- package/package.json +58 -59
- package/src/__tests__/migration/account-migration.ts +0 -3
- package/src/__tests__/test-helpers/bridge.ts +2 -0
- package/src/__tests__/test-helpers/environment.ts +0 -3
- package/src/bridge/generic-alpaca/getAccountShape.ts +12 -15
- package/src/bridge/generic-alpaca/tests/getAccountShape.test.ts +101 -142
- package/src/currencies/helpers.test.ts +20 -0
- package/src/currencies/helpers.ts +42 -1
- package/src/dada-client/hooks/useAssetsData.ts +0 -1
- package/src/deposit/deposit.integration.test.ts +88 -0
- package/src/deposit/deposit.test.ts +684 -0
- package/src/deposit/helper.ts +143 -0
- package/src/deposit/index.ts +3 -0
- package/src/deposit/mock.ts +15112 -0
- package/src/deposit/type.ts +21 -0
- package/src/deposit/useGroupedCurrenciesByProvider.hook.ts +46 -0
- package/src/deviceSDK/hooks/useBatteryStatuses.test.ts +1 -3
- package/src/deviceSDK/hooks/useBatteryStatuses.ts +1 -4
- package/src/deviceSDK/tasks/core.test.ts +0 -20
- package/src/deviceSDK/tasks/core.ts +1 -2
- package/src/deviceSDK/tasks/getDeviceInfo.ts +0 -2
- package/src/deviceSDK/tasks/getLatestFirmware.ts +4 -4
- package/src/deviceSDK/tasks/updateFirmware.ts +0 -2
- package/src/e2e/deviceInteraction/ButtonDeviceSimulator.ts +23 -0
- package/src/e2e/enum/Account.ts +6 -0
- package/src/e2e/enum/Currency.ts +6 -2
- package/src/e2e/families/algorand.ts +13 -20
- package/src/e2e/families/aptos.ts +16 -28
- package/src/e2e/families/bitcoin.ts +39 -53
- package/src/e2e/families/cardano.ts +36 -47
- package/src/e2e/families/celo.ts +12 -18
- package/src/e2e/families/cosmos.ts +23 -35
- package/src/e2e/families/evm.ts +13 -24
- package/src/e2e/families/hedera.ts +4 -6
- package/src/e2e/families/kaspa.ts +16 -28
- package/src/e2e/families/multiversX.ts +10 -16
- package/src/e2e/families/near.ts +17 -23
- package/src/e2e/families/osmosis.ts +13 -19
- package/src/e2e/families/polkadot.ts +13 -19
- package/src/e2e/families/solana.ts +23 -35
- package/src/e2e/families/stellar.ts +13 -18
- package/src/e2e/families/sui.ts +9 -15
- package/src/e2e/families/tezos.ts +18 -25
- package/src/e2e/families/tron.ts +13 -19
- package/src/e2e/families/xrp.ts +13 -19
- package/src/e2e/speculos.ts +140 -168
- package/src/exchange/providers/swap.ts +0 -4
- package/src/exchange/swap/hooks/v5/useFetchCurrencyAll.ts +3 -2
- package/src/exchange/swap/hooks/v5/useFilteredProviders.ts +12 -37
- package/src/families/canton/bridge/mock.ts +0 -1
- package/src/families/evm/config.ts +0 -49
- package/src/families/stellar/__snapshots__/bridge.integration.test.ts.snap +12 -84
- package/src/featureFlags/defaultFeatures.ts +0 -6
- package/src/market/hooks/useMarketDataProvider.ts +0 -1
- package/src/market/utils/types.ts +0 -1
- package/src/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.ts +49 -0
- package/src/modularDrawer/hooks/__test__/useAssetAccountCounts.test.ts +5 -0
- package/src/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.ts +0 -11
- package/src/modularDrawer/hooks/useNetworkAccountCounts.tsx +6 -1
- package/src/modularDrawer/modules/__test__/createAssetConfiguration.test.tsx +2 -2
- package/src/modularDrawer/modules/__test__/createNetworkConfiguration.test.ts +342 -0
- package/src/modularDrawer/modules/createNetworkConfiguration.ts +2 -1
- package/src/modularDrawer/utils/__tests__/currencyUtils.test.ts +126 -0
- package/src/modularDrawer/utils/currencyUtils.ts +95 -0
- package/src/modularDrawer/utils/{groupCurrenciesByAsset.ts → groupCurrenciesByProvider.ts} +5 -5
- package/src/modularDrawer/utils/index.ts +1 -1
- package/src/modularDrawer/utils/type.ts +5 -0
- package/src/platform/filters.ts +23 -1
- package/src/platform/helpers.ts +49 -2
- package/src/platform/react.ts +22 -86
- package/src/platform/types.ts +1 -1
- package/src/utils/__tests__/getAccountTuplesForCurrency.test.ts +30 -0
- package/src/utils/getAccountTuplesForCurrency.ts +6 -1
- package/src/wallet-api/Exchange/server.test.ts +5 -0
- package/src/wallet-api/Exchange/server.ts +6 -7
- package/src/wallet-api/converters.ts +1 -6
- package/src/wallet-api/react.ts +137 -312
- package/src/wallet-api/tracking.ts +0 -22
- package/src/wallet-api/types.ts +0 -5
- package/src/wallet-api/useDappLogic.ts +106 -91
- package/src/wallet-api/utils/deriveAccountIdForManifest.ts +2 -14
- package/lib/device/use-cases/getDeviceHasBattery.d.ts +0 -2
- package/lib/device/use-cases/getDeviceHasBattery.d.ts.map +0 -1
- package/lib/device/use-cases/getDeviceHasBattery.js +0 -6
- package/lib/device/use-cases/getDeviceHasBattery.js.map +0 -1
- package/lib/e2e/deviceInteraction/DeviceController.d.ts +0 -41
- package/lib/e2e/deviceInteraction/DeviceController.d.ts.map +0 -1
- package/lib/e2e/deviceInteraction/DeviceController.js +0 -68
- package/lib/e2e/deviceInteraction/DeviceController.js.map +0 -1
- package/lib/e2e/enum/ReceiveFundsOptions.d.ts +0 -6
- package/lib/e2e/enum/ReceiveFundsOptions.d.ts.map +0 -1
- package/lib/e2e/enum/ReceiveFundsOptions.js +0 -8
- package/lib/e2e/enum/ReceiveFundsOptions.js.map +0 -1
- package/lib/families/canton/react.d.ts +0 -15
- package/lib/families/canton/react.d.ts.map +0 -1
- package/lib/families/canton/react.js +0 -14
- package/lib/families/canton/react.js.map +0 -1
- package/lib/modularDrawer/utils/groupCurrenciesByAsset.d.ts.map +0 -1
- package/lib/modularDrawer/utils/groupCurrenciesByAsset.js +0 -21
- package/lib/modularDrawer/utils/groupCurrenciesByAsset.js.map +0 -1
- package/lib-es/device/use-cases/getDeviceHasBattery.d.ts +0 -2
- package/lib-es/device/use-cases/getDeviceHasBattery.d.ts.map +0 -1
- package/lib-es/device/use-cases/getDeviceHasBattery.js +0 -2
- package/lib-es/device/use-cases/getDeviceHasBattery.js.map +0 -1
- package/lib-es/e2e/deviceInteraction/DeviceController.d.ts +0 -41
- package/lib-es/e2e/deviceInteraction/DeviceController.d.ts.map +0 -1
- package/lib-es/e2e/deviceInteraction/DeviceController.js +0 -63
- package/lib-es/e2e/deviceInteraction/DeviceController.js.map +0 -1
- package/lib-es/e2e/enum/ReceiveFundsOptions.d.ts +0 -6
- package/lib-es/e2e/enum/ReceiveFundsOptions.d.ts.map +0 -1
- package/lib-es/e2e/enum/ReceiveFundsOptions.js +0 -5
- package/lib-es/e2e/enum/ReceiveFundsOptions.js.map +0 -1
- package/lib-es/families/canton/react.d.ts +0 -15
- package/lib-es/families/canton/react.d.ts.map +0 -1
- package/lib-es/families/canton/react.js +0 -10
- package/lib-es/families/canton/react.js.map +0 -1
- package/lib-es/modularDrawer/utils/groupCurrenciesByAsset.d.ts.map +0 -1
- package/lib-es/modularDrawer/utils/groupCurrenciesByAsset.js.map +0 -1
- package/src/device/use-cases/getDeviceHasBattery.ts +0 -1
- package/src/e2e/deviceInteraction/DeviceController.ts +0 -85
- package/src/e2e/enum/ReceiveFundsOptions.ts +0 -7
- package/src/families/canton/react.ts +0 -50
- package/src/modularDrawer/utils/__tests__/groupCurrenciesByAsset.test.ts +0 -88
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { getTokenOrCryptoCurrencyById } from "../../deposit/helper";
|
|
2
|
+
import { isTokenCurrency } from "../../currencies";
|
|
3
|
+
export const safeCurrencyLookup = async (id) => {
|
|
4
|
+
try {
|
|
5
|
+
return await getTokenOrCryptoCurrencyById(id);
|
|
6
|
+
}
|
|
7
|
+
catch {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
export const isProviderToken = (currency, providerId) => {
|
|
12
|
+
return isTokenCurrency(currency) && currency.id.toLowerCase().includes(providerId.toLowerCase());
|
|
13
|
+
};
|
|
14
|
+
export const getProviderCurrency = async (provider) => {
|
|
15
|
+
const providerToken = provider.currenciesByNetwork.find(currency => {
|
|
16
|
+
return isProviderToken(currency, provider.providerId);
|
|
17
|
+
});
|
|
18
|
+
if (providerToken) {
|
|
19
|
+
return providerToken;
|
|
20
|
+
}
|
|
21
|
+
const lookupResult = await safeCurrencyLookup(provider.providerId);
|
|
22
|
+
return lookupResult ?? provider.currenciesByNetwork[0];
|
|
23
|
+
};
|
|
24
|
+
export const buildProviderCoverageMap = (providers) => {
|
|
25
|
+
const providerIdToCoveringProviders = new Map();
|
|
26
|
+
for (const { providerId, currenciesByNetwork } of providers) {
|
|
27
|
+
for (const { id } of currenciesByNetwork) {
|
|
28
|
+
if (!providerIdToCoveringProviders.has(id)) {
|
|
29
|
+
providerIdToCoveringProviders.set(id, new Set());
|
|
30
|
+
}
|
|
31
|
+
providerIdToCoveringProviders.get(id).add(providerId);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return providerIdToCoveringProviders;
|
|
35
|
+
};
|
|
36
|
+
export const filterProvidersByIds = (providers, currencyIdsSet, providerCoverageMap) => {
|
|
37
|
+
const filtered = [];
|
|
38
|
+
for (const provider of providers) {
|
|
39
|
+
const filteredCurrencies = provider.currenciesByNetwork.filter(currency => currencyIdsSet.has(currency.id));
|
|
40
|
+
if (filteredCurrencies.length === 0)
|
|
41
|
+
continue;
|
|
42
|
+
const providerHasOwnCurrency = provider.currenciesByNetwork.some(currency => currency.id === provider.providerId);
|
|
43
|
+
if (!providerHasOwnCurrency) {
|
|
44
|
+
const coveringProviders = providerCoverageMap.get(provider.providerId);
|
|
45
|
+
const isProviderIdCoveredElsewhere = coveringProviders && coveringProviders.size > 1;
|
|
46
|
+
if (isProviderIdCoveredElsewhere)
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
if (filteredCurrencies.length === provider.currenciesByNetwork.length) {
|
|
50
|
+
filtered.push(provider);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
filtered.push({
|
|
54
|
+
...provider,
|
|
55
|
+
currenciesByNetwork: filteredCurrencies,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return filtered;
|
|
60
|
+
};
|
|
61
|
+
export const extractProviderCurrencies = async (providers) => {
|
|
62
|
+
const currencies = await Promise.all(providers.map(provider => getProviderCurrency(provider)));
|
|
63
|
+
return currencies.filter((currency) => currency !== null);
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=currencyUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"currencyUtils.js","sourceRoot":"","sources":["../../../src/modularDrawer/utils/currencyUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAKnD,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,EAAE,EAAU,EAAyC,EAAE;IAC5F,IAAI;QACF,OAAO,MAAM,4BAA4B,CAAC,EAAE,CAAC,CAAC;KAC/C;IAAC,MAAM;QACN,OAAO,IAAI,CAAC;KACb;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,QAA+B,EAAE,UAAkB,EAAW,EAAE;IAC9F,OAAO,eAAe,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC;AACnG,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,KAAK,EACtC,QAAgC,EACO,EAAE;IACzC,MAAM,aAAa,GAAG,Q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etData } from "./type";
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const groupCurrenciesByProvider: (assetsSorted: AssetData[]) => Map<string, {
|
|
4
4
|
mainCurrency: CryptoOrTokenCurrency;
|
|
5
5
|
currencies: CryptoOrTokenCurrency[];
|
|
6
6
|
}>;
|
|
7
|
-
//# sourceMappingURL=
|
|
7
|
+
//# sourceMappingURL=groupCurrenciesByProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"groupCurrenciesByProvider.d.ts","sourceRoot":"","sources":["../../../src/modularDrawer/utils/groupCurrenciesByProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,eAAO,MAAM,yBAAyB,iBAAkB,SAAS,EAAE;kBAG/C,qBAAqB;gBAAc,qBAAqB,EAAE;EAoB7E,CAAC"}
|
package/lib-es/modularDrawer/utils/{groupCurrenciesByAsset.js → groupCurrenciesByProvider.js}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export const
|
|
1
|
+
export const groupCurrenciesByProvider = (assetsSorted) => {
|
|
2
2
|
const assetMap = new Map();
|
|
3
3
|
if (assetsSorted) {
|
|
4
4
|
for (const item of assetsSorted) {
|
|
5
|
-
const { asset: { id:
|
|
6
|
-
if (networks
|
|
7
|
-
const mainCurrency = networks.find(c => c.id ===
|
|
8
|
-
assetMap.set(
|
|
5
|
+
const { asset: { id: providerId }, networks = [], } = item;
|
|
6
|
+
if (networks.length > 0) {
|
|
7
|
+
const mainCurrency = networks.find(c => c.id === providerId) ?? networks[0];
|
|
8
|
+
assetMap.set(providerId, {
|
|
9
9
|
mainCurrency,
|
|
10
10
|
currencies: networks,
|
|
11
11
|
});
|
|
@@ -14,4 +14,4 @@ export const groupCurrenciesByAsset = (assetsSorted) => {
|
|
|
14
14
|
}
|
|
15
15
|
return assetMap;
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=
|
|
17
|
+
//# sourceMappingURL=groupCurrenciesByProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"groupCurrenciesByProvider.js","sourceRoot":"","sources":["../../../src/modularDrawer/utils/groupCurrenciesByProvider.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,YAAyB,EAAE,EAAE;IACrE,MAAM,QAAQ,GAAG,IAAI,GAAG,EAGrB,CAAC;IAEJ,IAAI,YAAY,EAAE;QAChB,KAAK,MAAM,IAAI,IAAI,YAAY,EAAE;YAC/B,MAAM,EACJ,KAAK,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,EACzB,QAAQ,GAAG,EAAE,GACd,GAAG,IAAI,CAAC;YACT,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;gBACvB,MAAM,YAAY,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,UAAU,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC;gBAC5E,QAAQ,CAAC,GAAG,CAAC,UAAU,EAAE;oBACvB,YAAY;oBACZ,UAAU,EAAE,QAAQ;iBACrB,CAAC,CAAC;aACJ;SACF;KACF;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CryptoOrTokenCurrency } from "@ledgerhq/types-cryptoassets";
|
|
2
|
-
export {
|
|
2
|
+
export { groupCurrenciesByProvider } from "./groupCurrenciesByProvider";
|
|
3
3
|
export { sortAccountsByFiatValue } from "./sortAccountsByFiatValue";
|
|
4
4
|
declare const getBaseId: (currency: CryptoOrTokenCurrency) => string;
|
|
5
5
|
declare function belongsToSameNetwork(elem: CryptoOrTokenCurrency, network: CryptoOrTokenCurrency): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modularDrawer/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modularDrawer/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,QAAA,MAAM,SAAS,aAAc,qBAAqB,WAC6B,CAAC;AAEhF,iBAAS,oBAAoB,CAC3B,IAAI,EAAE,qBAAqB,EAC3B,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAET;AACD,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { groupCurrenciesByProvider } from "./groupCurrenciesByProvider";
|
|
2
2
|
export { sortAccountsByFiatValue } from "./sortAccountsByFiatValue";
|
|
3
3
|
const getBaseId = (currency) => currency.type === "CryptoCurrency" ? currency.id : currency.parentCurrency.id;
|
|
4
4
|
function belongsToSameNetwork(elem, network) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modularDrawer/utils/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modularDrawer/utils/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,MAAM,SAAS,GAAG,CAAC,QAA+B,EAAE,EAAE,CACpD,QAAQ,CAAC,IAAI,KAAK,gBAAgB,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC;AAEhF,SAAS,oBAAoB,CAC3B,IAA2B,EAC3B,OAA8B;IAE9B,OAAO,SAAS,CAAC,IAAI,CAAC,KAAK,SAAS,CAAC,OAAO,CAAC,CAAC;AAChD,CAAC;AACD,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -2,6 +2,8 @@ import { CounterValuesState } from "@ledgerhq/live-countervalues/lib/types";
|
|
|
2
2
|
import { CryptoOrTokenCurrency, Currency, Unit } from "@ledgerhq/types-cryptoassets";
|
|
3
3
|
import { AccountLike } from "@ledgerhq/types-live";
|
|
4
4
|
import { ReactNode } from "react";
|
|
5
|
+
import { Observable } from "rxjs";
|
|
6
|
+
import { WalletAPIAccount } from "../../wallet-api/types";
|
|
5
7
|
import { EnhancedModularDrawerConfiguration } from "../../wallet-api/ModularDrawer/types";
|
|
6
8
|
import { InterestRate } from "../../dada-client/entities";
|
|
7
9
|
import { MarketItemResponse } from "../../market/utils/types";
|
|
@@ -57,6 +59,7 @@ export type AccountDataItem = {
|
|
|
57
59
|
};
|
|
58
60
|
export type AccountModuleParams = {
|
|
59
61
|
networks: CryptoOrTokenCurrency[];
|
|
62
|
+
accounts$?: Observable<WalletAPIAccount[]>;
|
|
60
63
|
};
|
|
61
64
|
export type CreateAccountsCount = (args: {
|
|
62
65
|
label: string;
|
|
@@ -64,6 +67,7 @@ export type CreateAccountsCount = (args: {
|
|
|
64
67
|
export type UseAccountData = (params: AccountModuleParams) => AccountDataItem[];
|
|
65
68
|
export type NetworkHookParams = {
|
|
66
69
|
networks: CryptoOrTokenCurrency[];
|
|
70
|
+
accounts$?: Observable<WalletAPIAccount[]>;
|
|
67
71
|
};
|
|
68
72
|
export type NetworkHook = (params: NetworkHookParams) => Array<{
|
|
69
73
|
balanceData?: BalanceUI;
|
|
@@ -89,6 +93,7 @@ export type Network = {
|
|
|
89
93
|
};
|
|
90
94
|
export type CreateNetworkConfigurationHookProps = {
|
|
91
95
|
networksConfig: EnhancedModularDrawerConfiguration["networks"];
|
|
96
|
+
accounts$?: Observable<WalletAPIAccount[]>;
|
|
92
97
|
};
|
|
93
98
|
type Props = {
|
|
94
99
|
assetsConfiguration: EnhancedModularDrawerConfiguration["assets"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/modularDrawer/utils/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACrF,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAExD,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,M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CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AppPlatform, PlatformAccount } from "./types";
|
|
1
|
+
import { AppPlatform, PlatformAccount, PlatformCurrency } from "./types";
|
|
2
2
|
export type FilterParams = {
|
|
3
3
|
branches?: string[];
|
|
4
4
|
platform?: AppPlatform;
|
|
@@ -15,4 +15,5 @@ export type CurrencyFilters = {
|
|
|
15
15
|
includeTokens?: boolean;
|
|
16
16
|
currencies?: string[];
|
|
17
17
|
};
|
|
18
|
+
export declare function filterPlatformCurrencies(currencies: PlatformCurrency[], filters: CurrencyFilters): PlatformCurrency[];
|
|
18
19
|
//# sourceMappingURL=filters.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filters.d.ts","sourceRoot":"","sources":["../../src/platform/filters.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"filters.d.ts","sourceRoot":"","sources":["../../src/platform/filters.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAGzE,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,CAAC,EAAE,WAAW,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAEF,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EAAE,EAC3B,OAAO,EAAE,cAAc,GACtB,eAAe,EAAE,CAcnB;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAEF,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,gBAAgB,EAAE,EAC9B,OAAO,EAAE,eAAe,GACvB,gBAAgB,EAAE,CAgBpB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { makeRe } from "minimatch";
|
|
2
|
+
import { isPlatformTokenCurrency } from "./helpers";
|
|
2
3
|
export function filterPlatformAccounts(accounts, filters) {
|
|
3
4
|
const filterCurrencyRegexes = filters.currencies
|
|
4
5
|
? filters.currencies.map(filter => makeRe(filter))
|
|
@@ -11,4 +12,18 @@ export function filterPlatformAccounts(accounts, filters) {
|
|
|
11
12
|
return true;
|
|
12
13
|
});
|
|
13
14
|
}
|
|
15
|
+
export function filterPlatformCurrencies(currencies, filters) {
|
|
16
|
+
const filterCurrencyRegexes = filters.currencies
|
|
17
|
+
? filters.currencies.map(filter => makeRe(filter))
|
|
18
|
+
: null;
|
|
19
|
+
return currencies.filter(currency => {
|
|
20
|
+
if (!filters.includeTokens && isPlatformTokenCurrency(currency)) {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
if (filterCurrencyRegexes && !filterCurrencyRegexes.some(regex => currency.id.match(regex))) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
return true;
|
|
27
|
+
});
|
|
28
|
+
}
|
|
14
29
|
//# sourceMappingURL=filters.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filters.js","sourceRoot":"","sources":["../../src/platform/filters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"filters.js","sourceRoot":"","sources":["../../src/platform/filters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,OAAO,EAAE,uBAAuB,EA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types-cryptoassets";
|
|
1
|
+
import { CryptoOrTokenCurrency, Currency } from "@ledgerhq/types-cryptoassets";
|
|
2
2
|
import { PlatformCurrency, PlatformSupportedCurrency, PlatformERC20TokenCurrency, PlatformCryptoCurrency } from "./types";
|
|
3
|
+
import { CurrencyFilters } from "./filters";
|
|
3
4
|
export declare function isPlatformSupportedCurrency(currency: Currency): currency is PlatformSupportedCurrency;
|
|
4
5
|
export declare function isPlatformCryptoCurrency(currency: PlatformCurrency): currency is PlatformCryptoCurrency;
|
|
6
|
+
export declare function isPlatformTokenCurrency(currency: PlatformCurrency): currency is PlatformERC20TokenCurrency;
|
|
5
7
|
export declare function isPlatformERC20TokenCurrency(currency: PlatformCurrency): currency is PlatformERC20TokenCurrency;
|
|
8
|
+
export declare function filterCurrencies(currencies: PlatformSupportedCurrency[], filters: CurrencyFilters): CryptoOrTokenCurrency[];
|
|
9
|
+
export declare function listAndFilterCurrencies({ includeTokens, currencies, }: CurrencyFilters): CryptoOrTokenCurrency[];
|
|
6
10
|
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/platform/helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/platform/helpers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EACL,gBAAgB,EAChB,yBAAyB,EACzB,0BAA0B,EAC1B,sBAAsB,EAGvB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5C,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,QAAQ,GACjB,QAAQ,IAAI,yBAAyB,CAQvC;AAED,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,gBAAgB,GACzB,QAAQ,IAAI,sBAAsB,CAEpC;AAED,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,gBAAgB,GACzB,QAAQ,IAAI,0BAA0B,CAExC;AAED,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,gBAAgB,GACzB,QAAQ,IAAI,0BAA0B,CAExC;AAED,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,yBAAyB,EAAE,EACvC,OAAO,EAAE,eAAe,GACvB,qBAAqB,EAAE,CAoBzB;AAED,wBAAgB,uBAAuB,CAAC,EACtC,aAAqB,EACrB,UAAU,GACX,EAAE,eAAe,GAAG,qBAAqB,EAAE,CAS3C"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { makeRe } from "minimatch";
|
|
2
|
+
import { isCryptoCurrency, isTokenCurrency, listCurrencies } from "../currencies";
|
|
2
3
|
import { PlatformCurrencyType, PLATFORM_FAMILIES, } from "./types";
|
|
3
4
|
import { includes } from "../helpers";
|
|
4
5
|
export function isPlatformSupportedCurrency(currency) {
|
|
@@ -13,7 +14,35 @@ export function isPlatformSupportedCurrency(currency) {
|
|
|
13
14
|
export function isPlatformCryptoCurrency(currency) {
|
|
14
15
|
return currency.type === PlatformCurrencyType.CryptoCurrency;
|
|
15
16
|
}
|
|
17
|
+
export function isPlatformTokenCurrency(currency) {
|
|
18
|
+
return currency.type === PlatformCurrencyType.TokenCurrency;
|
|
19
|
+
}
|
|
16
20
|
export function isPlatformERC20TokenCurrency(currency) {
|
|
17
21
|
return currency.standard === "ERC20";
|
|
18
22
|
}
|
|
23
|
+
export function filterCurrencies(currencies, filters) {
|
|
24
|
+
const filterCurrencyRegexes = filters.currencies
|
|
25
|
+
? filters.currencies.map(filter => makeRe(filter))
|
|
26
|
+
: null;
|
|
27
|
+
return currencies.filter(currency => {
|
|
28
|
+
if (!filters.includeTokens && isTokenCurrency(currency)) {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
if (filterCurrencyRegexes &&
|
|
32
|
+
filterCurrencyRegexes.length &&
|
|
33
|
+
!filterCurrencyRegexes.some(regex => currency.id.match(regex))) {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
return true;
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
export function listAndFilterCurrencies({ includeTokens = false, currencies, }) {
|
|
40
|
+
// We removed the filtering with `isPlatformSupportedCurrency`
|
|
41
|
+
// As we want to show all the currencies in the requestAccount drawer
|
|
42
|
+
const allCurrencies = listCurrencies(includeTokens);
|
|
43
|
+
return filterCurrencies(allCurrencies, {
|
|
44
|
+
includeTokens,
|
|
45
|
+
currencies,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
19
48
|
//# sourceMappingURL=helpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/platform/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/platform/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAElF,OAAO,EAKL,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,MAAM,UAAU,2BAA2B,CACzC,QAAkB;IAElB,IAAI,gBAAgB,CAAC,QAAQ,CAAC,EAAE;QAC9B,OAAO,QAAQ,CAAC,iBAAiB,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;KACrD;IACD,IAAI,eAAe,CAAC,QAAQ,CAAC,EAAE;QAC7B,OAAO,QAAQ,CAAC,iBAAiB,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;KACpE;IACD,OAAO,KAAK,CAAC;A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AACL,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AccountLike } from "@ledgerhq/types-live";
|
|
2
|
-
import { ListPlatformAccount, ListPlatformCurrency, LiveAppManifest, PlatformAccount } from "./types";
|
|
2
|
+
import { ListPlatformAccount, ListPlatformCurrency, PlatformCurrency, LiveAppManifest, PlatformAccount } from "./types";
|
|
3
3
|
import { WalletState } from "@ledgerhq/live-wallet/store";
|
|
4
4
|
/**
|
|
5
5
|
* TODO: we might want to use "searchParams.append" instead of "searchParams.set"
|
|
@@ -10,5 +10,6 @@ import { WalletState } from "@ledgerhq/live-wallet/store";
|
|
|
10
10
|
export declare function usePlatformUrl(manifest: LiveAppManifest, inputs?: Record<string, string | undefined>): URL;
|
|
11
11
|
export declare function usePlatformAccounts(walletState: WalletState, accounts: AccountLike[]): PlatformAccount[];
|
|
12
12
|
export declare function useListPlatformAccounts(walletState: WalletState, accounts: AccountLike[]): ListPlatformAccount;
|
|
13
|
-
export declare function
|
|
13
|
+
export declare function usePlatformCurrencies(): PlatformCurrency[];
|
|
14
|
+
export declare function useListPlatformCurrencies(): ListPlatformCurrency;
|
|
14
15
|
//# sourceMappingURL=react.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../src/platform/react.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../src/platform/react.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AASnD,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,eAAe,EAChB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,eAAe,EACzB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GAC1C,GAAG,CAmBL;AAED,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,WAAW,EAAE,GACtB,eAAe,EAAE,CAQnB;AAED,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,WAAW,EAAE,GACtB,mBAAmB,CAQrB;AAED,wBAAgB,qBAAqB,IAAI,gBAAgB,EAAE,CAS1D;AAED,wBAAgB,yBAAyB,IAAI,oBAAoB,CAShE"}
|
package/lib-es/platform/react.js
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { useCallback, useMemo } from "react";
|
|
2
|
-
import { useDispatch } from "react-redux";
|
|
3
|
-
import { makeRe } from "minimatch";
|
|
4
|
-
import { endpoints as calEndpoints } from "@ledgerhq/cryptoassets/cal-client/state-manager/api";
|
|
5
2
|
import { accountToPlatformAccount, currencyToPlatformCurrency } from "./converters";
|
|
6
|
-
import { filterPlatformAccounts } from "./filters";
|
|
3
|
+
import { filterPlatformAccounts, filterPlatformCurrencies, } from "./filters";
|
|
7
4
|
import { isPlatformSupportedCurrency } from "./helpers";
|
|
8
5
|
import { getParentAccount } from "../account";
|
|
9
|
-
import {
|
|
6
|
+
import { listCurrencies } from "../currencies";
|
|
10
7
|
/**
|
|
11
8
|
* TODO: we might want to use "searchParams.append" instead of "searchParams.set"
|
|
12
9
|
* to handle duplicated query params (example: "?foo=bar&foo=baz")
|
|
@@ -44,68 +41,20 @@ export function useListPlatformAccounts(walletState, accounts) {
|
|
|
44
41
|
return filterPlatformAccounts(platformAccounts, filters);
|
|
45
42
|
}, [platformAccounts]);
|
|
46
43
|
}
|
|
47
|
-
export function
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
: null;
|
|
53
|
-
// 1. Gather all supported parent currencies
|
|
54
|
-
const allCurrencies = listSupportedCurrencies().reduce((acc, c) => {
|
|
55
|
-
if (isPlatformSupportedCurrency(c) && !deactivatedCurrencyIds.has(c.id))
|
|
56
|
-
acc.push(currencyToPlatformCurrency(c));
|
|
57
|
-
return acc;
|
|
58
|
-
}, []);
|
|
59
|
-
// 2. Determine which currencies to include based on patterns
|
|
60
|
-
let includedCurrencies = allCurrencies;
|
|
61
|
-
if (filterCurrencyRegexes) {
|
|
62
|
-
includedCurrencies = allCurrencies.filter(c => {
|
|
63
|
-
if (filterCurrencyRegexes && !filterCurrencyRegexes.some(regex => c.id.match(regex))) {
|
|
64
|
-
return false;
|
|
65
|
-
}
|
|
66
|
-
return true;
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
if (filters?.includeTokens === false) {
|
|
70
|
-
return includedCurrencies;
|
|
71
|
-
}
|
|
72
|
-
// 3. Determine which token families to fetch (only if not already fetched as specific tokens)
|
|
73
|
-
const familiesToFetch = new Set();
|
|
74
|
-
includedCurrencies.forEach(c => {
|
|
75
|
-
if (c.type === "CryptoCurrency")
|
|
76
|
-
familiesToFetch.add(c.family);
|
|
77
|
-
});
|
|
78
|
-
// 4. Fetch tokens for relevant families
|
|
79
|
-
const fetchAllPagesForFamily = async (family) => {
|
|
80
|
-
const args = { networkFamily: family, pageSize: 1000 };
|
|
81
|
-
let hasNextPage = true;
|
|
82
|
-
let data;
|
|
83
|
-
while (hasNextPage) {
|
|
84
|
-
const querySub = dispatch(calEndpoints.getTokensData.initiate(args, data ? { direction: "forward" } : undefined));
|
|
85
|
-
try {
|
|
86
|
-
const result = await querySub;
|
|
87
|
-
data = result.data;
|
|
88
|
-
hasNextPage = result.hasNextPage;
|
|
89
|
-
if (result.error)
|
|
90
|
-
throw result.error;
|
|
91
|
-
}
|
|
92
|
-
finally {
|
|
93
|
-
querySub.unsubscribe();
|
|
94
|
-
}
|
|
44
|
+
export function usePlatformCurrencies() {
|
|
45
|
+
return useMemo(() => {
|
|
46
|
+
return listCurrencies(true).reduce((filtered, currency) => {
|
|
47
|
+
if (isPlatformSupportedCurrency(currency)) {
|
|
48
|
+
filtered.push(currencyToPlatformCurrency(currency));
|
|
95
49
|
}
|
|
96
|
-
return
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
return tAcc;
|
|
107
|
-
}, acc);
|
|
108
|
-
}, includedCurrencies);
|
|
109
|
-
}, [deactivatedCurrencyIds, dispatch]);
|
|
50
|
+
return filtered;
|
|
51
|
+
}, []);
|
|
52
|
+
}, []);
|
|
53
|
+
}
|
|
54
|
+
export function useListPlatformCurrencies() {
|
|
55
|
+
const currencies = usePlatformCurrencies();
|
|
56
|
+
return useCallback((filters) => {
|
|
57
|
+
return filterPlatformCurrencies(currencies, filters || {});
|
|
58
|
+
}, [currencies]);
|
|
110
59
|
}
|
|
111
60
|
//# sourceMappingURL=react.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.js","sourceRoot":"","sources":["../../src/platform/react.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"react.js","sourceRoot":"","sources":["../../src/platform/react.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAE7C,OAAO,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AACpF,OAAO,EACL,sBAAsB,EACtB,wBAAwB,GAGzB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,2BAA2B,EAAE,MAAM,WAAW,CAAC;AAQxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAG/C;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAC5B,QAAyB,EACzB,MAA2C;IAE3C,OAAO,OAAO,CAAC,GAAG,EAAE;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O,WAAW,CAChB,CAAC,UAA0B,EAAE,EAAE,EAAE;QAC/B,OAAO,sBAAsB,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC,EACD,CAAC,gBAAgB,CAAC,CACnB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,qBAAqB;IACnC,OAAO,OAAO,CAAC,GAAG,EAAE;QAClB,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC,MAAM,CAAqB,CAAC,QAAQ,EAAE,QAAQ,EAAE,EAAE;YAC5E,IAAI,2BAA2B,CAAC,QAAQ,CAAC,EAAE;gBACzC,QAAQ,CAAC,IAAI,CAAC,0BAA0B,CAAC,QAAQ,CAAC,CAAC,CAAC;aACrD;YACD,OAAO,QAAQ,CAAC;QAClB,CAAC,EAAE,EAAE,CAAC,CAAC;IACT,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC;AAED,MAAM,UAAU,yBAAyB;IACvC,MAAM,UAAU,GAAG,qBAAqB,EAAE,CAAC;IAE3C,OAAO,WAAW,CAChB,CAAC,OAAyB,EAAE,EAAE;QAC5B,OAAO,wBAAwB,CAAC,UAAU,EAAE,OAAO,IAAI,EAAE,CAAC,CAAC;IAC7D,CAAC,EACD,CAAC,UAAU,CAAC,CACb,CAAC;AACJ,CAAC"}
|
|
@@ -220,6 +220,7 @@ export declare const LiveAppManifestSchema: z.ZodObject<{
|
|
|
220
220
|
name: string;
|
|
221
221
|
url: string;
|
|
222
222
|
id: string;
|
|
223
|
+
currencies: string[] | "*";
|
|
223
224
|
homepageUrl: string;
|
|
224
225
|
platforms: ("ios" | "android" | "desktop")[];
|
|
225
226
|
apiVersion: string;
|
|
@@ -227,7 +228,6 @@ export declare const LiveAppManifestSchema: z.ZodObject<{
|
|
|
227
228
|
branch: "debug" | "stable" | "experimental" | "soon";
|
|
228
229
|
domains: string[];
|
|
229
230
|
categories: string[];
|
|
230
|
-
currencies: string[] | "*";
|
|
231
231
|
visibility: "complete" | "searchable" | "deep";
|
|
232
232
|
content: {
|
|
233
233
|
description: Record<string, string>;
|
|
@@ -257,6 +257,7 @@ export declare const LiveAppManifestSchema: z.ZodObject<{
|
|
|
257
257
|
name: string;
|
|
258
258
|
url: string;
|
|
259
259
|
id: string;
|
|
260
|
+
currencies: string[] | "*";
|
|
260
261
|
homepageUrl: string;
|
|
261
262
|
platforms: ("ios" | "android" | "desktop")[];
|
|
262
263
|
apiVersion: string;
|
|
@@ -264,7 +265,6 @@ export declare const LiveAppManifestSchema: z.ZodObject<{
|
|
|
264
265
|
branch: "debug" | "stable" | "experimental" | "soon";
|
|
265
266
|
domains: string[];
|
|
266
267
|
categories: string[];
|
|
267
|
-
currencies: string[] | "*";
|
|
268
268
|
visibility: "complete" | "searchable" | "deep";
|
|
269
269
|
content: {
|
|
270
270
|
description: Record<string, string>;
|
|
@@ -297,6 +297,6 @@ export type PlatformApi = {
|
|
|
297
297
|
};
|
|
298
298
|
export type PlatformSignedTransaction = SignedOperation;
|
|
299
299
|
export type ListPlatformAccount = (filters?: AccountFilters) => PlatformAccount[];
|
|
300
|
-
export type ListPlatformCurrency = (filters?: CurrencyFilters) =>
|
|
300
|
+
export type ListPlatformCurrency = (filters?: CurrencyFilters) => PlatformCurrency[];
|
|
301
301
|
export type PlatformSupportedCurrency = CryptoCurrency | TokenCurrency;
|
|
302
302
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/platform/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClF,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5D,OAAO,EACL,OAAO,IAAI,eAAe,EAC1B,QAAQ,IAAI,gBAAgB,EAC5B,QAAQ,EACT,MAAM,wBAA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,CAAC,EAAE,kBAAkB,CAAC;QAC9B,gBAAgB,EAAE,kBAAkB,CAAC;QACrC,WAAW,EAAE,kBAAkB,CAAC;KACjC,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,mBAAmB,oBAAkB,CAAC;AAEnD,eAAO,MAAM,kCAAkC;;;;;;;;;;;;EAI7C,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKpC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BvB,CAAC;AAEZ,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE9E,MAAM,MAAM,WAAW,GAAG;IACxB,aAAa,EAAE,MAAM,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC;CACjD,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,eAAe,CAAC;AAExD,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,CAAC,EAAE,cAAc,KAAK,eAAe,EAAE,CAAC;AAElF,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,CAAC,EAAE,eAAe,KAAK,gBAAgB,EAAE,CAAC;AAErF,MAAM,MAAM,yBAAyB,GAAG,cAAc,GAAG,aAAa,CAAC"}
|
|
@@ -36,7 +36,6 @@ export declare const hubStateSelector: ((state: {
|
|
|
36
36
|
migrateAssetsMock?: boolean | undefined;
|
|
37
37
|
personalizeMock?: boolean | undefined;
|
|
38
38
|
recoverMock?: boolean | undefined;
|
|
39
|
-
syncAccountsMock?: boolean | undefined;
|
|
40
39
|
};
|
|
41
40
|
lastActionCompleted: PostOnboardingActionId | null;
|
|
42
41
|
postOnboardingInProgress: boolean;
|
|
@@ -56,7 +55,6 @@ export declare const hubStateSelector: ((state: {
|
|
|
56
55
|
migrateAssetsMock?: boolean | undefined;
|
|
57
56
|
personalizeMock?: boolean | undefined;
|
|
58
57
|
recoverMock?: boolean | undefined;
|
|
59
|
-
syncAccountsMock?: boolean | undefined;
|
|
60
58
|
};
|
|
61
59
|
lastActionCompleted: PostOnboardingActionId | null;
|
|
62
60
|
postOnboardingInProgress: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../src/postOnboarding/reducer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAGnF,OAAO,EAAkB,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpD,eAAO,MAAM,YAAY,EAAE,mBAQ1B,CAAC;AAEF,KAAK,sBAAsB,GAAG;IAAE,QAAQ,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAA;CAAE,CAAC;AACzE,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,aAAa,CAAC;IAC7B,UAAU,EAAE,sBAAsB,EAAE,CAAC;CACtC,CAAC;AACF,KAAK,yBAAyB,GAAG;IAC/B,QAAQ,EAAE,sBAAsB,CAAC;CAClC,CAAC;AACF,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,sBAAsB,GAAG,WAAW,GAAG,yBAAyB,CAAC;;AA0CnG,wBAAmF;AAiBnF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAC3C;IAAE,cAAc,EAAE,mBAAmB,CAAA;CAAE,EACvC,mBAAmB,CAOpB,CAAC;AAEF,eAAO,MAAM,gBAAgB;oBAVT,mBAAmB
|
|
1
|
+
{"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../src/postOnboarding/reducer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAGnF,OAAO,EAAkB,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpD,eAAO,MAAM,YAAY,EAAE,mBAQ1B,CAAC;AAEF,KAAK,sBAAsB,GAAG;IAAE,QAAQ,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAA;CAAE,CAAC;AACzE,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,aAAa,CAAC;IAC7B,UAAU,EAAE,sBAAsB,EAAE,CAAC;CACtC,CAAC;AACF,KAAK,yBAAyB,GAAG;IAC/B,QAAQ,EAAE,sBAAsB,CAAC;CAClC,CAAC;AACF,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,sBAAsB,GAAG,WAAW,GAAG,yBAAyB,CAAC;;AA0CnG,wBAAmF;AAiBnF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAC3C;IAAE,cAAc,EAAE,mBAAmB,CAAA;CAAE,EACvC,mBAAmB,CAOpB,CAAC;AAEF,eAAO,MAAM,gBAAgB;oBAVT,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyBrC,CAAC;AAEH,eAAO,MAAM,mCAAmC;oBA3B5B,mBAAmB;;;;;CA8BtC,CAAC;AAEF,eAAO,MAAM,+CAA+C;oBAhCxC,mBAAmB;;;;;CAmCtC,CAAC;AAEF,eAAO,MAAM,oCAAoC;oBArC7B,mBAAmB;;;;;CAwCtC,CAAC"}
|
|
@@ -4,5 +4,5 @@ export type AccountTuple = {
|
|
|
4
4
|
account: Account;
|
|
5
5
|
subAccount: TokenAccount | null;
|
|
6
6
|
};
|
|
7
|
-
export declare function getAccountTuplesForCurrency(currency: CryptoCurrency | TokenCurrency, allAccounts: Account[]): AccountTuple[];
|
|
7
|
+
export declare function getAccountTuplesForCurrency(currency: CryptoCurrency | TokenCurrency, allAccounts: Account[], accountIds?: Map<string, boolean>): AccountTuple[];
|
|
8
8
|
//# sourceMappingURL=getAccountTuplesForCurrency.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAccountTuplesForCurrency.d.ts","sourceRoot":"","sources":["../../src/utils/getAccountTuplesForCurrency.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAG7E,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,YAAY,GAAG,IAAI,CAAC;CACjC,CAAC;AAEF,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,cAAc,GAAG,aAAa,EACxC,WAAW,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"getAccountTuplesForCurrency.d.ts","sourceRoot":"","sources":["../../src/utils/getAccountTuplesForCurrency.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAG7E,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,YAAY,GAAG,IAAI,CAAC;CACjC,CAAC;AAEF,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,cAAc,GAAG,aAAa,EACxC,WAAW,EAAE,OAAO,EAAE,EACtB,UAAU,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,YAAY,EAAE,CAoBhB"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { makeEmptyTokenAccount } from "@ledgerhq/coin-framework/account/helpers";
|
|
2
|
-
export function getAccountTuplesForCurrency(currency, allAccounts) {
|
|
2
|
+
export function getAccountTuplesForCurrency(currency, allAccounts, accountIds) {
|
|
3
3
|
const isToken = currency.type === "TokenCurrency";
|
|
4
4
|
const targetCurrencyId = isToken ? currency.parentCurrency.id : currency.id;
|
|
5
5
|
return allAccounts
|
|
6
|
-
.filter(account => account.currency.id === targetCurrencyId
|
|
6
|
+
.filter(account => account.currency.id === targetCurrencyId &&
|
|
7
|
+
(isToken ? true : accountIds ? accountIds.has(account.id) : true))
|
|
7
8
|
.map(account => {
|
|
8
9
|
const subAccount = isToken
|
|
9
10
|
? account.subAccounts?.find((subAcc) => subAcc.type === "TokenAccount" && subAcc.token.id === currency.id) || makeEmptyTokenAccount(account, currency)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAccountTuplesForCurrency.js","sourceRoot":"","sources":["../../src/utils/getAccountTuplesForCurrency.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AAOjF,MAAM,UAAU,2BAA2B,CACzC,QAAwC,EACxC,WAAsB;
|
|
1
|
+
{"version":3,"file":"getAccountTuplesForCurrency.js","sourceRoot":"","sources":["../../src/utils/getAccountTuplesForCurrency.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AAOjF,MAAM,UAAU,2BAA2B,CACzC,QAAwC,EACxC,WAAsB,EACtB,UAAiC;IAEjC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,KAAK,eAAe,CAAC;IAClD,MAAM,gBAAgB,GAAG,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;IAE5E,OAAO,WAAW;SACf,MAAM,CACL,OAAO,CAAC,EAAE,CACR,OAAO,CAAC,QAAQ,CAAC,EAAE,KAAK,gBAAgB;QACxC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CACpE;SACA,GAAG,CAAC,OAAO,CAAC,EAAE;QACb,MAAM,UAAU,GAAG,OAAO;YACxB,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,IAAI,CACvB,CAAC,MAAM,EAA0B,EAAE,CACjC,MAAM,CAAC,IAAI,KAAK,cAAc,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK,QAAQ,CAAC,EAAE,CACpE,IAAI,qBAAqB,CAAC,OAAO,EAAE,QAAQ,CAAC;YAC/C,CAAC,CAAC,IAAI,CAAC;QAET,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/wallet-api/Exchange/server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/wallet-api/Exchange/server.ts"],"names":[],"mappings":"AAUA,OAAO,EAAW,WAAW,EAAuC,MAAM,sBAAsB,CAAC;AAQjG,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,EAInB,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,UAAU,EACX,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAiB,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIzC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAKpD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAQvC,OAAO,EAAE,WAAW,EAAE,MA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