@ledgerhq/live-common 34.52.0-nightly.1 → 34.52.0-nightly.10
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/environment.js +2 -0
- package/lib/__tests__/test-helpers/environment.js.map +1 -1
- package/lib/apps/config.js +1 -1
- package/lib/bridge/generic-alpaca/alpaca/network/network-alpaca.d.ts +2 -1
- package/lib/bridge/generic-alpaca/alpaca/network/network-alpaca.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/alpaca/network/network-alpaca.js +3 -0
- package/lib/bridge/generic-alpaca/alpaca/network/network-alpaca.js.map +1 -1
- package/lib/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/getAccountShape.js +7 -1
- package/lib/bridge/generic-alpaca/getAccountShape.js.map +1 -1
- package/lib/bridge/generic-alpaca/utils.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/utils.js +5 -4
- package/lib/bridge/generic-alpaca/utils.js.map +1 -1
- package/lib/dada-client/hooks/useAssetsData.d.ts +4 -10
- package/lib/dada-client/hooks/useAssetsData.d.ts.map +1 -1
- package/lib/dada-client/hooks/useAssetsData.js +2 -1
- package/lib/dada-client/hooks/useAssetsData.js.map +1 -1
- package/lib/dada-client/hooks/useInterestRatesByCurrencies.d.ts +5 -1
- package/lib/dada-client/hooks/useInterestRatesByCurrencies.d.ts.map +1 -1
- package/lib/dada-client/hooks/useMarketByCurrencies.d.ts +4 -1
- package/lib/dada-client/hooks/useMarketByCurrencies.d.ts.map +1 -1
- package/lib/dada-client/state-manager/api.d.ts.map +1 -1
- package/lib/dada-client/state-manager/api.js +3 -0
- package/lib/dada-client/state-manager/api.js.map +1 -1
- package/lib/dada-client/state-manager/types.d.ts +1 -0
- package/lib/dada-client/state-manager/types.d.ts.map +1 -1
- package/lib/deposit/helper.d.ts.map +1 -1
- package/lib/deposit/helper.js +54 -1
- package/lib/deposit/helper.js.map +1 -1
- package/lib/e2e/data/deviceLabelsData.d.ts.map +1 -1
- package/lib/e2e/data/deviceLabelsData.js +37 -33
- package/lib/e2e/data/deviceLabelsData.js.map +1 -1
- package/lib/e2e/deviceInteraction/TouchDeviceSimulator.d.ts.map +1 -1
- package/lib/e2e/deviceInteraction/TouchDeviceSimulator.js +13 -5
- package/lib/e2e/deviceInteraction/TouchDeviceSimulator.js.map +1 -1
- package/lib/e2e/enum/Account.d.ts +0 -1
- package/lib/e2e/enum/Account.d.ts.map +1 -1
- package/lib/e2e/enum/Account.js +0 -1
- package/lib/e2e/enum/Account.js.map +1 -1
- package/lib/e2e/enum/Currency.d.ts +0 -1
- package/lib/e2e/enum/Currency.d.ts.map +1 -1
- package/lib/e2e/enum/Currency.js +0 -1
- package/lib/e2e/enum/Currency.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 +2 -0
- package/lib/e2e/enum/DeviceLabels.d.ts.map +1 -1
- package/lib/e2e/enum/DeviceLabels.js +2 -0
- package/lib/e2e/enum/DeviceLabels.js.map +1 -1
- package/lib/e2e/families/bitcoin.js +1 -1
- 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 +12 -11
- package/lib/e2e/families/cardano.js.map +1 -1
- package/lib/e2e/families/evm.d.ts.map +1 -1
- package/lib/e2e/families/evm.js +4 -3
- package/lib/e2e/families/evm.js.map +1 -1
- package/lib/e2e/families/solana.d.ts.map +1 -1
- package/lib/e2e/families/solana.js +1 -1
- package/lib/e2e/families/solana.js.map +1 -1
- package/lib/e2e/index.d.ts +8 -0
- package/lib/e2e/index.d.ts.map +1 -1
- package/lib/e2e/speculos.d.ts +2 -0
- package/lib/e2e/speculos.d.ts.map +1 -1
- package/lib/e2e/speculos.js +22 -17
- package/lib/e2e/speculos.js.map +1 -1
- package/lib/e2e/speculosAppVersion.d.ts.map +1 -1
- package/lib/e2e/speculosAppVersion.js +5 -2
- package/lib/e2e/speculosAppVersion.js.map +1 -1
- package/lib/e2e/speculosCI.d.ts.map +1 -1
- package/lib/e2e/speculosCI.js +4 -0
- package/lib/e2e/speculosCI.js.map +1 -1
- package/lib/env.react.d.ts +1 -1
- package/lib/env.react.d.ts.map +1 -1
- package/lib/exchange/swap/completeExchange.d.ts.map +1 -1
- package/lib/exchange/swap/completeExchange.js +13 -0
- package/lib/exchange/swap/completeExchange.js.map +1 -1
- package/lib/exchange/swap/getIncompatibleCurrencyKeys.d.ts.map +1 -1
- package/lib/exchange/swap/getIncompatibleCurrencyKeys.js +4 -0
- package/lib/exchange/swap/getIncompatibleCurrencyKeys.js.map +1 -1
- package/lib/exchange/swap/transactionStrategies.d.ts +3 -0
- package/lib/exchange/swap/transactionStrategies.d.ts.map +1 -1
- package/lib/exchange/swap/transactionStrategies.js +12 -2
- package/lib/exchange/swap/transactionStrategies.js.map +1 -1
- package/lib/families/canton/bridge/mock.d.ts +2 -2
- package/lib/families/canton/bridge/mock.d.ts.map +1 -1
- package/lib/families/canton/bridge/mock.js +3 -0
- package/lib/families/canton/bridge/mock.js.map +1 -1
- package/lib/families/canton/config.d.ts.map +1 -1
- package/lib/families/canton/config.js +3 -0
- package/lib/families/canton/config.js.map +1 -1
- package/lib/families/canton/setup.d.ts +3 -3
- package/lib/families/canton/setup.d.ts.map +1 -1
- package/lib/families/canton/setup.js.map +1 -1
- package/lib/families/evm/config.d.ts.map +1 -1
- package/lib/families/evm/config.js +18 -1
- package/lib/families/evm/config.js.map +1 -1
- package/lib/families/hedera/utils.d.ts +2 -0
- package/lib/families/hedera/utils.d.ts.map +1 -0
- package/lib/families/hedera/{logic.js → utils.js} +2 -2
- package/lib/families/hedera/utils.js.map +1 -0
- package/lib/families/sui/react.d.ts.map +1 -1
- package/lib/families/sui/react.js +1 -0
- package/lib/families/sui/react.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 +3 -0
- package/lib/featureFlags/defaultFeatures.js.map +1 -1
- package/lib/generated/bridge/js.d.ts +1 -1
- package/lib/generated/bridge/mock.d.ts +1 -1
- package/lib/generated/deviceTransactionConfig.d.ts +1 -1
- package/lib/generated/specs.d.ts +1 -0
- package/lib/generated/specs.d.ts.map +1 -1
- package/lib/hooks/useDeviceTransactionConfig.d.ts +19 -0
- package/lib/hooks/useDeviceTransactionConfig.d.ts.map +1 -0
- package/lib/hooks/useDeviceTransactionConfig.js +45 -0
- package/lib/hooks/useDeviceTransactionConfig.js.map +1 -0
- 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/modularDrawer/__mocks__/currencies.mock.d.ts +3 -0
- package/lib/modularDrawer/__mocks__/currencies.mock.d.ts.map +1 -1
- package/lib/modularDrawer/__mocks__/currencies.mock.js +40 -1
- package/lib/modularDrawer/__mocks__/currencies.mock.js.map +1 -1
- package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.d.ts.map +1 -1
- package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js +7 -0
- package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js.map +1 -1
- package/lib/modularDrawer/utils/index.d.ts +3 -2
- package/lib/modularDrawer/utils/index.d.ts.map +1 -1
- package/lib/modularDrawer/utils/index.js +6 -10
- package/lib/modularDrawer/utils/index.js.map +1 -1
- package/lib/postOnboarding/hooks/useAutoDismissPostOnboardingEntryPoint.js.map +1 -1
- package/lib/postOnboarding/hooks/usePostOnboardingHubState.d.ts.map +1 -1
- package/lib/postOnboarding/hooks/usePostOnboardingHubState.js +7 -6
- package/lib/postOnboarding/hooks/usePostOnboardingHubState.js.map +1 -1
- package/lib/transaction/deviceTransactionConfig.d.ts +1 -1
- package/lib/transaction/deviceTransactionConfig.d.ts.map +1 -1
- package/lib/transaction/deviceTransactionConfig.js +2 -2
- package/lib/transaction/deviceTransactionConfig.js.map +1 -1
- package/lib-es/__tests__/test-helpers/environment.js +2 -0
- package/lib-es/__tests__/test-helpers/environment.js.map +1 -1
- package/lib-es/apps/config.js +1 -1
- package/lib-es/bridge/generic-alpaca/alpaca/network/network-alpaca.d.ts +2 -1
- package/lib-es/bridge/generic-alpaca/alpaca/network/network-alpaca.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/alpaca/network/network-alpaca.js +3 -0
- package/lib-es/bridge/generic-alpaca/alpaca/network/network-alpaca.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/getAccountShape.js +7 -1
- package/lib-es/bridge/generic-alpaca/getAccountShape.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/utils.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/utils.js +5 -4
- package/lib-es/bridge/generic-alpaca/utils.js.map +1 -1
- package/lib-es/dada-client/hooks/useAssetsData.d.ts +4 -10
- package/lib-es/dada-client/hooks/useAssetsData.d.ts.map +1 -1
- package/lib-es/dada-client/hooks/useAssetsData.js +2 -1
- package/lib-es/dada-client/hooks/useAssetsData.js.map +1 -1
- package/lib-es/dada-client/hooks/useInterestRatesByCurrencies.d.ts +5 -1
- package/lib-es/dada-client/hooks/useInterestRatesByCurrencies.d.ts.map +1 -1
- package/lib-es/dada-client/hooks/useMarketByCurrencies.d.ts +4 -1
- package/lib-es/dada-client/hooks/useMarketByCurrencies.d.ts.map +1 -1
- package/lib-es/dada-client/state-manager/api.d.ts.map +1 -1
- package/lib-es/dada-client/state-manager/api.js +3 -0
- package/lib-es/dada-client/state-manager/api.js.map +1 -1
- package/lib-es/dada-client/state-manager/types.d.ts +1 -0
- package/lib-es/dada-client/state-manager/types.d.ts.map +1 -1
- package/lib-es/deposit/helper.d.ts.map +1 -1
- package/lib-es/deposit/helper.js +54 -1
- package/lib-es/deposit/helper.js.map +1 -1
- package/lib-es/e2e/data/deviceLabelsData.d.ts.map +1 -1
- package/lib-es/e2e/data/deviceLabelsData.js +37 -33
- package/lib-es/e2e/data/deviceLabelsData.js.map +1 -1
- package/lib-es/e2e/deviceInteraction/TouchDeviceSimulator.d.ts.map +1 -1
- package/lib-es/e2e/deviceInteraction/TouchDeviceSimulator.js +13 -5
- package/lib-es/e2e/deviceInteraction/TouchDeviceSimulator.js.map +1 -1
- package/lib-es/e2e/enum/Account.d.ts +0 -1
- package/lib-es/e2e/enum/Account.d.ts.map +1 -1
- package/lib-es/e2e/enum/Account.js +0 -1
- package/lib-es/e2e/enum/Account.js.map +1 -1
- package/lib-es/e2e/enum/Currency.d.ts +0 -1
- package/lib-es/e2e/enum/Currency.d.ts.map +1 -1
- package/lib-es/e2e/enum/Currency.js +0 -1
- package/lib-es/e2e/enum/Currency.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 +2 -0
- package/lib-es/e2e/enum/DeviceLabels.d.ts.map +1 -1
- package/lib-es/e2e/enum/DeviceLabels.js +2 -0
- package/lib-es/e2e/enum/DeviceLabels.js.map +1 -1
- package/lib-es/e2e/families/bitcoin.js +1 -1
- 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 +12 -11
- package/lib-es/e2e/families/cardano.js.map +1 -1
- package/lib-es/e2e/families/evm.d.ts.map +1 -1
- package/lib-es/e2e/families/evm.js +4 -3
- package/lib-es/e2e/families/evm.js.map +1 -1
- package/lib-es/e2e/families/solana.d.ts.map +1 -1
- package/lib-es/e2e/families/solana.js +1 -1
- package/lib-es/e2e/families/solana.js.map +1 -1
- package/lib-es/e2e/index.d.ts +8 -0
- package/lib-es/e2e/index.d.ts.map +1 -1
- package/lib-es/e2e/speculos.d.ts +2 -0
- package/lib-es/e2e/speculos.d.ts.map +1 -1
- package/lib-es/e2e/speculos.js +22 -17
- package/lib-es/e2e/speculos.js.map +1 -1
- package/lib-es/e2e/speculosAppVersion.d.ts.map +1 -1
- package/lib-es/e2e/speculosAppVersion.js +5 -2
- package/lib-es/e2e/speculosAppVersion.js.map +1 -1
- package/lib-es/e2e/speculosCI.d.ts.map +1 -1
- package/lib-es/e2e/speculosCI.js +4 -0
- package/lib-es/e2e/speculosCI.js.map +1 -1
- package/lib-es/env.react.d.ts +1 -1
- package/lib-es/env.react.d.ts.map +1 -1
- package/lib-es/exchange/swap/completeExchange.d.ts.map +1 -1
- package/lib-es/exchange/swap/completeExchange.js +13 -0
- package/lib-es/exchange/swap/completeExchange.js.map +1 -1
- package/lib-es/exchange/swap/getIncompatibleCurrencyKeys.d.ts.map +1 -1
- package/lib-es/exchange/swap/getIncompatibleCurrencyKeys.js +4 -0
- package/lib-es/exchange/swap/getIncompatibleCurrencyKeys.js.map +1 -1
- package/lib-es/exchange/swap/transactionStrategies.d.ts +3 -0
- package/lib-es/exchange/swap/transactionStrategies.d.ts.map +1 -1
- package/lib-es/exchange/swap/transactionStrategies.js +10 -1
- package/lib-es/exchange/swap/transactionStrategies.js.map +1 -1
- package/lib-es/families/canton/bridge/mock.d.ts +2 -2
- package/lib-es/families/canton/bridge/mock.d.ts.map +1 -1
- package/lib-es/families/canton/bridge/mock.js +3 -0
- package/lib-es/families/canton/bridge/mock.js.map +1 -1
- package/lib-es/families/canton/config.d.ts.map +1 -1
- package/lib-es/families/canton/config.js +3 -0
- package/lib-es/families/canton/config.js.map +1 -1
- package/lib-es/families/canton/setup.d.ts +3 -3
- package/lib-es/families/canton/setup.d.ts.map +1 -1
- package/lib-es/families/canton/setup.js.map +1 -1
- package/lib-es/families/evm/config.d.ts.map +1 -1
- package/lib-es/families/evm/config.js +18 -1
- package/lib-es/families/evm/config.js.map +1 -1
- package/lib-es/families/hedera/utils.d.ts +2 -0
- package/lib-es/families/hedera/utils.d.ts.map +1 -0
- package/lib-es/families/hedera/utils.js +3 -0
- package/lib-es/families/hedera/utils.js.map +1 -0
- package/lib-es/families/sui/react.d.ts.map +1 -1
- package/lib-es/families/sui/react.js +1 -0
- package/lib-es/families/sui/react.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 +3 -0
- package/lib-es/featureFlags/defaultFeatures.js.map +1 -1
- package/lib-es/generated/bridge/js.d.ts +1 -1
- package/lib-es/generated/bridge/mock.d.ts +1 -1
- package/lib-es/generated/deviceTransactionConfig.d.ts +1 -1
- package/lib-es/generated/specs.d.ts +1 -0
- package/lib-es/generated/specs.d.ts.map +1 -1
- package/lib-es/hooks/useDeviceTransactionConfig.d.ts +19 -0
- package/lib-es/hooks/useDeviceTransactionConfig.d.ts.map +1 -0
- package/lib-es/hooks/useDeviceTransactionConfig.js +41 -0
- package/lib-es/hooks/useDeviceTransactionConfig.js.map +1 -0
- 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/modularDrawer/__mocks__/currencies.mock.d.ts +3 -0
- package/lib-es/modularDrawer/__mocks__/currencies.mock.d.ts.map +1 -1
- package/lib-es/modularDrawer/__mocks__/currencies.mock.js +39 -0
- package/lib-es/modularDrawer/__mocks__/currencies.mock.js.map +1 -1
- package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.d.ts.map +1 -1
- package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js +7 -0
- package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js.map +1 -1
- package/lib-es/modularDrawer/utils/index.d.ts +3 -2
- package/lib-es/modularDrawer/utils/index.d.ts.map +1 -1
- package/lib-es/modularDrawer/utils/index.js +4 -9
- package/lib-es/modularDrawer/utils/index.js.map +1 -1
- package/lib-es/postOnboarding/hooks/useAutoDismissPostOnboardingEntryPoint.js.map +1 -1
- package/lib-es/postOnboarding/hooks/usePostOnboardingHubState.d.ts.map +1 -1
- package/lib-es/postOnboarding/hooks/usePostOnboardingHubState.js +7 -6
- package/lib-es/postOnboarding/hooks/usePostOnboardingHubState.js.map +1 -1
- package/lib-es/transaction/deviceTransactionConfig.d.ts +1 -1
- package/lib-es/transaction/deviceTransactionConfig.d.ts.map +1 -1
- package/lib-es/transaction/deviceTransactionConfig.js +2 -2
- package/lib-es/transaction/deviceTransactionConfig.js.map +1 -1
- package/package.json +72 -71
- package/src/__tests__/environment.test.ts +8 -5
- package/src/__tests__/migration/account-migration.ts +1 -0
- package/src/__tests__/test-helpers/environment.ts +2 -0
- package/src/account/serialization.test.ts +1 -0
- package/src/apps/config.ts +1 -1
- package/src/bridge/generic-alpaca/alpaca/network/network-alpaca.ts +4 -0
- package/src/bridge/generic-alpaca/getAccountShape.ts +8 -1
- package/src/bridge/generic-alpaca/tests/getAccountShape.test.ts +25 -2
- package/src/bridge/generic-alpaca/utils.test.ts +165 -0
- package/src/bridge/generic-alpaca/utils.ts +5 -4
- package/src/dada-client/hooks/useAssetsData.ts +4 -8
- package/src/dada-client/state-manager/api.ts +3 -0
- package/src/dada-client/state-manager/types.ts +1 -0
- package/src/deposit/helper.ts +65 -1
- package/src/e2e/data/deviceLabelsData.ts +38 -33
- package/src/e2e/deviceInteraction/TouchDeviceSimulator.ts +13 -5
- package/src/e2e/enum/Account.ts +0 -6
- package/src/e2e/enum/Currency.ts +0 -7
- package/src/e2e/enum/Device.ts +1 -0
- package/src/e2e/enum/DeviceLabels.ts +2 -0
- package/src/e2e/families/bitcoin.ts +1 -1
- package/src/e2e/families/cardano.ts +12 -15
- package/src/e2e/families/evm.ts +4 -3
- package/src/e2e/families/solana.ts +1 -4
- package/src/e2e/speculos.ts +32 -18
- package/src/e2e/speculosAppVersion.ts +5 -2
- package/src/e2e/speculosCI.ts +4 -0
- package/src/exchange/swap/completeExchange.ts +17 -0
- package/src/exchange/swap/getIncompatibleCurrencyKeys.ts +4 -0
- package/src/exchange/swap/transactionStrategies.ts +16 -1
- package/src/families/bitcoin/satstack.test.ts +1 -0
- package/src/families/canton/bridge/mock.ts +10 -7
- package/src/families/canton/config.ts +3 -0
- package/src/families/canton/setup.ts +3 -3
- package/src/families/evm/config.ts +18 -1
- package/src/families/hedera/__snapshots__/bridge.integration.test.ts.snap +222 -86
- package/src/families/hedera/utils.ts +2 -0
- package/src/families/sui/react.ts +5 -0
- package/src/featureFlags/defaultFeatures.ts +3 -0
- package/src/hooks/useDeviceTransactionConfig.test.tsx +200 -0
- package/src/hooks/useDeviceTransactionConfig.ts +65 -0
- package/src/load/speculos.ts +1 -0
- package/src/modularDrawer/__mocks__/currencies.mock.ts +40 -0
- package/src/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.ts +7 -0
- package/src/modularDrawer/utils/index.ts +6 -10
- package/src/postOnboarding/hooks/useAutoDismissPostOnboardingEntryPoint.ts +1 -1
- package/src/postOnboarding/hooks/usePostOnboardingHubState.ts +7 -9
- package/src/transaction/deviceTransactionConfig.ts +3 -3
- package/lib/families/hedera/logic.d.ts +0 -2
- package/lib/families/hedera/logic.d.ts.map +0 -1
- package/lib/families/hedera/logic.js.map +0 -1
- package/lib-es/families/hedera/logic.d.ts +0 -2
- package/lib-es/families/hedera/logic.d.ts.map +0 -1
- package/lib-es/families/hedera/logic.js +0 -3
- package/lib-es/families/hedera/logic.js.map +0 -1
- package/src/dada-client/MIGRATION_GUIDE.md +0 -187
- package/src/families/hedera/logic.ts +0 -2
- package/src/families/sui/__snapshots__/bridge.integration.test.ts.snap +0 -428
- package/src/modularDrawer/utils/index.test.ts +0 -43
|
@@ -110,6 +110,11 @@ export const mapStakingPositions = (
|
|
|
110
110
|
validator,
|
|
111
111
|
stakedSuiId: sp.stakedSuiId,
|
|
112
112
|
formattedAmount: formatCurrencyUnit(unit, BigNumber(sp.principal), formatConfig),
|
|
113
|
+
formattedEstimatedReward: formatCurrencyUnit(
|
|
114
|
+
unit,
|
|
115
|
+
BigNumber(sp.status === "Active" ? sp.estimatedReward : 0),
|
|
116
|
+
formatConfig,
|
|
117
|
+
),
|
|
113
118
|
};
|
|
114
119
|
});
|
|
115
120
|
};
|
|
@@ -97,12 +97,15 @@ export const CURRENCY_DEFAULT_FEATURES = {
|
|
|
97
97
|
currencyBerachain: DEFAULT_FEATURE,
|
|
98
98
|
currencyHyperevm: DEFAULT_FEATURE,
|
|
99
99
|
currencyCantonNetwork: DEFAULT_FEATURE,
|
|
100
|
+
currencyCantonNetworkDevnet: DEFAULT_FEATURE,
|
|
101
|
+
currencyCantonNetworkTestnet: DEFAULT_FEATURE,
|
|
100
102
|
currencyKaspa: DEFAULT_FEATURE,
|
|
101
103
|
currencyEthereumHoodi: DEFAULT_FEATURE,
|
|
102
104
|
currencyCore: DEFAULT_FEATURE,
|
|
103
105
|
currencyWestend: DEFAULT_FEATURE,
|
|
104
106
|
currencyAssetHubPolkadot: DEFAULT_FEATURE,
|
|
105
107
|
currencyAssetHubWestend: DEFAULT_FEATURE,
|
|
108
|
+
currencyMonad: DEFAULT_FEATURE,
|
|
106
109
|
};
|
|
107
110
|
|
|
108
111
|
/**
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jest-environment jsdom
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { TextDecoder, TextEncoder } from "util";
|
|
6
|
+
|
|
7
|
+
// Polyfill for TextDecoder/TextEncoder required by Cardano dependencies
|
|
8
|
+
global.TextDecoder = TextDecoder as any;
|
|
9
|
+
global.TextEncoder = TextEncoder as any;
|
|
10
|
+
|
|
11
|
+
// Mock the deviceTransactionConfig module before importing anything else
|
|
12
|
+
jest.mock("../transaction/deviceTransactionConfig", () => ({
|
|
13
|
+
getDeviceTransactionConfig: jest.fn(),
|
|
14
|
+
}));
|
|
15
|
+
|
|
16
|
+
import { renderHook, waitFor } from "@testing-library/react";
|
|
17
|
+
import { useDeviceTransactionConfig } from "./useDeviceTransactionConfig";
|
|
18
|
+
import { getDeviceTransactionConfig } from "../transaction/deviceTransactionConfig";
|
|
19
|
+
import { Account } from "@ledgerhq/types-live";
|
|
20
|
+
import { Transaction, TransactionStatus } from "../generated/types";
|
|
21
|
+
import BigNumber from "bignumber.js";
|
|
22
|
+
import { getCryptoCurrencyById } from "../currencies/index";
|
|
23
|
+
|
|
24
|
+
const mockGetDeviceTransactionConfig = getDeviceTransactionConfig as jest.MockedFunction<
|
|
25
|
+
typeof getDeviceTransactionConfig
|
|
26
|
+
>;
|
|
27
|
+
|
|
28
|
+
const btc = getCryptoCurrencyById("bitcoin");
|
|
29
|
+
|
|
30
|
+
describe("useDeviceTransactionConfig", () => {
|
|
31
|
+
const mockAccount: Account = {
|
|
32
|
+
type: "Account",
|
|
33
|
+
id: "test-account-id",
|
|
34
|
+
seedIdentifier: "seed-id",
|
|
35
|
+
derivationMode: "" as const,
|
|
36
|
+
index: 0,
|
|
37
|
+
freshAddress: "test-address",
|
|
38
|
+
freshAddressPath: "44'/0'/0'/0/0",
|
|
39
|
+
used: true,
|
|
40
|
+
balance: new BigNumber(1000000),
|
|
41
|
+
spendableBalance: new BigNumber(1000000),
|
|
42
|
+
creationDate: new Date(),
|
|
43
|
+
blockHeight: 100,
|
|
44
|
+
currency: btc,
|
|
45
|
+
operationsCount: 0,
|
|
46
|
+
operations: [],
|
|
47
|
+
pendingOperations: [],
|
|
48
|
+
lastSyncDate: new Date(),
|
|
49
|
+
balanceHistoryCache: {
|
|
50
|
+
HOUR: { latestDate: null, balances: [] },
|
|
51
|
+
DAY: { latestDate: null, balances: [] },
|
|
52
|
+
WEEK: { latestDate: null, balances: [] },
|
|
53
|
+
},
|
|
54
|
+
swapHistory: [],
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const mockTransaction: Transaction = {
|
|
58
|
+
family: "bitcoin" as any,
|
|
59
|
+
amount: new BigNumber(100),
|
|
60
|
+
recipient: "test-recipient",
|
|
61
|
+
useAllAmount: false,
|
|
62
|
+
} as Transaction;
|
|
63
|
+
|
|
64
|
+
const mockStatus: TransactionStatus = {
|
|
65
|
+
errors: {},
|
|
66
|
+
warnings: {},
|
|
67
|
+
estimatedFees: new BigNumber(10),
|
|
68
|
+
amount: new BigNumber(100),
|
|
69
|
+
totalSpent: new BigNumber(110),
|
|
70
|
+
} as TransactionStatus;
|
|
71
|
+
|
|
72
|
+
beforeEach(() => {
|
|
73
|
+
jest.clearAllMocks();
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
it("should load device transaction config fields successfully", async () => {
|
|
77
|
+
const mockFields = [
|
|
78
|
+
{ type: "amount", label: "Amount" },
|
|
79
|
+
{ type: "fees", label: "Fees" },
|
|
80
|
+
];
|
|
81
|
+
|
|
82
|
+
mockGetDeviceTransactionConfig.mockResolvedValue(mockFields as any);
|
|
83
|
+
|
|
84
|
+
const { result } = renderHook(() =>
|
|
85
|
+
useDeviceTransactionConfig({
|
|
86
|
+
account: mockAccount,
|
|
87
|
+
parentAccount: null,
|
|
88
|
+
transaction: mockTransaction,
|
|
89
|
+
status: mockStatus,
|
|
90
|
+
}),
|
|
91
|
+
);
|
|
92
|
+
|
|
93
|
+
// Initially loading
|
|
94
|
+
expect(result.current.loading).toBe(true);
|
|
95
|
+
expect(result.current.fields).toEqual([]);
|
|
96
|
+
|
|
97
|
+
// Wait for async operation
|
|
98
|
+
await waitFor(() => {
|
|
99
|
+
expect(result.current.loading).toBe(false);
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
expect(result.current.fields).toEqual(mockFields);
|
|
103
|
+
expect(mockGetDeviceTransactionConfig).toHaveBeenCalledWith({
|
|
104
|
+
account: mockAccount,
|
|
105
|
+
parentAccount: null,
|
|
106
|
+
transaction: mockTransaction,
|
|
107
|
+
status: mockStatus,
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
it("should handle errors gracefully", async () => {
|
|
112
|
+
const consoleErrorSpy = jest.spyOn(console, "error").mockImplementation();
|
|
113
|
+
mockGetDeviceTransactionConfig.mockRejectedValue(new Error("Test error"));
|
|
114
|
+
|
|
115
|
+
const { result } = renderHook(() =>
|
|
116
|
+
useDeviceTransactionConfig({
|
|
117
|
+
account: mockAccount,
|
|
118
|
+
parentAccount: null,
|
|
119
|
+
transaction: mockTransaction,
|
|
120
|
+
status: mockStatus,
|
|
121
|
+
}),
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
expect(result.current.loading).toBe(true);
|
|
125
|
+
|
|
126
|
+
await waitFor(() => {
|
|
127
|
+
expect(result.current.loading).toBe(false);
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
expect(result.current.fields).toEqual([]);
|
|
131
|
+
expect(consoleErrorSpy).toHaveBeenCalledWith(
|
|
132
|
+
"Failed to load device transaction config:",
|
|
133
|
+
expect.any(Error),
|
|
134
|
+
);
|
|
135
|
+
|
|
136
|
+
consoleErrorSpy.mockRestore();
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
it("should reload fields when dependencies change", async () => {
|
|
140
|
+
const mockFields1 = [{ type: "amount", label: "Amount 1" }];
|
|
141
|
+
const mockFields2 = [{ type: "amount", label: "Amount 2" }];
|
|
142
|
+
|
|
143
|
+
mockGetDeviceTransactionConfig
|
|
144
|
+
.mockResolvedValueOnce(mockFields1 as any)
|
|
145
|
+
.mockResolvedValueOnce(mockFields2 as any);
|
|
146
|
+
|
|
147
|
+
const { result, rerender } = renderHook(
|
|
148
|
+
({ transaction }) =>
|
|
149
|
+
useDeviceTransactionConfig({
|
|
150
|
+
account: mockAccount,
|
|
151
|
+
parentAccount: null,
|
|
152
|
+
transaction,
|
|
153
|
+
status: mockStatus,
|
|
154
|
+
}),
|
|
155
|
+
{
|
|
156
|
+
initialProps: { transaction: mockTransaction },
|
|
157
|
+
},
|
|
158
|
+
);
|
|
159
|
+
|
|
160
|
+
await waitFor(() => {
|
|
161
|
+
expect(result.current.loading).toBe(false);
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
expect(result.current.fields).toEqual(mockFields1);
|
|
165
|
+
|
|
166
|
+
// Change transaction
|
|
167
|
+
const newTransaction = {
|
|
168
|
+
...mockTransaction,
|
|
169
|
+
amount: new BigNumber(200),
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
rerender({ transaction: newTransaction });
|
|
173
|
+
|
|
174
|
+
await waitFor(() => {
|
|
175
|
+
expect(result.current.loading).toBe(false);
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
expect(result.current.fields).toEqual(mockFields2);
|
|
179
|
+
expect(mockGetDeviceTransactionConfig).toHaveBeenCalledTimes(2);
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
it("should cleanup on unmount", async () => {
|
|
183
|
+
const mockFields = [{ type: "amount", label: "Amount" }];
|
|
184
|
+
mockGetDeviceTransactionConfig.mockResolvedValue(mockFields as any);
|
|
185
|
+
|
|
186
|
+
const { unmount } = renderHook(() =>
|
|
187
|
+
useDeviceTransactionConfig({
|
|
188
|
+
account: mockAccount,
|
|
189
|
+
parentAccount: null,
|
|
190
|
+
transaction: mockTransaction,
|
|
191
|
+
status: mockStatus,
|
|
192
|
+
}),
|
|
193
|
+
);
|
|
194
|
+
|
|
195
|
+
unmount();
|
|
196
|
+
|
|
197
|
+
// Should not throw any errors
|
|
198
|
+
expect(mockGetDeviceTransactionConfig).toHaveBeenCalled();
|
|
199
|
+
});
|
|
200
|
+
});
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { useState, useEffect } from "react";
|
|
2
|
+
import { Account, AccountLike } from "@ledgerhq/types-live";
|
|
3
|
+
import { Transaction, TransactionStatus } from "../generated/types";
|
|
4
|
+
import {
|
|
5
|
+
getDeviceTransactionConfig,
|
|
6
|
+
DeviceTransactionField,
|
|
7
|
+
} from "../transaction/deviceTransactionConfig";
|
|
8
|
+
|
|
9
|
+
type UseDeviceTransactionConfigParams = {
|
|
10
|
+
account: AccountLike;
|
|
11
|
+
parentAccount: Account | null | undefined;
|
|
12
|
+
transaction: Transaction;
|
|
13
|
+
status: TransactionStatus;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Hook to fetch device transaction configuration fields asynchronously.
|
|
18
|
+
* This anticipates the future async nature of crypto assets store operations.
|
|
19
|
+
*/
|
|
20
|
+
export function useDeviceTransactionConfig({
|
|
21
|
+
account,
|
|
22
|
+
parentAccount,
|
|
23
|
+
transaction,
|
|
24
|
+
status,
|
|
25
|
+
}: UseDeviceTransactionConfigParams): {
|
|
26
|
+
fields: DeviceTransactionField[];
|
|
27
|
+
loading: boolean;
|
|
28
|
+
} {
|
|
29
|
+
const [fields, setFields] = useState<DeviceTransactionField[]>([]);
|
|
30
|
+
const [loading, setLoading] = useState(true);
|
|
31
|
+
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
let mounted = true;
|
|
34
|
+
|
|
35
|
+
async function loadFields() {
|
|
36
|
+
try {
|
|
37
|
+
setLoading(true);
|
|
38
|
+
const result = await getDeviceTransactionConfig({
|
|
39
|
+
account,
|
|
40
|
+
parentAccount,
|
|
41
|
+
transaction,
|
|
42
|
+
status,
|
|
43
|
+
});
|
|
44
|
+
if (mounted) {
|
|
45
|
+
setFields(result);
|
|
46
|
+
setLoading(false);
|
|
47
|
+
}
|
|
48
|
+
} catch (error) {
|
|
49
|
+
console.error("Failed to load device transaction config:", error);
|
|
50
|
+
if (mounted) {
|
|
51
|
+
setFields([]);
|
|
52
|
+
setLoading(false);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
loadFields();
|
|
58
|
+
|
|
59
|
+
return () => {
|
|
60
|
+
mounted = false;
|
|
61
|
+
};
|
|
62
|
+
}, [account, parentAccount, transaction, status]);
|
|
63
|
+
|
|
64
|
+
return { fields, loading };
|
|
65
|
+
}
|
package/src/load/speculos.ts
CHANGED
|
@@ -7,6 +7,7 @@ export const mockArbitrumCryptoCurrency = getCryptoCurrencyById("arbitrum");
|
|
|
7
7
|
export const mockBaseCryptoCurrency = getCryptoCurrencyById("base");
|
|
8
8
|
export const mockScrollCryptoCurrency = getCryptoCurrencyById("scroll");
|
|
9
9
|
export const mockInjectiveCryptoCurrency = getCryptoCurrencyById("injective");
|
|
10
|
+
export const mockBscCryptoCurrency = getCryptoCurrencyById("bsc");
|
|
10
11
|
|
|
11
12
|
export const arbitrumToken: TokenCurrency = {
|
|
12
13
|
type: "TokenCurrency",
|
|
@@ -41,6 +42,45 @@ export const usdcToken: TokenCurrency = {
|
|
|
41
42
|
],
|
|
42
43
|
};
|
|
43
44
|
|
|
45
|
+
export const maticEth: TokenCurrency = {
|
|
46
|
+
type: "TokenCurrency" as const,
|
|
47
|
+
id: "ethereum/erc20/matic",
|
|
48
|
+
ledgerSignature: "",
|
|
49
|
+
contractAddress: "0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0",
|
|
50
|
+
parentCurrency: mockEthCryptoCurrency,
|
|
51
|
+
tokenType: "erc20" as const,
|
|
52
|
+
name: "Matic",
|
|
53
|
+
ticker: "MATIC",
|
|
54
|
+
delisted: false,
|
|
55
|
+
disableCountervalue: false,
|
|
56
|
+
units: [
|
|
57
|
+
{
|
|
58
|
+
name: "Matic",
|
|
59
|
+
code: "MATIC",
|
|
60
|
+
magnitude: 18,
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const maticBsc: TokenCurrency = {
|
|
66
|
+
type: "TokenCurrency" as const,
|
|
67
|
+
id: "bsc/bep20/matic_token",
|
|
68
|
+
ledgerSignature: "",
|
|
69
|
+
contractAddress: "0xCC42724C6683B7E57334c4E856f4c9965ED682bD",
|
|
70
|
+
parentCurrency: mockBscCryptoCurrency,
|
|
71
|
+
tokenType: "bep20" as const,
|
|
72
|
+
name: "Matic Token",
|
|
73
|
+
ticker: "MATIC",
|
|
74
|
+
delisted: false,
|
|
75
|
+
disableCountervalue: false,
|
|
76
|
+
units: [
|
|
77
|
+
{
|
|
78
|
+
name: "Matic Token",
|
|
79
|
+
code: "MATIC",
|
|
80
|
+
magnitude: 18,
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
};
|
|
44
84
|
export const findCryptoCurrencyById = (id: string) =>
|
|
45
85
|
[mockBtcCryptoCurrency, mockEthCryptoCurrency, mockArbitrumCryptoCurrency].find(a => a.id === id);
|
|
46
86
|
export const getTokenOrCryptoCurrencyById = (id: string) =>
|
|
@@ -70,6 +70,8 @@ export function useCurrenciesUnderFeatureFlag() {
|
|
|
70
70
|
const berachain = useFeature("currencyBerachain");
|
|
71
71
|
const hyperevm = useFeature("currencyHyperevm");
|
|
72
72
|
const canton = useFeature("currencyCantonNetwork");
|
|
73
|
+
const cantonDevnet = useFeature("currencyCantonNetworkDevnet");
|
|
74
|
+
const cantonTestnet = useFeature("currencyCantonNetworkTestnet");
|
|
73
75
|
const kaspa = useFeature("currencyKaspa");
|
|
74
76
|
const core = useFeature("currencyCore");
|
|
75
77
|
const ethereumHoodi = useFeature("currencyEthereumHoodi");
|
|
@@ -77,6 +79,7 @@ export function useCurrenciesUnderFeatureFlag() {
|
|
|
77
79
|
const assetHubWestend = useFeature("currencyAssetHubWestend");
|
|
78
80
|
const assetHubPolkadot = useFeature("currencyAssetHubPolkadot");
|
|
79
81
|
const polkadot = useFeature("currencyPolkadot");
|
|
82
|
+
const monad = useFeature("currencyMonad");
|
|
80
83
|
|
|
81
84
|
const featureFlaggedCurrencies = useMemo(
|
|
82
85
|
(): Partial<Record<CryptoCurrencyId, Feature<unknown> | null>> => ({
|
|
@@ -143,6 +146,8 @@ export function useCurrenciesUnderFeatureFlag() {
|
|
|
143
146
|
mina,
|
|
144
147
|
babylon,
|
|
145
148
|
canton_network: canton,
|
|
149
|
+
canton_network_devnet: cantonDevnet,
|
|
150
|
+
canton_network_testnet: cantonTestnet,
|
|
146
151
|
kaspa,
|
|
147
152
|
core,
|
|
148
153
|
ethereum_hoodi: ethereumHoodi,
|
|
@@ -150,6 +155,7 @@ export function useCurrenciesUnderFeatureFlag() {
|
|
|
150
155
|
assethub_westend: assetHubWestend,
|
|
151
156
|
assethub_polkadot: assetHubPolkadot,
|
|
152
157
|
polkadot,
|
|
158
|
+
monad,
|
|
153
159
|
}),
|
|
154
160
|
[
|
|
155
161
|
aptos,
|
|
@@ -222,6 +228,7 @@ export function useCurrenciesUnderFeatureFlag() {
|
|
|
222
228
|
assetHubWestend,
|
|
223
229
|
assetHubPolkadot,
|
|
224
230
|
polkadot,
|
|
231
|
+
monad,
|
|
225
232
|
],
|
|
226
233
|
);
|
|
227
234
|
|
|
@@ -2,17 +2,13 @@ import { CryptoOrTokenCurrency } from "@ledgerhq/types-cryptoassets";
|
|
|
2
2
|
export { groupCurrenciesByProvider } from "./groupCurrenciesByProvider";
|
|
3
3
|
export { sortAccountsByFiatValue } from "./sortAccountsByFiatValue";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const getBaseId = (currency: CryptoOrTokenCurrency) =>
|
|
6
|
+
currency.type === "CryptoCurrency" ? currency.id : currency.parentCurrency.id;
|
|
7
|
+
|
|
8
|
+
function belongsToSameNetwork(
|
|
6
9
|
elem: CryptoOrTokenCurrency,
|
|
7
10
|
network: CryptoOrTokenCurrency,
|
|
8
11
|
): boolean {
|
|
9
|
-
|
|
10
|
-
return elem.parentCurrency?.id === network.id || elem.id === network.id;
|
|
11
|
-
}
|
|
12
|
-
if (elem.type === "CryptoCurrency") {
|
|
13
|
-
return elem.id === network.id;
|
|
14
|
-
}
|
|
15
|
-
return false;
|
|
12
|
+
return getBaseId(elem) === getBaseId(network);
|
|
16
13
|
}
|
|
17
|
-
|
|
18
|
-
export { isCorrespondingCurrency };
|
|
14
|
+
export { getBaseId, belongsToSameNetwork };
|
|
@@ -6,7 +6,7 @@ import { usePostOnboardingEntryPointVisibleOnWallet } from "./usePostOnboardingE
|
|
|
6
6
|
|
|
7
7
|
const millisecondsInADay = 1000 * 60 * 60 * 24;
|
|
8
8
|
|
|
9
|
-
const isMoreThanSevenDaysAgo = (date: Date) => {
|
|
9
|
+
const isMoreThanSevenDaysAgo = (date: Date | null) => {
|
|
10
10
|
if (!date) return false;
|
|
11
11
|
|
|
12
12
|
const datePlusSevenDays = new Date(date).getTime() + 7 * millisecondsInADay;
|
|
@@ -26,15 +26,13 @@ export function usePostOnboardingHubState(): PostOnboardingHubState {
|
|
|
26
26
|
actionsState: [],
|
|
27
27
|
postOnboardingInProgress: hubState.postOnboardingInProgress,
|
|
28
28
|
};
|
|
29
|
-
const actionsState = hubState.actionsToComplete
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
.
|
|
35
|
-
|
|
36
|
-
!actionWithState.featureFlagId || getFeature(actionWithState.featureFlagId)?.enabled,
|
|
37
|
-
);
|
|
29
|
+
const actionsState = hubState.actionsToComplete.flatMap(actionId => {
|
|
30
|
+
const action = getPostOnboardingAction(actionId);
|
|
31
|
+
if (!action || (action.featureFlagId && !getFeature(action.featureFlagId)?.enabled)) {
|
|
32
|
+
return [];
|
|
33
|
+
}
|
|
34
|
+
return [{ ...action, completed: !!hubState.actionsCompleted[actionId] }];
|
|
35
|
+
});
|
|
38
36
|
const lastActionCompleted = hubState.lastActionCompleted
|
|
39
37
|
? getPostOnboardingAction(hubState.lastActionCompleted)
|
|
40
38
|
: null;
|
|
@@ -6,14 +6,14 @@ import { getMainAccount } from "../account";
|
|
|
6
6
|
import type { Account, AccountLike } from "@ledgerhq/types-live";
|
|
7
7
|
|
|
8
8
|
export type DeviceTransactionField = CommonDeviceTransactionField | ExtraDeviceTransactionField;
|
|
9
|
-
export function getDeviceTransactionConfig(arg: {
|
|
9
|
+
export async function getDeviceTransactionConfig(arg: {
|
|
10
10
|
account: AccountLike;
|
|
11
11
|
parentAccount: Account | null | undefined;
|
|
12
12
|
transaction: Transaction;
|
|
13
13
|
status: TransactionStatus;
|
|
14
|
-
}): Array<DeviceTransactionField
|
|
14
|
+
}): Promise<Array<DeviceTransactionField>> {
|
|
15
15
|
const mainAccount = getMainAccount(arg.account, arg.parentAccount);
|
|
16
16
|
const f = perFamily[mainAccount.currency.family];
|
|
17
17
|
if (!f) return [];
|
|
18
|
-
return f(arg);
|
|
18
|
+
return await f(arg);
|
|
19
19
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logic.d.ts","sourceRoot":"","sources":["../../../src/families/hedera/logic.ts"],"names":[],"mappings":"AACA,cAAc,6BAA6B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logic.js","sourceRoot":"","sources":["../../../src/families/hedera/logic.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4BAA4B;AAC5B,8DAA4C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logic.d.ts","sourceRoot":"","sources":["../../../src/families/hedera/logic.ts"],"names":[],"mappings":"AACA,cAAc,6BAA6B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logic.js","sourceRoot":"","sources":["../../../src/families/hedera/logic.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,cAAc,6BAA6B,CAAC"}
|