@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { makeLRUCache, minutes } from "@ledgerhq/live-network/cache";
|
|
2
2
|
import { createApi } from "@ledgerhq/coin-canton/api/index";
|
|
3
|
-
import { Transaction as CantonTransaction } from "@ledgerhq/coin-canton/types";
|
|
3
|
+
import { Transaction as CantonTransaction, CantonAccount } from "@ledgerhq/coin-canton/types";
|
|
4
4
|
import type { AccountBridge } from "@ledgerhq/types-live";
|
|
5
5
|
import { BigNumber } from "bignumber.js";
|
|
6
6
|
|
|
@@ -51,12 +51,12 @@ const getTransactionStatus = async (): Promise<any> => {
|
|
|
51
51
|
};
|
|
52
52
|
};
|
|
53
53
|
|
|
54
|
-
const estimateMaxSpendable = ({ account }: { account:
|
|
54
|
+
const estimateMaxSpendable = ({ account }: { account: CantonAccount }): Promise<BigNumber> => {
|
|
55
55
|
return Promise.resolve(account.balance || new BigNumber(0));
|
|
56
56
|
};
|
|
57
57
|
|
|
58
58
|
const prepareTransaction = async (
|
|
59
|
-
_account:
|
|
59
|
+
_account: CantonAccount,
|
|
60
60
|
transaction: CantonTransaction,
|
|
61
61
|
): Promise<CantonTransaction> => {
|
|
62
62
|
return {
|
|
@@ -65,17 +65,17 @@ const prepareTransaction = async (
|
|
|
65
65
|
};
|
|
66
66
|
};
|
|
67
67
|
|
|
68
|
-
const sync = (_initialAccount:
|
|
68
|
+
const sync = (_initialAccount: CantonAccount): any => {
|
|
69
69
|
return {
|
|
70
70
|
subscribe: (observer: any) => {
|
|
71
|
-
observer.next((acc:
|
|
71
|
+
observer.next((acc: CantonAccount) => acc);
|
|
72
72
|
observer.complete();
|
|
73
73
|
return { unsubscribe: () => {} };
|
|
74
74
|
},
|
|
75
75
|
};
|
|
76
76
|
};
|
|
77
77
|
|
|
78
|
-
const receive = (_account:
|
|
78
|
+
const receive = (_account: CantonAccount, _opts: { deviceId: string }): any => {
|
|
79
79
|
return {
|
|
80
80
|
subscribe: (observer: any) => {
|
|
81
81
|
observer.next({
|
|
@@ -144,6 +144,9 @@ const scanAccounts = (): any => {
|
|
|
144
144
|
lastSyncDate: new Date(),
|
|
145
145
|
operations: [],
|
|
146
146
|
pendingOperations: [],
|
|
147
|
+
cantonResources: {
|
|
148
|
+
instrumentUtxoCounts: {},
|
|
149
|
+
},
|
|
147
150
|
},
|
|
148
151
|
});
|
|
149
152
|
observer.complete();
|
|
@@ -156,7 +159,7 @@ const getSerializedAddressParameters = (): Buffer => {
|
|
|
156
159
|
return Buffer.from("mock-address-params");
|
|
157
160
|
};
|
|
158
161
|
|
|
159
|
-
const accountBridge: AccountBridge<CantonTransaction> = {
|
|
162
|
+
const accountBridge: AccountBridge<CantonTransaction, CantonAccount> = {
|
|
160
163
|
createTransaction,
|
|
161
164
|
updateTransaction,
|
|
162
165
|
getTransactionStatus,
|
|
@@ -14,6 +14,7 @@ export const cantonConfig: Record<string, ConfigInfo> = {
|
|
|
14
14
|
useGateway: true,
|
|
15
15
|
networkType: "mainnet",
|
|
16
16
|
nativeInstrumentId: "Amulet",
|
|
17
|
+
fee: 0,
|
|
17
18
|
},
|
|
18
19
|
},
|
|
19
20
|
config_currency_canton_network_devnet: {
|
|
@@ -29,6 +30,7 @@ export const cantonConfig: Record<string, ConfigInfo> = {
|
|
|
29
30
|
useGateway: true,
|
|
30
31
|
networkType: "devnet",
|
|
31
32
|
nativeInstrumentId: "Amulet",
|
|
33
|
+
fee: 0,
|
|
32
34
|
},
|
|
33
35
|
},
|
|
34
36
|
config_currency_canton_network_testnet: {
|
|
@@ -44,6 +46,7 @@ export const cantonConfig: Record<string, ConfigInfo> = {
|
|
|
44
46
|
nativeInstrumentId: "Amulet",
|
|
45
47
|
useGateway: true,
|
|
46
48
|
networkType: "testnet",
|
|
49
|
+
fee: 0,
|
|
47
50
|
},
|
|
48
51
|
},
|
|
49
52
|
};
|
|
@@ -5,10 +5,10 @@ import { getEnv } from "@ledgerhq/live-env";
|
|
|
5
5
|
import Transport from "@ledgerhq/hw-transport";
|
|
6
6
|
import { CantonSigner } from "@ledgerhq/coin-canton";
|
|
7
7
|
import cantonResolver from "@ledgerhq/coin-canton/signer";
|
|
8
|
-
import type {
|
|
8
|
+
import type { Bridge } from "@ledgerhq/types-live";
|
|
9
9
|
import makeCliTools from "@ledgerhq/coin-canton/test/cli";
|
|
10
10
|
import { CantonCoinConfig } from "@ledgerhq/coin-canton/config";
|
|
11
|
-
import { TransactionStatus, Transaction } from "@ledgerhq/coin-canton/types";
|
|
11
|
+
import { TransactionStatus, Transaction, CantonAccount } from "@ledgerhq/coin-canton/types";
|
|
12
12
|
import { LegacySignerCanton } from "@ledgerhq/live-signer-canton";
|
|
13
13
|
import { CreateSigner, createResolver, executeWithSigner } from "../../bridge/setup";
|
|
14
14
|
import cantonBridgeMock from "./bridge/mock";
|
|
@@ -27,7 +27,7 @@ const getCurrencyConfig = (currency?: CryptoCurrency) => {
|
|
|
27
27
|
return getCurrencyConfiguration<CantonCoinConfig>(currency);
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
const bridge: Bridge<Transaction,
|
|
30
|
+
const bridge: Bridge<Transaction, CantonAccount, TransactionStatus> = getEnv("MOCK")
|
|
31
31
|
? cantonBridgeMock
|
|
32
32
|
: createBridges(executeWithSigner(createSigner), getCurrencyConfig);
|
|
33
33
|
|
|
@@ -704,7 +704,7 @@ const evmConfig: CurrencyLiveConfigDefinition = {
|
|
|
704
704
|
},
|
|
705
705
|
node: {
|
|
706
706
|
type: "external",
|
|
707
|
-
uri: "https://
|
|
707
|
+
uri: "https://base-rpc.publicnode.com",
|
|
708
708
|
},
|
|
709
709
|
explorer: {
|
|
710
710
|
type: "etherscan",
|
|
@@ -925,6 +925,23 @@ const evmConfig: CurrencyLiveConfigDefinition = {
|
|
|
925
925
|
showNfts: false,
|
|
926
926
|
},
|
|
927
927
|
},
|
|
928
|
+
config_currency_monad: {
|
|
929
|
+
type: "object",
|
|
930
|
+
default: {
|
|
931
|
+
status: {
|
|
932
|
+
type: "active",
|
|
933
|
+
},
|
|
934
|
+
node: {
|
|
935
|
+
type: "external",
|
|
936
|
+
uri: "https://rpc.monad.xyz",
|
|
937
|
+
},
|
|
938
|
+
explorer: {
|
|
939
|
+
type: "etherscan",
|
|
940
|
+
uri: "https://proxyetherscan.api.live.ledger.com/v2/api/143",
|
|
941
|
+
},
|
|
942
|
+
showNfts: false,
|
|
943
|
+
},
|
|
944
|
+
},
|
|
928
945
|
};
|
|
929
946
|
|
|
930
947
|
export { evmConfig };
|