@ledgerhq/live-common 34.46.0 → 34.47.0-nightly.1
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/bridge/crypto-assets/index.d.ts +1 -1
- package/lib/bridge/crypto-assets/index.d.ts.map +1 -1
- package/lib/bridge/crypto-assets/index.js +1 -1
- package/lib/bridge/crypto-assets/index.js.map +1 -1
- package/lib/bridge/generic-alpaca/estimateMaxSpendable.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/estimateMaxSpendable.js +6 -4
- package/lib/bridge/generic-alpaca/estimateMaxSpendable.js.map +1 -1
- package/lib/bridge/generic-alpaca/getTransactionStatus.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/getTransactionStatus.js +2 -2
- package/lib/bridge/generic-alpaca/getTransactionStatus.js.map +1 -1
- package/lib/bridge/generic-alpaca/prepareTransaction.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/prepareTransaction.js +12 -12
- package/lib/bridge/generic-alpaca/prepareTransaction.js.map +1 -1
- package/lib/bridge/generic-alpaca/signOperation.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/signOperation.js +3 -4
- package/lib/bridge/generic-alpaca/signOperation.js.map +1 -1
- package/lib/bridge/generic-alpaca/tests/prepareTransaction.test.js +1 -1
- package/lib/bridge/generic-alpaca/tests/prepareTransaction.test.js.map +1 -1
- package/lib/bridge/generic-alpaca/utils.d.ts +0 -1
- package/lib/bridge/generic-alpaca/utils.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/utils.js +0 -1
- package/lib/bridge/generic-alpaca/utils.js.map +1 -1
- package/lib/bridge/impl.d.ts +1 -1
- package/lib/bridge/impl.d.ts.map +1 -1
- package/lib/currencies/index.d.ts +1 -1
- package/lib/currencies/index.d.ts.map +1 -1
- package/lib/currencies/index.js +1 -2
- package/lib/currencies/index.js.map +1 -1
- package/lib/currencies/sortByMarketcap.test.js +2 -1
- package/lib/currencies/sortByMarketcap.test.js.map +1 -1
- package/lib/domain/getTokensWithFunds.test.js +1 -1
- package/lib/domain/getTokensWithFunds.test.js.map +1 -1
- package/lib/e2e/enum/AppInfos.d.ts +1 -1
- package/lib/e2e/enum/AppInfos.d.ts.map +1 -1
- package/lib/e2e/enum/DeviceLabels.d.ts +3 -2
- package/lib/e2e/enum/DeviceLabels.d.ts.map +1 -1
- package/lib/e2e/enum/DeviceLabels.js +2 -1
- package/lib/e2e/enum/DeviceLabels.js.map +1 -1
- package/lib/e2e/enum/Provider.d.ts.map +1 -1
- package/lib/e2e/enum/Provider.js +2 -2
- package/lib/e2e/enum/Provider.js.map +1 -1
- package/lib/e2e/families/solana.d.ts.map +1 -1
- package/lib/e2e/families/solana.js +4 -4
- package/lib/e2e/families/solana.js.map +1 -1
- package/lib/e2e/index.d.ts +5 -0
- package/lib/e2e/index.d.ts.map +1 -1
- package/lib/e2e/speculos.d.ts.map +1 -1
- package/lib/e2e/speculos.js +4 -5
- package/lib/e2e/speculos.js.map +1 -1
- package/lib/e2e/speculosCI.d.ts +4 -0
- package/lib/e2e/speculosCI.d.ts.map +1 -1
- package/lib/e2e/speculosCI.js +16 -6
- 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/api/v5/actions.js +1 -1
- package/lib/exchange/swap/api/v5/actions.js.map +1 -1
- package/lib/exchange/swap/types.d.ts +1 -1
- package/lib/exchange/swap/types.d.ts.map +1 -1
- package/lib/families/canton/config.d.ts.map +1 -1
- package/lib/families/canton/config.js +35 -1
- package/lib/families/canton/config.js.map +1 -1
- package/lib/families/evm/setup.d.ts.map +1 -1
- package/lib/families/evm/setup.js +11 -1
- package/lib/families/evm/setup.js.map +1 -1
- package/lib/families/hedera/constants.d.ts +2 -0
- package/lib/families/hedera/constants.d.ts.map +1 -0
- package/lib/families/hedera/constants.js +19 -0
- package/lib/families/hedera/constants.js.map +1 -0
- package/lib/families/hedera/setup.d.ts +5 -5
- package/lib/families/hedera/setup.d.ts.map +1 -1
- package/lib/families/hedera/setup.js.map +1 -1
- package/lib/families/solana/setup.d.ts.map +1 -1
- package/lib/families/solana/setup.js +2 -1
- package/lib/families/solana/setup.js.map +1 -1
- package/lib/families/sui/constants.d.ts +2 -0
- package/lib/families/sui/constants.d.ts.map +1 -0
- package/lib/families/sui/constants.js +19 -0
- package/lib/families/sui/constants.js.map +1 -0
- package/lib/families/sui/logic.d.ts +2 -0
- package/lib/families/sui/logic.d.ts.map +1 -0
- package/lib/families/sui/logic.js +19 -0
- package/lib/families/sui/logic.js.map +1 -0
- package/lib/families/sui/react.d.ts +8 -0
- package/lib/families/sui/react.d.ts.map +1 -0
- package/lib/families/sui/react.js +85 -0
- package/lib/families/sui/react.js.map +1 -0
- package/lib/families/sui/types.d.ts +2 -0
- package/lib/families/sui/types.d.ts.map +1 -0
- package/lib/families/sui/types.js +19 -0
- package/lib/families/sui/types.js.map +1 -0
- package/lib/featureFlags/defaultFeatures.d.ts.map +1 -1
- package/lib/featureFlags/defaultFeatures.js +1 -0
- package/lib/featureFlags/defaultFeatures.js.map +1 -1
- package/lib/featureFlags/useFeature.d.ts +1 -1
- package/lib/featureFlags/useFeature.d.ts.map +1 -1
- package/lib/generated/bridge/js.d.ts +1 -1
- package/lib/market/utils/countervalueFormatter.d.ts.map +1 -1
- package/lib/market/utils/countervalueFormatter.js.map +1 -1
- package/lib/market/utils/types.d.ts +2 -0
- package/lib/market/utils/types.d.ts.map +1 -1
- package/lib/modularDrawer/__mocks__/currencies.mock.d.ts.map +1 -1
- package/lib/modularDrawer/__mocks__/currencies.mock.js +7 -7
- package/lib/modularDrawer/__mocks__/currencies.mock.js.map +1 -1
- package/lib/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.js +1 -1
- package/lib/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.js.map +1 -1
- package/lib/modularDrawer/data/entities/index.d.ts +68 -0
- package/lib/modularDrawer/data/entities/index.d.ts.map +1 -0
- package/lib/modularDrawer/data/entities/index.js +3 -0
- package/lib/modularDrawer/data/entities/index.js.map +1 -0
- package/lib/modularDrawer/data/state-manager/api.d.ts +857 -0
- package/lib/modularDrawer/data/state-manager/api.d.ts.map +1 -0
- package/lib/modularDrawer/data/state-manager/api.js +63 -0
- package/lib/modularDrawer/data/state-manager/api.js.map +1 -0
- package/lib/modularDrawer/hooks/__test__/useAssetsData.test.d.ts +5 -0
- package/lib/modularDrawer/hooks/__test__/useAssetsData.test.d.ts.map +1 -0
- package/lib/modularDrawer/hooks/__test__/useAssetsData.test.js +176 -0
- package/lib/modularDrawer/hooks/__test__/useAssetsData.test.js.map +1 -0
- package/lib/modularDrawer/hooks/modules/useAssetAccountCounts.d.ts +19 -0
- package/lib/modularDrawer/hooks/modules/useAssetAccountCounts.d.ts.map +1 -0
- package/lib/modularDrawer/hooks/modules/useAssetAccountCounts.js +16 -0
- package/lib/modularDrawer/hooks/modules/useAssetAccountCounts.js.map +1 -0
- package/lib/modularDrawer/hooks/modules/useLeftApyModule.d.ts +52 -0
- package/lib/modularDrawer/hooks/modules/useLeftApyModule.d.ts.map +1 -0
- package/lib/modularDrawer/hooks/modules/useLeftApyModule.js +18 -0
- package/lib/modularDrawer/hooks/modules/useLeftApyModule.js.map +1 -0
- package/lib/modularDrawer/hooks/useAssetsData.d.ts +12 -0
- package/lib/modularDrawer/hooks/useAssetsData.d.ts.map +1 -0
- package/lib/modularDrawer/hooks/useAssetsData.js +50 -0
- package/lib/modularDrawer/hooks/useAssetsData.js.map +1 -0
- package/lib/modularDrawer/types.d.ts +2 -0
- package/lib/modularDrawer/types.d.ts.map +1 -0
- package/lib/modularDrawer/types.js +3 -0
- package/lib/modularDrawer/types.js.map +1 -0
- package/lib/modularDrawer/utils/__tests__/counterValueFormatter.test.d.ts +2 -0
- package/lib/modularDrawer/utils/__tests__/counterValueFormatter.test.d.ts.map +1 -0
- package/lib/modularDrawer/utils/__tests__/counterValueFormatter.test.js +496 -0
- package/lib/modularDrawer/utils/__tests__/counterValueFormatter.test.js.map +1 -0
- package/lib/modularDrawer/utils/__tests__/currencyUtils.test.js +1 -1
- package/lib/modularDrawer/utils/__tests__/currencyUtils.test.js.map +1 -1
- package/lib/modularDrawer/utils/__tests__/haveOneCommonProvider.test.js +1 -1
- package/lib/modularDrawer/utils/__tests__/haveOneCommonProvider.test.js.map +1 -1
- package/lib/modularDrawer/utils/calculateProviderTotal.d.ts +9 -0
- package/lib/modularDrawer/utils/calculateProviderTotal.d.ts.map +1 -0
- package/lib/modularDrawer/utils/calculateProviderTotal.js +23 -0
- package/lib/modularDrawer/utils/calculateProviderTotal.js.map +1 -0
- package/lib/modularDrawer/utils/counterValueFormatter.d.ts +14 -0
- package/lib/modularDrawer/utils/counterValueFormatter.d.ts.map +1 -0
- package/lib/modularDrawer/utils/counterValueFormatter.js +107 -0
- package/lib/modularDrawer/utils/counterValueFormatter.js.map +1 -0
- package/lib/modularDrawer/utils/getBalanceAndFiatValueByAssets.d.ts +11 -0
- package/lib/modularDrawer/utils/getBalanceAndFiatValueByAssets.d.ts.map +1 -0
- package/lib/modularDrawer/utils/getBalanceAndFiatValueByAssets.js +45 -0
- package/lib/modularDrawer/utils/getBalanceAndFiatValueByAssets.js.map +1 -0
- package/lib/modularDrawer/utils/getProviderCurrency.d.ts +3 -0
- package/lib/modularDrawer/utils/getProviderCurrency.d.ts.map +1 -0
- package/lib/modularDrawer/utils/getProviderCurrency.js +14 -0
- package/lib/modularDrawer/utils/getProviderCurrency.js.map +1 -0
- package/lib/modularDrawer/utils/groupAccountsByAsset.d.ts +11 -0
- package/lib/modularDrawer/utils/groupAccountsByAsset.d.ts.map +1 -0
- package/lib/modularDrawer/utils/groupAccountsByAsset.js +32 -0
- package/lib/modularDrawer/utils/groupAccountsByAsset.js.map +1 -0
- package/lib/modularDrawer/utils/parseToBigNumber.d.ts +9 -0
- package/lib/modularDrawer/utils/parseToBigNumber.d.ts.map +1 -0
- package/lib/modularDrawer/utils/parseToBigNumber.js +24 -0
- package/lib/modularDrawer/utils/parseToBigNumber.js.map +1 -0
- package/lib/modularDrawer/utils/type.d.ts +21 -0
- package/lib/modularDrawer/utils/type.d.ts.map +1 -0
- package/lib/modularDrawer/utils/type.js +3 -0
- package/lib/modularDrawer/utils/type.js.map +1 -0
- package/lib/utils/__tests__/getAccountTuplesForCurrency.test.js +1 -1
- package/lib/utils/__tests__/getAccountTuplesForCurrency.test.js.map +1 -1
- package/lib/wallet-api/Exchange/error.d.ts +1 -0
- package/lib/wallet-api/Exchange/error.d.ts.map +1 -1
- package/lib/wallet-api/Exchange/error.js +11 -1
- package/lib/wallet-api/Exchange/error.js.map +1 -1
- package/lib/wallet-api/Exchange/server.d.ts +2 -0
- package/lib/wallet-api/Exchange/server.d.ts.map +1 -1
- package/lib/wallet-api/Exchange/server.js +29 -5
- package/lib/wallet-api/Exchange/server.js.map +1 -1
- package/lib/wallet-api/Exchange/server.test.js +3 -0
- package/lib/wallet-api/Exchange/server.test.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/bridge/crypto-assets/index.d.ts +1 -1
- package/lib-es/bridge/crypto-assets/index.d.ts.map +1 -1
- package/lib-es/bridge/crypto-assets/index.js +1 -1
- package/lib-es/bridge/crypto-assets/index.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/estimateMaxSpendable.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/estimateMaxSpendable.js +6 -4
- package/lib-es/bridge/generic-alpaca/estimateMaxSpendable.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/getTransactionStatus.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/getTransactionStatus.js +2 -2
- package/lib-es/bridge/generic-alpaca/getTransactionStatus.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/prepareTransaction.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/prepareTransaction.js +12 -12
- package/lib-es/bridge/generic-alpaca/prepareTransaction.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/signOperation.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/signOperation.js +3 -4
- package/lib-es/bridge/generic-alpaca/signOperation.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/tests/prepareTransaction.test.js +1 -1
- package/lib-es/bridge/generic-alpaca/tests/prepareTransaction.test.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/utils.d.ts +0 -1
- package/lib-es/bridge/generic-alpaca/utils.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/utils.js +0 -1
- package/lib-es/bridge/generic-alpaca/utils.js.map +1 -1
- package/lib-es/bridge/impl.d.ts +1 -1
- package/lib-es/bridge/impl.d.ts.map +1 -1
- package/lib-es/currencies/index.d.ts +1 -1
- package/lib-es/currencies/index.d.ts.map +1 -1
- package/lib-es/currencies/index.js +1 -1
- package/lib-es/currencies/index.js.map +1 -1
- package/lib-es/currencies/sortByMarketcap.test.js +2 -1
- package/lib-es/currencies/sortByMarketcap.test.js.map +1 -1
- package/lib-es/domain/getTokensWithFunds.test.js +1 -1
- package/lib-es/domain/getTokensWithFunds.test.js.map +1 -1
- package/lib-es/e2e/enum/AppInfos.d.ts +1 -1
- package/lib-es/e2e/enum/AppInfos.d.ts.map +1 -1
- package/lib-es/e2e/enum/DeviceLabels.d.ts +3 -2
- package/lib-es/e2e/enum/DeviceLabels.d.ts.map +1 -1
- package/lib-es/e2e/enum/DeviceLabels.js +2 -1
- package/lib-es/e2e/enum/DeviceLabels.js.map +1 -1
- package/lib-es/e2e/enum/Provider.d.ts.map +1 -1
- package/lib-es/e2e/enum/Provider.js +2 -2
- package/lib-es/e2e/enum/Provider.js.map +1 -1
- package/lib-es/e2e/families/solana.d.ts.map +1 -1
- package/lib-es/e2e/families/solana.js +4 -4
- package/lib-es/e2e/families/solana.js.map +1 -1
- package/lib-es/e2e/index.d.ts +5 -0
- package/lib-es/e2e/index.d.ts.map +1 -1
- package/lib-es/e2e/speculos.d.ts.map +1 -1
- package/lib-es/e2e/speculos.js +4 -5
- package/lib-es/e2e/speculos.js.map +1 -1
- package/lib-es/e2e/speculosCI.d.ts +4 -0
- package/lib-es/e2e/speculosCI.d.ts.map +1 -1
- package/lib-es/e2e/speculosCI.js +14 -5
- 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/api/v5/actions.js +1 -1
- package/lib-es/exchange/swap/api/v5/actions.js.map +1 -1
- package/lib-es/exchange/swap/types.d.ts +1 -1
- package/lib-es/exchange/swap/types.d.ts.map +1 -1
- package/lib-es/families/canton/config.d.ts.map +1 -1
- package/lib-es/families/canton/config.js +35 -1
- package/lib-es/families/canton/config.js.map +1 -1
- package/lib-es/families/evm/setup.d.ts.map +1 -1
- package/lib-es/families/evm/setup.js +11 -1
- package/lib-es/families/evm/setup.js.map +1 -1
- package/lib-es/families/hedera/constants.d.ts +2 -0
- package/lib-es/families/hedera/constants.d.ts.map +1 -0
- package/lib-es/families/hedera/constants.js +3 -0
- package/lib-es/families/hedera/constants.js.map +1 -0
- package/lib-es/families/hedera/setup.d.ts +5 -5
- package/lib-es/families/hedera/setup.d.ts.map +1 -1
- package/lib-es/families/hedera/setup.js.map +1 -1
- package/lib-es/families/solana/setup.d.ts.map +1 -1
- package/lib-es/families/solana/setup.js +2 -1
- package/lib-es/families/solana/setup.js.map +1 -1
- package/lib-es/families/sui/constants.d.ts +2 -0
- package/lib-es/families/sui/constants.d.ts.map +1 -0
- package/lib-es/families/sui/constants.js +3 -0
- package/lib-es/families/sui/constants.js.map +1 -0
- package/lib-es/families/sui/logic.d.ts +2 -0
- package/lib-es/families/sui/logic.d.ts.map +1 -0
- package/lib-es/families/sui/logic.js +3 -0
- package/lib-es/families/sui/logic.js.map +1 -0
- package/lib-es/families/sui/react.d.ts +8 -0
- package/lib-es/families/sui/react.d.ts.map +1 -0
- package/lib-es/families/sui/react.js +78 -0
- package/lib-es/families/sui/react.js.map +1 -0
- package/lib-es/families/sui/types.d.ts +2 -0
- package/lib-es/families/sui/types.d.ts.map +1 -0
- package/lib-es/families/sui/types.js +3 -0
- package/lib-es/families/sui/types.js.map +1 -0
- package/lib-es/featureFlags/defaultFeatures.d.ts.map +1 -1
- package/lib-es/featureFlags/defaultFeatures.js +1 -0
- package/lib-es/featureFlags/defaultFeatures.js.map +1 -1
- package/lib-es/featureFlags/useFeature.d.ts +1 -1
- package/lib-es/featureFlags/useFeature.d.ts.map +1 -1
- package/lib-es/generated/bridge/js.d.ts +1 -1
- package/lib-es/market/utils/countervalueFormatter.d.ts.map +1 -1
- package/lib-es/market/utils/countervalueFormatter.js.map +1 -1
- package/lib-es/market/utils/types.d.ts +2 -0
- package/lib-es/market/utils/types.d.ts.map +1 -1
- package/lib-es/modularDrawer/__mocks__/currencies.mock.d.ts.map +1 -1
- package/lib-es/modularDrawer/__mocks__/currencies.mock.js +1 -1
- package/lib-es/modularDrawer/__mocks__/currencies.mock.js.map +1 -1
- package/lib-es/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.js +1 -1
- package/lib-es/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.js.map +1 -1
- package/lib-es/modularDrawer/data/entities/index.d.ts +68 -0
- package/lib-es/modularDrawer/data/entities/index.d.ts.map +1 -0
- package/lib-es/modularDrawer/data/entities/index.js +2 -0
- package/lib-es/modularDrawer/data/entities/index.js.map +1 -0
- package/lib-es/modularDrawer/data/state-manager/api.d.ts +857 -0
- package/lib-es/modularDrawer/data/state-manager/api.d.ts.map +1 -0
- package/lib-es/modularDrawer/data/state-manager/api.js +60 -0
- package/lib-es/modularDrawer/data/state-manager/api.js.map +1 -0
- package/lib-es/modularDrawer/hooks/__test__/useAssetsData.test.d.ts +5 -0
- package/lib-es/modularDrawer/hooks/__test__/useAssetsData.test.d.ts.map +1 -0
- package/lib-es/modularDrawer/hooks/__test__/useAssetsData.test.js +174 -0
- package/lib-es/modularDrawer/hooks/__test__/useAssetsData.test.js.map +1 -0
- package/lib-es/modularDrawer/hooks/modules/useAssetAccountCounts.d.ts +19 -0
- package/lib-es/modularDrawer/hooks/modules/useAssetAccountCounts.d.ts.map +1 -0
- package/lib-es/modularDrawer/hooks/modules/useAssetAccountCounts.js +12 -0
- package/lib-es/modularDrawer/hooks/modules/useAssetAccountCounts.js.map +1 -0
- package/lib-es/modularDrawer/hooks/modules/useLeftApyModule.d.ts +52 -0
- package/lib-es/modularDrawer/hooks/modules/useLeftApyModule.d.ts.map +1 -0
- package/lib-es/modularDrawer/hooks/modules/useLeftApyModule.js +11 -0
- package/lib-es/modularDrawer/hooks/modules/useLeftApyModule.js.map +1 -0
- package/lib-es/modularDrawer/hooks/useAssetsData.d.ts +12 -0
- package/lib-es/modularDrawer/hooks/useAssetsData.d.ts.map +1 -0
- package/lib-es/modularDrawer/hooks/useAssetsData.js +46 -0
- package/lib-es/modularDrawer/hooks/useAssetsData.js.map +1 -0
- package/lib-es/modularDrawer/types.d.ts +2 -0
- package/lib-es/modularDrawer/types.d.ts.map +1 -0
- package/lib-es/modularDrawer/types.js +2 -0
- package/lib-es/modularDrawer/types.js.map +1 -0
- package/lib-es/modularDrawer/utils/__tests__/counterValueFormatter.test.d.ts +2 -0
- package/lib-es/modularDrawer/utils/__tests__/counterValueFormatter.test.d.ts.map +1 -0
- package/lib-es/modularDrawer/utils/__tests__/counterValueFormatter.test.js +494 -0
- package/lib-es/modularDrawer/utils/__tests__/counterValueFormatter.test.js.map +1 -0
- package/lib-es/modularDrawer/utils/__tests__/currencyUtils.test.js +1 -1
- package/lib-es/modularDrawer/utils/__tests__/currencyUtils.test.js.map +1 -1
- package/lib-es/modularDrawer/utils/__tests__/haveOneCommonProvider.test.js +1 -1
- package/lib-es/modularDrawer/utils/__tests__/haveOneCommonProvider.test.js.map +1 -1
- package/lib-es/modularDrawer/utils/calculateProviderTotal.d.ts +9 -0
- package/lib-es/modularDrawer/utils/calculateProviderTotal.d.ts.map +1 -0
- package/lib-es/modularDrawer/utils/calculateProviderTotal.js +16 -0
- package/lib-es/modularDrawer/utils/calculateProviderTotal.js.map +1 -0
- package/lib-es/modularDrawer/utils/counterValueFormatter.d.ts +14 -0
- package/lib-es/modularDrawer/utils/counterValueFormatter.d.ts.map +1 -0
- package/lib-es/modularDrawer/utils/counterValueFormatter.js +103 -0
- package/lib-es/modularDrawer/utils/counterValueFormatter.js.map +1 -0
- package/lib-es/modularDrawer/utils/getBalanceAndFiatValueByAssets.d.ts +11 -0
- package/lib-es/modularDrawer/utils/getBalanceAndFiatValueByAssets.d.ts.map +1 -0
- package/lib-es/modularDrawer/utils/getBalanceAndFiatValueByAssets.js +41 -0
- package/lib-es/modularDrawer/utils/getBalanceAndFiatValueByAssets.js.map +1 -0
- package/lib-es/modularDrawer/utils/getProviderCurrency.d.ts +3 -0
- package/lib-es/modularDrawer/utils/getProviderCurrency.d.ts.map +1 -0
- package/lib-es/modularDrawer/utils/getProviderCurrency.js +10 -0
- package/lib-es/modularDrawer/utils/getProviderCurrency.js.map +1 -0
- package/lib-es/modularDrawer/utils/groupAccountsByAsset.d.ts +11 -0
- package/lib-es/modularDrawer/utils/groupAccountsByAsset.d.ts.map +1 -0
- package/lib-es/modularDrawer/utils/groupAccountsByAsset.js +25 -0
- package/lib-es/modularDrawer/utils/groupAccountsByAsset.js.map +1 -0
- package/lib-es/modularDrawer/utils/parseToBigNumber.d.ts +9 -0
- package/lib-es/modularDrawer/utils/parseToBigNumber.d.ts.map +1 -0
- package/lib-es/modularDrawer/utils/parseToBigNumber.js +17 -0
- package/lib-es/modularDrawer/utils/parseToBigNumber.js.map +1 -0
- package/lib-es/modularDrawer/utils/type.d.ts +21 -0
- package/lib-es/modularDrawer/utils/type.d.ts.map +1 -0
- package/lib-es/modularDrawer/utils/type.js +2 -0
- package/lib-es/modularDrawer/utils/type.js.map +1 -0
- package/lib-es/utils/__tests__/getAccountTuplesForCurrency.test.js +1 -1
- package/lib-es/utils/__tests__/getAccountTuplesForCurrency.test.js.map +1 -1
- package/lib-es/wallet-api/Exchange/error.d.ts +1 -0
- package/lib-es/wallet-api/Exchange/error.d.ts.map +1 -1
- package/lib-es/wallet-api/Exchange/error.js +9 -0
- package/lib-es/wallet-api/Exchange/error.js.map +1 -1
- package/lib-es/wallet-api/Exchange/server.d.ts +2 -0
- package/lib-es/wallet-api/Exchange/server.d.ts.map +1 -1
- package/lib-es/wallet-api/Exchange/server.js +30 -6
- package/lib-es/wallet-api/Exchange/server.js.map +1 -1
- package/lib-es/wallet-api/Exchange/server.test.js +3 -0
- package/lib-es/wallet-api/Exchange/server.test.js.map +1 -1
- package/package.json +68 -66
- package/src/DataModel.test.ts +1 -1
- package/src/__tests__/accounts/groupPerDay.ts +1 -1
- package/src/__tests__/test-helpers/environment.ts +2 -0
- package/src/__tests__/test-helpers/setup.ts +1 -1
- package/src/account/serialization.test.ts +1 -1
- package/src/bridge/crypto-assets/index.test.ts +1 -1
- package/src/bridge/crypto-assets/index.ts +3 -2
- package/src/bridge/generic-alpaca/estimateMaxSpendable.ts +11 -5
- package/src/bridge/generic-alpaca/getTransactionStatus.ts +2 -1
- package/src/bridge/generic-alpaca/prepareTransaction.ts +20 -16
- package/src/bridge/generic-alpaca/signOperation.ts +3 -2
- package/src/bridge/generic-alpaca/tests/prepareTransaction.test.ts +1 -1
- package/src/bridge/generic-alpaca/utils.ts +0 -2
- package/src/bridge/impl.ts +1 -1
- package/src/currencies/index.ts +0 -1
- package/src/currencies/sortByMarketcap.test.ts +3 -2
- package/src/domain/getTokensWithFunds.test.ts +1 -1
- package/src/e2e/enum/AppInfos.ts +1 -1
- package/src/e2e/enum/DeviceLabels.ts +2 -1
- package/src/e2e/enum/Provider.ts +2 -2
- package/src/e2e/families/solana.ts +7 -4
- package/src/e2e/speculos.ts +4 -5
- package/src/e2e/speculosCI.ts +18 -6
- package/src/exchange/swap/api/v5/actions.ts +1 -1
- package/src/exchange/swap/types.ts +1 -1
- package/src/families/bitcoin/__snapshots__/bridge.integration.test.ts.snap +7 -0
- package/src/families/bitcoin/satstack.test.ts +1 -1
- package/src/families/canton/config.ts +36 -1
- package/src/families/evm/setup.ts +12 -1
- package/src/families/hedera/__snapshots__/bridge.integration.test.ts.snap +464 -1135
- package/src/families/hedera/constants.ts +2 -0
- package/src/families/hedera/setup.ts +7 -3
- package/src/families/solana/setup.ts +2 -0
- package/src/families/sui/__snapshots__/bridge.integration.test.ts.snap +3 -1
- package/src/families/sui/constants.ts +2 -0
- package/src/families/sui/logic.ts +2 -0
- package/src/families/sui/react.ts +115 -0
- package/src/families/sui/types.ts +2 -0
- package/src/families/tron/data.mock.ts +1 -1
- package/src/featureFlags/defaultFeatures.ts +1 -0
- package/src/market/utils/countervalueFormatter.ts +0 -1
- package/src/market/utils/types.ts +4 -0
- package/src/modularDrawer/__mocks__/currencies.mock.ts +1 -1
- package/src/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.ts +1 -1
- package/src/modularDrawer/data/entities/index.ts +79 -0
- package/src/modularDrawer/data/state-manager/api.ts +83 -0
- package/src/modularDrawer/hooks/__test__/useAssetsData.test.ts +200 -0
- package/src/modularDrawer/hooks/modules/useAssetAccountCounts.tsx +36 -0
- package/src/modularDrawer/hooks/modules/useLeftApyModule.tsx +26 -0
- package/src/modularDrawer/hooks/useAssetsData.ts +59 -0
- package/src/modularDrawer/types.ts +1 -0
- package/src/modularDrawer/utils/__tests__/counterValueFormatter.test.ts +549 -0
- package/src/modularDrawer/utils/__tests__/currencyUtils.test.ts +1 -1
- package/src/modularDrawer/utils/__tests__/haveOneCommonProvider.test.ts +2 -2
- package/src/modularDrawer/utils/calculateProviderTotal.ts +23 -0
- package/src/modularDrawer/utils/counterValueFormatter.ts +165 -0
- package/src/modularDrawer/utils/getBalanceAndFiatValueByAssets.ts +76 -0
- package/src/modularDrawer/utils/getProviderCurrency.ts +13 -0
- package/src/modularDrawer/utils/groupAccountsByAsset.ts +51 -0
- package/src/modularDrawer/utils/parseToBigNumber.ts +17 -0
- package/src/modularDrawer/utils/type.ts +22 -0
- package/src/utils/__tests__/getAccountTuplesForCurrency.test.ts +1 -1
- package/src/wallet-api/Exchange/error.ts +10 -0
- package/src/wallet-api/Exchange/server.test.ts +5 -1
- package/src/wallet-api/Exchange/server.ts +44 -5
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ledgerhq/live-common",
|
3
3
|
"description": "Common ground for the Ledger Live apps",
|
4
|
-
"version": "34.
|
4
|
+
"version": "34.47.0-nightly.1",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
7
7
|
"url": "https://github.com/LedgerHQ/ledger-live.git"
|
@@ -111,7 +111,8 @@
|
|
111
111
|
"@ledgerhq/wallet-api-client": "^1.9.1",
|
112
112
|
"@ledgerhq/wallet-api-core": "^1.21.1",
|
113
113
|
"@ledgerhq/wallet-api-server": "^1.10.1",
|
114
|
-
"@
|
114
|
+
"@reduxjs/toolkit": "2.8.2",
|
115
|
+
"@stellar/stellar-sdk": "^14.0.0",
|
115
116
|
"@stricahq/typhonjs": "^3.0.0",
|
116
117
|
"@taquito/ledger-signer": "^22.0.0",
|
117
118
|
"@ton-community/ton-ledger": "^7.2.0",
|
@@ -129,7 +130,7 @@
|
|
129
130
|
"@zondax/ledger-mina-js": "0.0.2",
|
130
131
|
"@zondax/ledger-stacks": "^1.0.2",
|
131
132
|
"async": "^3.2.3",
|
132
|
-
"axios": "1.
|
133
|
+
"axios": "1.11.0",
|
133
134
|
"bech32": "^1.1.3",
|
134
135
|
"bignumber.js": "^9.1.2",
|
135
136
|
"bip32": "^2.0.6",
|
@@ -138,6 +139,7 @@
|
|
138
139
|
"date-fns": "^2.23.0",
|
139
140
|
"expect": "^27.4.6",
|
140
141
|
"fuse.js": "^6.6.2",
|
142
|
+
"i18next": "20.6.1",
|
141
143
|
"invariant": "^2.2.2",
|
142
144
|
"isomorphic-ws": "^4.0.1",
|
143
145
|
"jotai": "2.12.4",
|
@@ -163,76 +165,76 @@
|
|
163
165
|
"xstate": "^5.19.2",
|
164
166
|
"yargs": "^17.0.0",
|
165
167
|
"zod": "^3.22.4",
|
166
|
-
"@ledgerhq/coin-algorand": "^0.9.
|
167
|
-
"@ledgerhq/coin-aptos": "^3.1.
|
168
|
-
"@ledgerhq/coin-bitcoin": "^0.20.
|
169
|
-
"@ledgerhq/coin-canton": "^0.
|
170
|
-
"@ledgerhq/coin-cardano": "^0.11.
|
171
|
-
"@ledgerhq/coin-casper": "^2.0.
|
172
|
-
"@ledgerhq/coin-celo": "^1.2.
|
173
|
-
"@ledgerhq/coin-cosmos": "^0.16.
|
174
|
-
"@ledgerhq/coin-evm": "^2.
|
175
|
-
"@ledgerhq/coin-filecoin": "^1.10.
|
176
|
-
"@ledgerhq/coin-framework": "^6.2.0",
|
177
|
-
"@ledgerhq/coin-hedera": "^1.10.
|
178
|
-
"@ledgerhq/coin-icon": "^0.11.
|
179
|
-
"@ledgerhq/coin-internet_computer": "^1.7.
|
180
|
-
"@ledgerhq/coin-mina": "^1.1.
|
181
|
-
"@ledgerhq/coin-multiversx": "^0.4.
|
182
|
-
"@ledgerhq/coin-near": "^0.12.
|
183
|
-
"@ledgerhq/coin-polkadot": "^6.8.0",
|
184
|
-
"@ledgerhq/coin-solana": "^0.31.
|
185
|
-
"@ledgerhq/coin-stacks": "^0.8.
|
186
|
-
"@ledgerhq/coin-stellar": "^6.
|
187
|
-
"@ledgerhq/coin-sui": "^0.
|
188
|
-
"@ledgerhq/coin-tezos": "^6.2.0",
|
189
|
-
"@ledgerhq/coin-ton": "^0.13.
|
190
|
-
"@ledgerhq/coin-tron": "^5.
|
191
|
-
"@ledgerhq/coin-vechain": "^2.8.
|
192
|
-
"@ledgerhq/coin-xrp": "^7.2.0",
|
193
|
-
"@ledgerhq/crypto-icons-ui": "^1.
|
194
|
-
"@ledgerhq/cryptoassets": "^13.
|
168
|
+
"@ledgerhq/coin-algorand": "^0.9.19-nightly.0",
|
169
|
+
"@ledgerhq/coin-aptos": "^3.1.2-nightly.0",
|
170
|
+
"@ledgerhq/coin-bitcoin": "^0.20.3-nightly.0",
|
171
|
+
"@ledgerhq/coin-canton": "^0.4.0-nightly.0",
|
172
|
+
"@ledgerhq/coin-cardano": "^0.11.3-nightly.0",
|
173
|
+
"@ledgerhq/coin-casper": "^2.0.10-nightly.0",
|
174
|
+
"@ledgerhq/coin-celo": "^1.2.2-nightly.0",
|
175
|
+
"@ledgerhq/coin-cosmos": "^0.16.8-nightly.0",
|
176
|
+
"@ledgerhq/coin-evm": "^2.29.0-nightly.0",
|
177
|
+
"@ledgerhq/coin-filecoin": "^1.10.2-nightly.0",
|
178
|
+
"@ledgerhq/coin-framework": "^6.2.1-nightly.0",
|
179
|
+
"@ledgerhq/coin-hedera": "^1.10.2-nightly.0",
|
180
|
+
"@ledgerhq/coin-icon": "^0.11.6-nightly.0",
|
181
|
+
"@ledgerhq/coin-internet_computer": "^1.7.19-nightly.0",
|
182
|
+
"@ledgerhq/coin-mina": "^1.1.18-nightly.0",
|
183
|
+
"@ledgerhq/coin-multiversx": "^0.4.19-nightly.0",
|
184
|
+
"@ledgerhq/coin-near": "^0.12.2-nightly.0",
|
185
|
+
"@ledgerhq/coin-polkadot": "^6.8.1-nightly.0",
|
186
|
+
"@ledgerhq/coin-solana": "^0.31.2-nightly.0",
|
187
|
+
"@ledgerhq/coin-stacks": "^0.8.19-nightly.0",
|
188
|
+
"@ledgerhq/coin-stellar": "^6.3.0-nightly.0",
|
189
|
+
"@ledgerhq/coin-sui": "^0.12.0-nightly.1",
|
190
|
+
"@ledgerhq/coin-tezos": "^6.2.1-nightly.0",
|
191
|
+
"@ledgerhq/coin-ton": "^0.13.8-nightly.1",
|
192
|
+
"@ledgerhq/coin-tron": "^5.3.0-nightly.1",
|
193
|
+
"@ledgerhq/coin-vechain": "^2.8.3-nightly.0",
|
194
|
+
"@ledgerhq/coin-xrp": "^7.2.1-nightly.0",
|
195
|
+
"@ledgerhq/crypto-icons-ui": "^1.18.0-nightly.0",
|
196
|
+
"@ledgerhq/cryptoassets": "^13.27.0-nightly.0",
|
195
197
|
"@ledgerhq/device-core": "^0.6.1",
|
196
|
-
"@ledgerhq/devices": "8.5.0",
|
197
|
-
"@ledgerhq/errors": "^6.
|
198
|
-
"@ledgerhq/hw-app-algorand": "^6.31.
|
199
|
-
"@ledgerhq/hw-app-aptos": "^6.34.
|
200
|
-
"@ledgerhq/hw-app-btc": "^10.10.
|
198
|
+
"@ledgerhq/devices": "8.5.1-nightly.0",
|
199
|
+
"@ledgerhq/errors": "^6.25.0-nightly.0",
|
200
|
+
"@ledgerhq/hw-app-algorand": "^6.31.6-nightly.0",
|
201
|
+
"@ledgerhq/hw-app-aptos": "^6.34.6-nightly.0",
|
202
|
+
"@ledgerhq/hw-app-btc": "^10.10.2-nightly.0",
|
201
203
|
"@ledgerhq/hw-app-celo": "^6.34.1",
|
202
|
-
"@ledgerhq/hw-app-cosmos": "^6.32.
|
204
|
+
"@ledgerhq/hw-app-cosmos": "^6.32.6-nightly.0",
|
203
205
|
"@ledgerhq/hw-app-eth": "^6.45.16",
|
204
206
|
"@ledgerhq/hw-app-exchange": "^0.13.0",
|
205
|
-
"@ledgerhq/hw-app-hedera": "^1.2.
|
206
|
-
"@ledgerhq/hw-app-icon": "^1.3.
|
207
|
-
"@ledgerhq/hw-app-multiversx": "^6.25.0",
|
208
|
-
"@ledgerhq/hw-app-near": "^6.31.
|
209
|
-
"@ledgerhq/hw-app-polkadot": "^6.34.
|
210
|
-
"@ledgerhq/hw-app-str": "^7.2.
|
211
|
-
"@ledgerhq/hw-app-sui": "^1.
|
212
|
-
"@ledgerhq/hw-app-tezos": "^6.31.
|
213
|
-
"@ledgerhq/hw-app-trx": "^6.31.
|
214
|
-
"@ledgerhq/hw-app-vet": "^0.5.
|
215
|
-
"@ledgerhq/hw-app-xrp": "^6.32.
|
216
|
-
"@ledgerhq/hw-transport": "^6.31.
|
217
|
-
"@ledgerhq/hw-transport-mocker": "^6.29.
|
218
|
-
"@ledgerhq/ledger-cal-service": "^1.
|
219
|
-
"@ledgerhq/live-config": "^3.
|
220
|
-
"@ledgerhq/live-countervalues": "^0.6.
|
221
|
-
"@ledgerhq/live-countervalues-react": "^0.
|
207
|
+
"@ledgerhq/hw-app-hedera": "^1.2.6-nightly.0",
|
208
|
+
"@ledgerhq/hw-app-icon": "^1.3.6-nightly.0",
|
209
|
+
"@ledgerhq/hw-app-multiversx": "^6.25.1-nightly.0",
|
210
|
+
"@ledgerhq/hw-app-near": "^6.31.6-nightly.0",
|
211
|
+
"@ledgerhq/hw-app-polkadot": "^6.34.6-nightly.0",
|
212
|
+
"@ledgerhq/hw-app-str": "^7.2.6-nightly.0",
|
213
|
+
"@ledgerhq/hw-app-sui": "^1.4.0-nightly.0",
|
214
|
+
"@ledgerhq/hw-app-tezos": "^6.31.6-nightly.0",
|
215
|
+
"@ledgerhq/hw-app-trx": "^6.31.6-nightly.0",
|
216
|
+
"@ledgerhq/hw-app-vet": "^0.5.15-nightly.0",
|
217
|
+
"@ledgerhq/hw-app-xrp": "^6.32.4-nightly.0",
|
218
|
+
"@ledgerhq/hw-transport": "^6.31.10-nightly.0",
|
219
|
+
"@ledgerhq/hw-transport-mocker": "^6.29.10-nightly.0",
|
220
|
+
"@ledgerhq/ledger-cal-service": "^1.4.0-nightly.2",
|
221
|
+
"@ledgerhq/live-config": "^3.2.0-nightly.0",
|
222
|
+
"@ledgerhq/live-countervalues": "^0.6.3-nightly.0",
|
223
|
+
"@ledgerhq/live-countervalues-react": "^0.6.0-nightly.0",
|
222
224
|
"@ledgerhq/live-dmk-shared": "^0.12.1",
|
223
|
-
"@ledgerhq/live-env": "^2.
|
225
|
+
"@ledgerhq/live-env": "^2.15.0-nightly.1",
|
224
226
|
"@ledgerhq/live-hooks": "0.1.0",
|
225
|
-
"@ledgerhq/live-network": "^2.0.
|
226
|
-
"@ledgerhq/live-nft": "^0.8.
|
227
|
+
"@ledgerhq/live-network": "^2.0.16-nightly.1",
|
228
|
+
"@ledgerhq/live-nft": "^0.8.19-nightly.0",
|
227
229
|
"@ledgerhq/live-promise": "^0.1.1",
|
228
|
-
"@ledgerhq/live-signer-
|
229
|
-
"@ledgerhq/live-signer-
|
230
|
-
"@ledgerhq/live-signer-
|
231
|
-
"@ledgerhq/live-wallet": "^0.12.
|
230
|
+
"@ledgerhq/live-signer-canton": "^0.2.3-nightly.1",
|
231
|
+
"@ledgerhq/live-signer-evm": "^0.7.2-nightly.0",
|
232
|
+
"@ledgerhq/live-signer-solana": "^0.5.4-nightly.0",
|
233
|
+
"@ledgerhq/live-wallet": "^0.12.3-nightly.0",
|
232
234
|
"@ledgerhq/logs": "^6.13.0",
|
233
|
-
"@ledgerhq/speculos-transport": "^0.2.
|
235
|
+
"@ledgerhq/speculos-transport": "^0.2.9-nightly.1",
|
234
236
|
"@ledgerhq/wallet-api-acre-module": "^0.6.0",
|
235
|
-
"@ledgerhq/wallet-api-exchange-module": "^0.
|
237
|
+
"@ledgerhq/wallet-api-exchange-module": "^0.16.0-nightly.1"
|
236
238
|
},
|
237
239
|
"devDependencies": {
|
238
240
|
"@solana/web3.js": "1.95.4",
|
@@ -281,7 +283,7 @@
|
|
281
283
|
"uuid": "^8.3.2",
|
282
284
|
"ws": "7",
|
283
285
|
"@ledgerhq/device-react": "^0.2.42",
|
284
|
-
"@ledgerhq/types-cryptoassets": "^7.
|
286
|
+
"@ledgerhq/types-cryptoassets": "^7.26.0-nightly.1",
|
285
287
|
"@ledgerhq/types-devices": "^6.27.0",
|
286
288
|
"@ledgerhq/types-live": "^6.82.0"
|
287
289
|
},
|
@@ -305,6 +307,6 @@
|
|
305
307
|
"test-bridge-update": "UPDATE_BACKEND_MOCKS=1 env-cmd -f .ci.integration.env pnpm jest --ci --updateSnapshot --passWithNoTests",
|
306
308
|
"test-account-migration": "tsx src/__tests__/migration/account-migration.ts",
|
307
309
|
"unimported": "unimported",
|
308
|
-
"coverage": "env-cmd -f .ci.unit.env pnpm jest --coverage --ci --updateSnapshot
|
310
|
+
"coverage": "env-cmd -f .ci.unit.env pnpm jest --coverage --ci --updateSnapshot"
|
309
311
|
}
|
310
312
|
}
|
package/src/DataModel.test.ts
CHANGED
@@ -7,7 +7,7 @@ import { accountRawToAccountUserData } from "@ledgerhq/live-wallet/store";
|
|
7
7
|
import { createDataModel } from "./DataModel";
|
8
8
|
import { fromAccountRaw, toAccountRaw } from "./account";
|
9
9
|
import { getCurrencyConfiguration } from "./config";
|
10
|
-
import { CryptoAssetsStore } from "@ledgerhq/
|
10
|
+
import type { CryptoAssetsStore } from "@ledgerhq/types-live";
|
11
11
|
import { setCryptoAssetsStore as setCryptoAssetsStoreForCoinFramework } from "@ledgerhq/coin-framework/crypto-assets/index";
|
12
12
|
|
13
13
|
jest.mock("./config", () => ({
|
@@ -2,7 +2,7 @@ import flatMap from "lodash/flatMap";
|
|
2
2
|
import { fromAccountRaw, groupAccountOperationsByDay } from "../../account";
|
3
3
|
import { TezosAccountRaw } from "../../families/tezos/types";
|
4
4
|
import { setSupportedCurrencies } from "../../currencies";
|
5
|
-
import { CryptoAssetsStore } from "@ledgerhq/
|
5
|
+
import type { CryptoAssetsStore } from "@ledgerhq/types-live";
|
6
6
|
import { setup } from "../../bridge/impl";
|
7
7
|
import { LiveConfig } from "@ledgerhq/live-config/LiveConfig";
|
8
8
|
setSupportedCurrencies(["tezos"]);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { setCryptoAssetsStore as setCryptoAssetsStoreForCoinFramework } from "@ledgerhq/coin-framework/crypto-assets/index";
|
2
|
-
import { CryptoAssetsStore } from "@ledgerhq/
|
2
|
+
import type { CryptoAssetsStore } from "@ledgerhq/types-live";
|
3
3
|
import "./environment";
|
4
4
|
import BigNumber from "bignumber.js";
|
5
5
|
|
@@ -4,7 +4,7 @@ import { toAccountRaw, fromAccountRaw } from "./serialization";
|
|
4
4
|
import { setWalletAPIVersion } from "../wallet-api/version";
|
5
5
|
import { WALLET_API_VERSION } from "../wallet-api/constants";
|
6
6
|
import { setCryptoAssetsStore as setCryptoAssetsStoreForCoinFramework } from "@ledgerhq/coin-framework/crypto-assets/index";
|
7
|
-
import { CryptoAssetsStore } from "@ledgerhq/
|
7
|
+
import type { CryptoAssetsStore } from "@ledgerhq/types-live";
|
8
8
|
import solanaSplTokenData from "../__fixtures__/solana-spl-epjfwdd5aufqssqem2qn1xzybapc8g4weggkzwytdt1v.json";
|
9
9
|
import { TokenCurrency } from "@ledgerhq/types-cryptoassets";
|
10
10
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { LiveConfig } from "@ledgerhq/live-config/LiveConfig";
|
2
2
|
import { getCryptoAssetsStore, setCryptoAssetsStore } from ".";
|
3
3
|
import * as legacy from "@ledgerhq/cryptoassets/tokens";
|
4
|
-
import { CryptoAssetsStore } from "@ledgerhq/
|
4
|
+
import type { CryptoAssetsStore } from "@ledgerhq/types-live";
|
5
5
|
|
6
6
|
describe("Testing CryptoAssetStore", () => {
|
7
7
|
it("should return the default methods from cryptoassets libs when feature flag does not exists", () => {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { LiveConfig } from "@ledgerhq/live-config/LiveConfig";
|
2
|
-
import { CryptoAssetsStore } from "@ledgerhq/coin-framework/crypto-assets/type";
|
3
2
|
import * as legacy from "@ledgerhq/cryptoassets/tokens";
|
3
|
+
import type { CryptoAssetsStore } from "@ledgerhq/types-live";
|
4
4
|
|
5
5
|
const legacyStore: CryptoAssetsStore = {
|
6
6
|
findTokenByAddress: legacy.findTokenByAddress,
|
@@ -17,7 +17,8 @@ export function setCryptoAssetsStore(store: CryptoAssetsStore) {
|
|
17
17
|
}
|
18
18
|
|
19
19
|
export function getCryptoAssetsStore(): CryptoAssetsStore {
|
20
|
-
const featureEnabled =
|
20
|
+
const featureEnabled =
|
21
|
+
LiveConfig.isConfigSet() && LiveConfig.getValueByKey("feature_cal_lazy_loading");
|
21
22
|
if (!featureEnabled) {
|
22
23
|
return legacyStore;
|
23
24
|
}
|
@@ -19,18 +19,24 @@ export function genericEstimateMaxSpendable(
|
|
19
19
|
...transaction,
|
20
20
|
amount: mainAccount.spendableBalance,
|
21
21
|
useAllAmount: true,
|
22
|
-
fees: transaction?.fees ? BigInt(transaction.fees.toString()) : 0n,
|
23
22
|
};
|
24
|
-
|
25
|
-
|
26
|
-
)
|
23
|
+
|
24
|
+
let fees = transaction?.fees;
|
25
|
+
if (transaction?.fees === null || transaction?.fees === undefined) {
|
26
|
+
fees = (
|
27
|
+
await getAlpacaApi(network, kind).estimateFees(
|
28
|
+
transactionToIntent(mainAccount, draftTransaction),
|
29
|
+
)
|
30
|
+
).value;
|
31
|
+
}
|
27
32
|
const { amount } = await getAlpacaApi(network, kind).validateIntent(
|
28
33
|
transactionToIntent(account, { ...draftTransaction }),
|
34
|
+
{ value: transaction?.fees ? BigInt(transaction.fees.toString()) : 0n },
|
29
35
|
);
|
30
36
|
if (network === "stellar") {
|
31
37
|
return amount > 0 ? new BigNumber(amount.toString()) : new BigNumber(0);
|
32
38
|
}
|
33
|
-
const bnFee = BigNumber(fees.
|
39
|
+
const bnFee = BigNumber(fees.toString());
|
34
40
|
return BigNumber.max(0, account.spendableBalance.minus(bnFee));
|
35
41
|
};
|
36
42
|
}
|
@@ -3,6 +3,7 @@ import { AccountAwaitingSendPendingOperations } from "@ledgerhq/errors";
|
|
3
3
|
import BigNumber from "bignumber.js";
|
4
4
|
import { getAlpacaApi } from "./alpaca";
|
5
5
|
import { transactionToIntent } from "./utils";
|
6
|
+
// import { FeeEstimation } from "@ledgerhq/coin-framework/api/types";
|
6
7
|
|
7
8
|
// => alpaca validateIntent
|
8
9
|
export function genericGetTransactionStatus(
|
@@ -26,7 +27,6 @@ export function genericGetTransactionStatus(
|
|
26
27
|
mode: transaction?.mode,
|
27
28
|
recipient: transaction.recipient,
|
28
29
|
amount: transaction.amount ?? new BigNumber(0),
|
29
|
-
fees: transaction.fees ? BigInt(transaction.fees.toString()) : 0n,
|
30
30
|
useAllAmount: !!transaction.useAllAmount,
|
31
31
|
assetReference: transaction.assetReference || "",
|
32
32
|
assetOwner: transaction.assetOwner || "",
|
@@ -46,6 +46,7 @@ export function genericGetTransactionStatus(
|
|
46
46
|
|
47
47
|
const { errors, warnings, estimatedFees, amount, totalSpent } = await alpacaApi.validateIntent(
|
48
48
|
transactionToIntent(account, draftTransaction),
|
49
|
+
{ value: transaction.fees ? BigInt(transaction.fees.toString()) : 0n },
|
49
50
|
);
|
50
51
|
|
51
52
|
return Promise.resolve({
|
@@ -2,7 +2,7 @@ import { Account, AccountBridge, TransactionCommon } from "@ledgerhq/types-live"
|
|
2
2
|
import { getAlpacaApi } from "./alpaca";
|
3
3
|
import { transactionToIntent } from "./utils";
|
4
4
|
import BigNumber from "bignumber.js";
|
5
|
-
import {
|
5
|
+
import { FeeEstimation } from "@ledgerhq/coin-framework/api/types";
|
6
6
|
|
7
7
|
function bnEq(a: BigNumber | null | undefined, b: BigNumber | null | undefined): boolean {
|
8
8
|
return !a && !b ? true : !a || !b ? false : a.eq(b);
|
@@ -16,31 +16,35 @@ export function genericPrepareTransaction(
|
|
16
16
|
account,
|
17
17
|
transaction: TransactionCommon & {
|
18
18
|
fees: BigNumber | null | undefined;
|
19
|
+
customFees?: FeeEstimation;
|
19
20
|
assetReference?: string;
|
20
21
|
assetOwner?: string;
|
21
22
|
subAccountId?: string;
|
22
|
-
networkInfo?: NetworkInfo | null;
|
23
23
|
},
|
24
24
|
) => {
|
25
25
|
const [assetReference, assetOwner] = getAssetInfos(transaction);
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
26
|
+
|
27
|
+
let fees = transaction.customFees?.parameters?.fees || null;
|
28
|
+
if (fees === null) {
|
29
|
+
fees = (
|
30
|
+
await getAlpacaApi(network, kind).estimateFees(
|
31
|
+
transactionToIntent(account, {
|
32
|
+
...transaction,
|
33
|
+
}),
|
34
|
+
)
|
35
|
+
).value;
|
36
|
+
}
|
37
|
+
|
38
|
+
if (!bnEq(transaction.fees, new BigNumber(fees.toString()))) {
|
37
39
|
return {
|
38
40
|
...transaction,
|
39
|
-
fees: new BigNumber(fees.
|
41
|
+
fees: new BigNumber(fees.toString()),
|
40
42
|
assetReference,
|
41
43
|
assetOwner,
|
42
|
-
|
43
|
-
|
44
|
+
customFees: {
|
45
|
+
parameters: {
|
46
|
+
fees: new BigNumber(fees.toString()),
|
47
|
+
},
|
44
48
|
},
|
45
49
|
};
|
46
50
|
}
|
@@ -95,7 +95,6 @@ export const genericSignOperation =
|
|
95
95
|
const draftTransaction = {
|
96
96
|
recipient: transaction.recipient,
|
97
97
|
amount: transaction.amount ?? 0,
|
98
|
-
fees: fees,
|
99
98
|
useAllAmount: !!transaction.useAllAmount,
|
100
99
|
assetReference: transaction?.["assetReference"] || "",
|
101
100
|
assetOwner: transaction?.["assetOwner"] || "",
|
@@ -103,6 +102,7 @@ export const genericSignOperation =
|
|
103
102
|
};
|
104
103
|
const { amount } = await getAlpacaApi(network, kind).validateIntent(
|
105
104
|
transactionToIntent(account, draftTransaction),
|
105
|
+
{ value: fees },
|
106
106
|
);
|
107
107
|
transaction.amount = new BigNumber(amount.toString());
|
108
108
|
}
|
@@ -110,7 +110,7 @@ export const genericSignOperation =
|
|
110
110
|
const derivationPath = account.freshAddressPath;
|
111
111
|
const { publicKey } = (await signer.getAddress(derivationPath)) as Result;
|
112
112
|
|
113
|
-
let transactionIntent = transactionToIntent(account, { ...transaction
|
113
|
+
let transactionIntent = transactionToIntent(account, { ...transaction });
|
114
114
|
transactionIntent.senderPublicKey = publicKey;
|
115
115
|
|
116
116
|
// Enrich with memo and asset information
|
@@ -125,6 +125,7 @@ export const genericSignOperation =
|
|
125
125
|
/* Craft unsigned blob via Alpaca */
|
126
126
|
const unsigned: string = await getAlpacaApi(network, kind).craftTransaction(
|
127
127
|
transactionIntent,
|
128
|
+
{ value: fees },
|
128
129
|
);
|
129
130
|
|
130
131
|
/* Notify UI that the device is now showing the tx */
|
@@ -47,7 +47,7 @@ describe("genericPrepareTransaction", () => {
|
|
47
47
|
expect((result as any).fees.toString()).toBe(newFee.toString());
|
48
48
|
expect(transactionToIntent).toHaveBeenCalledWith(
|
49
49
|
account,
|
50
|
-
expect.objectContaining(
|
50
|
+
expect.objectContaining(baseTransaction),
|
51
51
|
);
|
52
52
|
});
|
53
53
|
|
@@ -94,7 +94,6 @@ export function transactionToIntent(
|
|
94
94
|
assetOwner?: string;
|
95
95
|
assetReference?: string;
|
96
96
|
mode?: string;
|
97
|
-
fees?: bigint | null | undefined;
|
98
97
|
memoType?: string;
|
99
98
|
memoValue?: string;
|
100
99
|
useAllAmount?: boolean;
|
@@ -114,7 +113,6 @@ export function transactionToIntent(
|
|
114
113
|
}
|
115
114
|
}
|
116
115
|
const res: TransactionIntent & { memo?: { type: string; value?: string } } = {
|
117
|
-
fees: transaction?.fees ? transaction.fees : null,
|
118
116
|
type: transactionType,
|
119
117
|
sender: account.freshAddress,
|
120
118
|
recipient: transaction.recipient,
|
package/src/bridge/impl.ts
CHANGED
@@ -20,7 +20,7 @@ import {
|
|
20
20
|
import { getAlpacaAccountBridge } from "./generic-alpaca/accountBridge";
|
21
21
|
import { getAlpacaCurrencyBridge } from "./generic-alpaca/currencyBridge";
|
22
22
|
import { AddressesSanctionedError } from "@ledgerhq/coin-framework/sanction/errors";
|
23
|
-
import { CryptoAssetsStore } from "@ledgerhq/
|
23
|
+
import type { CryptoAssetsStore } from "@ledgerhq/types-live";
|
24
24
|
import { setCryptoAssetsStore as setCryptoAssetsStoreForCoinFramework } from "@ledgerhq/coin-framework/crypto-assets/index";
|
25
25
|
import { getCryptoAssetsStore, setCryptoAssetsStore } from "./crypto-assets";
|
26
26
|
|
package/src/currencies/index.ts
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
import { sortCurrenciesByIds } from "./sortByMarketcap";
|
2
|
-
import {
|
2
|
+
import { listCryptoCurrencies, listTokens } from ".";
|
3
3
|
import { getBTCValues } from "@ledgerhq/live-countervalues/mock";
|
4
4
|
import { CURRENCIES_LIST, IDS } from "./mock";
|
5
5
|
import { setCryptoAssetsStore as setCryptoAssetsStoreForCoinFramework } from "@ledgerhq/coin-framework/crypto-assets/index";
|
6
|
-
import { CryptoAssetsStore } from "@ledgerhq/
|
6
|
+
import type { CryptoAssetsStore } from "@ledgerhq/types-live";
|
7
|
+
import { findCurrencyByTicker } from "@ledgerhq/live-countervalues/findCurrencyByTicker";
|
7
8
|
|
8
9
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
9
10
|
setCryptoAssetsStoreForCoinFramework({
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { genAccount } from "@ledgerhq/coin-framework/lib/mocks/account";
|
2
|
-
import { getCryptoCurrencyById } from "
|
2
|
+
import { getCryptoCurrencyById } from "../currencies/index";
|
3
3
|
import { Account } from "@ledgerhq/types-live";
|
4
4
|
import BigNumber from "bignumber.js";
|
5
5
|
import { getTokensWithFunds } from "./getTokensWithFunds";
|
package/src/e2e/enum/AppInfos.ts
CHANGED
@@ -8,7 +8,6 @@ export enum DeviceLabels {
|
|
8
8
|
ACCEPT = "Accept",
|
9
9
|
TRANSFER = "Transfer",
|
10
10
|
RECIPIENT = "Recipient",
|
11
|
-
PUBKEY = "Pubkey",
|
12
11
|
DEST = "Dest",
|
13
12
|
CAPS_APPROVE = "APPROVE",
|
14
13
|
CAPS_REJECT = "REJECT",
|
@@ -53,4 +52,6 @@ export enum DeviceLabels {
|
|
53
52
|
VERIFY_BSC = "Verify BSC",
|
54
53
|
SIGN_TRANSACTION = "Sign transaction",
|
55
54
|
VERIFY_POLYGON = "Verify Polygon",
|
55
|
+
VERIFY_SOLANA_ADDRESS = "Verify Solana address",
|
56
|
+
REVIEW_TRANSACTION = "Review transaction",
|
56
57
|
}
|
package/src/e2e/enum/Provider.ts
CHANGED
@@ -16,8 +16,8 @@ export class Provider {
|
|
16
16
|
static readonly LIFI = new Provider("lifi", "LI.FI", false, true, false);
|
17
17
|
static readonly CIC = new Provider("cic", "CIC", false, true, true);
|
18
18
|
static readonly COINBASE = new Provider("coinbase", "Coinbase", false, true, true);
|
19
|
-
static readonly KILN = new Provider("
|
20
|
-
static readonly STADER_LABS = new Provider("stader", "Stader Labs", false, true, true);
|
19
|
+
static readonly KILN = new Provider("kiln_pooling", "Kiln staking Pool", false, true, true);
|
20
|
+
static readonly STADER_LABS = new Provider("stader-eth", "Stader Labs", false, true, true);
|
21
21
|
static readonly LIDO = new Provider("lido", "Lido", false, true, true);
|
22
22
|
static readonly TRANSAK = new Provider("transak", "Transak", false, true, true);
|
23
23
|
|
@@ -5,17 +5,20 @@ import { Device } from "../enum/Device";
|
|
5
5
|
import { Transaction } from "../models/Transaction";
|
6
6
|
|
7
7
|
export async function delegateSolana() {
|
8
|
-
await waitFor(DeviceLabels.
|
9
|
-
await pressUntilTextFound(DeviceLabels.
|
8
|
+
await waitFor(DeviceLabels.REVIEW_TRANSACTION);
|
9
|
+
await pressUntilTextFound(DeviceLabels.SIGN_TRANSACTION);
|
10
10
|
await pressBoth();
|
11
11
|
}
|
12
12
|
|
13
13
|
export async function sendSolana(tx: Transaction) {
|
14
|
-
const events = await pressUntilTextFound(DeviceLabels.
|
14
|
+
const events = await pressUntilTextFound(DeviceLabels.SIGN_TRANSACTION);
|
15
15
|
const isAmountCorrect = containsSubstringInEvent(tx.amount, events);
|
16
16
|
expect(isAmountCorrect).toBeTruthy();
|
17
17
|
if (process.env.SPECULOS_DEVICE !== Device.LNS) {
|
18
|
-
const isAddressCorrect = containsSubstringInEvent(
|
18
|
+
const isAddressCorrect = containsSubstringInEvent(
|
19
|
+
tx.accountToCredit.parentAccount?.address ?? tx.accountToCredit.address,
|
20
|
+
events,
|
21
|
+
);
|
19
22
|
expect(isAddressCorrect).toBeTruthy();
|
20
23
|
}
|
21
24
|
|
package/src/e2e/speculos.ts
CHANGED
@@ -14,13 +14,13 @@ import { CryptoCurrency } from "@ledgerhq/types-cryptoassets";
|
|
14
14
|
import axios, { AxiosError, AxiosResponse } from "axios";
|
15
15
|
import { getEnv } from "@ledgerhq/live-env";
|
16
16
|
import { getCryptoCurrencyById } from "../currencies";
|
17
|
-
import { DeviceLabels } from "
|
17
|
+
import { DeviceLabels } from "./enum/DeviceLabels";
|
18
18
|
import { Account } from "./enum/Account";
|
19
19
|
import { Device as CryptoWallet } from "./enum/Device";
|
20
20
|
import { Currency } from "./enum/Currency";
|
21
21
|
import expect from "expect";
|
22
22
|
import { sendBTCBasedCoin } from "./families/bitcoin";
|
23
|
-
import { sendEVM, sendEvmNFT } from "
|
23
|
+
import { sendEVM, sendEvmNFT } from "./families/evm";
|
24
24
|
import { sendPolkadot } from "./families/polkadot";
|
25
25
|
import { sendAlgorand } from "./families/algorand";
|
26
26
|
import { sendTron } from "./families/tron";
|
@@ -385,13 +385,12 @@ export async function startSpeculos(
|
|
385
385
|
onSpeculosDeviceCreated,
|
386
386
|
};
|
387
387
|
try {
|
388
|
-
|
388
|
+
return isSpeculosRemote
|
389
389
|
? await createSpeculosDeviceCI(deviceParams)
|
390
390
|
: await createSpeculosDevice(deviceParams).then(device => {
|
391
391
|
invariant(device.ports.apiPort, "[E2E] Speculos apiPort is not defined");
|
392
392
|
return { id: device.id, port: device.ports.apiPort };
|
393
393
|
});
|
394
|
-
return device;
|
395
394
|
} catch (e: unknown) {
|
396
395
|
console.error(e);
|
397
396
|
log("engine", `test ${testName} failed with ${String(e)}`);
|
@@ -622,7 +621,7 @@ const APP_LABEL_MAP = new Map<AppInfos, [string, string]>([
|
|
622
621
|
[AppInfos.ETHEREUM, [DeviceLabels.VERIFY_ETHEREUM, DeviceLabels.CONFIRM]],
|
623
622
|
[AppInfos.BNB_CHAIN, [DeviceLabels.VERIFY_BSC, DeviceLabels.CONFIRM]],
|
624
623
|
[AppInfos.POLYGON, [DeviceLabels.VERIFY_POLYGON, DeviceLabels.CONFIRM]],
|
625
|
-
[AppInfos.SOLANA, [DeviceLabels.
|
624
|
+
[AppInfos.SOLANA, [DeviceLabels.VERIFY_SOLANA_ADDRESS, DeviceLabels.CONFIRM]],
|
626
625
|
[AppInfos.POLKADOT, [DeviceLabels.PLEASE_REVIEW, DeviceLabels.CAPS_APPROVE]],
|
627
626
|
[AppInfos.COSMOS, [DeviceLabels.PLEASE_REVIEW, DeviceLabels.CAPS_APPROVE]],
|
628
627
|
[AppInfos.BITCOIN, [DeviceLabels.ADDRESS, DeviceLabels.CONFIRM]],
|