@ledgerhq/live-common 34.46.0 → 34.47.0-nightly.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/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/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 +152 -0
- package/lib/modularDrawer/data/state-manager/api.d.ts.map +1 -0
- package/lib/modularDrawer/data/state-manager/api.js +45 -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 +120 -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 +13 -0
- package/lib/modularDrawer/hooks/useAssetsData.d.ts.map +1 -0
- package/lib/modularDrawer/hooks/useAssetsData.js +31 -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/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/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 +152 -0
- package/lib-es/modularDrawer/data/state-manager/api.d.ts.map +1 -0
- package/lib-es/modularDrawer/data/state-manager/api.js +42 -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 +118 -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 +13 -0
- package/lib-es/modularDrawer/hooks/useAssetsData.d.ts.map +1 -0
- package/lib-es/modularDrawer/hooks/useAssetsData.js +27 -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 +36 -34
- package/src/DataModel.test.ts +1 -1
- package/src/__tests__/accounts/groupPerDay.ts +1 -1
- 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/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 +62 -0
- package/src/modularDrawer/hooks/__test__/useAssetsData.test.ts +139 -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 +36 -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
@@ -0,0 +1,118 @@
|
|
1
|
+
/**
|
2
|
+
* @jest-environment jsdom
|
3
|
+
*/
|
4
|
+
import { renderHook } from "@testing-library/react";
|
5
|
+
import { useAssetsData } from "../useAssetsData";
|
6
|
+
import { useGetAssetsDataQuery } from "../../data/state-manager/api";
|
7
|
+
jest.mock("../../data/state-manager/api", () => ({
|
8
|
+
useGetAssetsDataQuery: jest.fn(),
|
9
|
+
}));
|
10
|
+
const mockSetCursor = jest.fn();
|
11
|
+
jest.mock("react", () => ({
|
12
|
+
...jest.requireActual("react"),
|
13
|
+
useState: jest.fn(() => [undefined, mockSetCursor]),
|
14
|
+
useCallback: jest.fn(fn => fn),
|
15
|
+
useMemo: jest.fn(fn => fn()),
|
16
|
+
}));
|
17
|
+
const mockUseGetAssetsDataQuery = jest.mocked(useGetAssetsDataQuery);
|
18
|
+
describe("useAssetsData", () => {
|
19
|
+
beforeEach(() => {
|
20
|
+
jest.clearAllMocks();
|
21
|
+
});
|
22
|
+
it("should return loading state when API is loading", () => {
|
23
|
+
mockUseGetAssetsDataQuery.mockReturnValue({
|
24
|
+
data: undefined,
|
25
|
+
isLoading: true,
|
26
|
+
error: undefined,
|
27
|
+
refetch: jest.fn(),
|
28
|
+
isFetching: false,
|
29
|
+
isSuccess: false,
|
30
|
+
isError: false,
|
31
|
+
currentData: undefined,
|
32
|
+
});
|
33
|
+
const { result } = renderHook(() => useAssetsData({}));
|
34
|
+
expect(result.current.isLoading).toBe(true);
|
35
|
+
expect(result.current.data).toBe(undefined);
|
36
|
+
expect(result.current.hasMore).toBe(false);
|
37
|
+
});
|
38
|
+
it("should return data and hasMore when API returns data", () => {
|
39
|
+
const mockData = {
|
40
|
+
assetsData: [],
|
41
|
+
pagination: { nextCursor: "test-cursor" },
|
42
|
+
};
|
43
|
+
mockUseGetAssetsDataQuery.mockReturnValue({
|
44
|
+
data: mockData,
|
45
|
+
isLoading: false,
|
46
|
+
error: undefined,
|
47
|
+
refetch: jest.fn(),
|
48
|
+
isFetching: false,
|
49
|
+
isSuccess: true,
|
50
|
+
isError: false,
|
51
|
+
currentData: mockData,
|
52
|
+
});
|
53
|
+
const { result } = renderHook(() => useAssetsData({}));
|
54
|
+
expect(result.current.data).toBe(mockData);
|
55
|
+
expect(result.current.isLoading).toBe(false);
|
56
|
+
expect(result.current.hasMore).toBe(true);
|
57
|
+
});
|
58
|
+
it("should return error when API has error", () => {
|
59
|
+
const mockError = new Error("API Error");
|
60
|
+
mockUseGetAssetsDataQuery.mockReturnValue({
|
61
|
+
data: undefined,
|
62
|
+
isLoading: false,
|
63
|
+
error: mockError,
|
64
|
+
refetch: jest.fn(),
|
65
|
+
isFetching: false,
|
66
|
+
isSuccess: false,
|
67
|
+
isError: true,
|
68
|
+
currentData: undefined,
|
69
|
+
});
|
70
|
+
const { result } = renderHook(() => useAssetsData({}));
|
71
|
+
expect(result.current.error).toBe(mockError);
|
72
|
+
expect(result.current.isLoading).toBe(false);
|
73
|
+
});
|
74
|
+
it("should call setCursor when loadNext is called and there's a nextCursor", () => {
|
75
|
+
const nextCursor = "next-cursor-456";
|
76
|
+
mockUseGetAssetsDataQuery.mockReturnValue({
|
77
|
+
data: {
|
78
|
+
assetsData: [],
|
79
|
+
pagination: { nextCursor },
|
80
|
+
},
|
81
|
+
isLoading: false,
|
82
|
+
error: undefined,
|
83
|
+
refetch: jest.fn(),
|
84
|
+
isFetching: false,
|
85
|
+
isSuccess: true,
|
86
|
+
isError: false,
|
87
|
+
currentData: {
|
88
|
+
assetsData: [],
|
89
|
+
pagination: { nextCursor },
|
90
|
+
},
|
91
|
+
});
|
92
|
+
const { result } = renderHook(() => useAssetsData({}));
|
93
|
+
result.current.loadNext();
|
94
|
+
expect(mockSetCursor).toHaveBeenCalledWith(nextCursor);
|
95
|
+
});
|
96
|
+
it("should not call setCursor when there's no nextCursor", () => {
|
97
|
+
mockUseGetAssetsDataQuery.mockReturnValue({
|
98
|
+
data: {
|
99
|
+
assetsData: [],
|
100
|
+
pagination: { nextCursor: undefined },
|
101
|
+
},
|
102
|
+
isLoading: false,
|
103
|
+
error: undefined,
|
104
|
+
refetch: jest.fn(),
|
105
|
+
isFetching: false,
|
106
|
+
isSuccess: true,
|
107
|
+
isError: false,
|
108
|
+
currentData: {
|
109
|
+
assetsData: [],
|
110
|
+
pagination: { nextCursor: undefined },
|
111
|
+
},
|
112
|
+
});
|
113
|
+
const { result } = renderHook(() => useAssetsData({}));
|
114
|
+
result.current.loadNext();
|
115
|
+
expect(mockSetCursor).not.toHaveBeenCalled();
|
116
|
+
});
|
117
|
+
});
|
118
|
+
//# sourceMappingURL=useAssetsData.test.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useAssetsData.test.js","sourceRoot":"","sources":["../../../../src/modularDrawer/hooks/__test__/useAssetsData.test.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE,IAAI,CAAC,IAAI,CAAC,8BAA8B,EAAE,GAAG,EAAE,CAAC,CAAC;IAC/C,qBAAqB,EAAE,IAAI,CAAC,EAAE,EAAE;CACjC,CAAC,CAAC,CAAC;AAEJ,MAAM,aAAa,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;AAChC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC;IACxB,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC;IAC9B,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;IACnD,WAAW,EAAE,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;IAC9B,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;CAC7B,CAAC,CAAC,CAAC;AAEJ,MAAM,yBAAyB,GAAG,IAAI,CAAC,MAAM,CAAC,qBAAqB,C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,gBAAgB,EAAE,CAAC;IAC/C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { Observable } from "rxjs";
|
2
|
+
import { CryptoOrTokenCurrency } from "@ledgerhq/types-cryptoassets";
|
3
|
+
import type { Account } from "@ledgerhq/types-live";
|
4
|
+
import { WalletAPIAccount } from "../../../wallet-api/types";
|
5
|
+
type AccountModuleParams = {
|
6
|
+
assets: CryptoOrTokenCurrency[];
|
7
|
+
nestedAccounts: Account[];
|
8
|
+
accountIds: Map<string, boolean> | undefined;
|
9
|
+
formatLabel: (count: number) => string;
|
10
|
+
accounts$?: Observable<WalletAPIAccount[]>;
|
11
|
+
};
|
12
|
+
export type AssetCountItem = {
|
13
|
+
asset: CryptoOrTokenCurrency;
|
14
|
+
label: string;
|
15
|
+
count: number;
|
16
|
+
};
|
17
|
+
export declare const useAssetAccountCounts: ({ assets, nestedAccounts, accountIds, formatLabel, }: AccountModuleParams) => AssetCountItem[];
|
18
|
+
export {};
|
19
|
+
//# sourceMappingURL=useAssetAccountCounts.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useAssetAccountCounts.d.ts","sourceRoot":"","sources":["../../../../src/modularDrawer/hooks/modules/useAssetAccountCounts.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,KAAK,mBAAmB,GAAG;IACzB,MAAM,EAAE,qBAAqB,EAAE,CAAC;IAChC,cAAc,EAAE,OAAO,EAAE,CAAC;IAC1B,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;IAC7C,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACvC,SAAS,CAAC,EAAE,UAAU,CAAC,gBAAgB,EAAE,CAAC,CAAC;CAC5C,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,qBAAqB,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,qBAAqB,yDAK/B,mBAAmB,KAAG,cAAc,EAUD,CAAC"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { getAccountTuplesForCurrency } from "../../../utils/getAccountTuplesForCurrency";
|
2
|
+
export const useAssetAccountCounts = ({ assets, nestedAccounts, accountIds, formatLabel, }) => assets
|
3
|
+
.map(asset => {
|
4
|
+
const { length } = getAccountTuplesForCurrency(asset, nestedAccounts, accountIds);
|
5
|
+
return {
|
6
|
+
asset,
|
7
|
+
label: formatLabel(length),
|
8
|
+
count: length,
|
9
|
+
};
|
10
|
+
})
|
11
|
+
.sort((a, b) => b.count - a.count);
|
12
|
+
//# sourceMappingURL=useAssetAccountCounts.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useAssetAccountCounts.js","sourceRoot":"","sources":["../../../../src/modularDrawer/hooks/modules/useAssetAccountCounts.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,2BAA2B,EAAE,MAAM,4CAA4C,CAAC;AAkBzF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EACpC,MAAM,EACN,cAAc,EACd,UAAU,EACV,WAAW,GACS,EAAoB,EAAE,CAC1C,MAAM;KACH,GAAG,CAAC,KAAK,CAAC,EAAE;IACX,MAAM,EAAE,MAAM,EAAE,GAAG,2BAA2B,CAAC,KAAK,EAAE,cAAc,EAAE,UAAU,CAAC,CAAC;IAClF,OAAO;QACL,KAAK;QACL,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC;QAC1B,KAAK,EAAE,MAAM;KACd,CAAC;AACJ,CAAC,CAAC;KACD,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC"}
|
@@ -0,0 +1,52 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import { CryptoOrTokenCurrency } from "@ledgerhq/types-cryptoassets";
|
3
|
+
import { ApyType } from "../../types";
|
4
|
+
export declare const useLeftApyModule: (assets: CryptoOrTokenCurrency[], ApyIndicator: React.ComponentType<{
|
5
|
+
value: number;
|
6
|
+
type: ApyType;
|
7
|
+
}>) => ({
|
8
|
+
leftElement: React.JSX.Element;
|
9
|
+
name: string;
|
10
|
+
ticker: string;
|
11
|
+
units: import("@ledgerhq/types-cryptoassets").Unit[];
|
12
|
+
symbol?: string | undefined;
|
13
|
+
disableCountervalue?: boolean | undefined;
|
14
|
+
delisted?: boolean | undefined;
|
15
|
+
keywords?: string[] | undefined;
|
16
|
+
type: "CryptoCurrency";
|
17
|
+
id: import("@ledgerhq/types-cryptoassets").CryptoCurrencyId | "LBRY" | "groestcoin" | "osmo";
|
18
|
+
forkedFrom?: string | undefined;
|
19
|
+
managerAppName: string;
|
20
|
+
coinType: import("@ledgerhq/types-cryptoassets").CoinType;
|
21
|
+
scheme: string;
|
22
|
+
color: string;
|
23
|
+
family: string;
|
24
|
+
blockAvgTime?: number | undefined;
|
25
|
+
supportsSegwit?: boolean | undefined;
|
26
|
+
supportsNativeSegwit?: boolean | undefined;
|
27
|
+
isTestnetFor?: string | undefined;
|
28
|
+
bitcoinLikeInfo?: import("@ledgerhq/types-cryptoassets").BitcoinLikeInfo | undefined;
|
29
|
+
ethereumLikeInfo?: import("@ledgerhq/types-cryptoassets").EthereumLikeInfo | undefined;
|
30
|
+
explorerViews: import("@ledgerhq/types-cryptoassets").ExplorerView[];
|
31
|
+
terminated?: {
|
32
|
+
link: string;
|
33
|
+
} | undefined;
|
34
|
+
deviceTicker?: string | undefined;
|
35
|
+
explorerId?: import("@ledgerhq/types-cryptoassets").LedgerExplorerId | undefined;
|
36
|
+
} | {
|
37
|
+
leftElement: React.JSX.Element;
|
38
|
+
name: string;
|
39
|
+
ticker: string;
|
40
|
+
units: import("@ledgerhq/types-cryptoassets").Unit[];
|
41
|
+
symbol?: string | undefined;
|
42
|
+
disableCountervalue?: boolean | undefined;
|
43
|
+
delisted?: boolean | undefined;
|
44
|
+
keywords?: string[] | undefined;
|
45
|
+
type: "TokenCurrency";
|
46
|
+
id: string;
|
47
|
+
ledgerSignature?: string | undefined;
|
48
|
+
contractAddress: string;
|
49
|
+
parentCurrency: import("@ledgerhq/types-cryptoassets").CryptoCurrency;
|
50
|
+
tokenType: string;
|
51
|
+
})[];
|
52
|
+
//# sourceMappingURL=useLeftApyModule.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useLeftApyModule.d.ts","sourceRoot":"","sources":["../../../../src/modularDrawer/hooks/modules/useLeftApyModule.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAYtC,eAAO,MAAM,gBAAgB,WACnB,qBAAqB,EAAE,gBACjB,MAAM,aAAa,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IASpE,CAAC"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import React from "react";
|
2
|
+
const createApyItem = ({ value, type, ApyIndicator, }) => React.createElement(ApyIndicator, { value: value, type: type });
|
3
|
+
export const useLeftApyModule = (assets, ApyIndicator) => {
|
4
|
+
const value = 5.11; // TODO to be retrieved from DADA
|
5
|
+
const type = "APY"; // TODO to be retrieved from DADA
|
6
|
+
return assets.map(asset => ({
|
7
|
+
...asset,
|
8
|
+
leftElement: createApyItem({ value, type, ApyIndicator }),
|
9
|
+
}));
|
10
|
+
};
|
11
|
+
//# sourceMappingURL=useLeftApyModule.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useLeftApyModule.js","sourceRoot":"","sources":["../../../../src/modularDrawer/hooks/modules/useLeftApyModule.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,aAAa,GAAG,CAAC,EACrB,KAAK,EACL,IAAI,EACJ,YAAY,GAKb,EAAE,EAAE,CAAC,oBAAC,YAAY,IAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,GAAI,CAAC;AAEjD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,MAA+B,EAC/B,YAAmE,EACnE,EAAE;IACF,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,iCAAiC;IACrD,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,iCAAiC;IAErD,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAC1B,GAAG,KAAK;QACR,WAAW,EAAE,aAAa,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;KAC1D,CAAC,CAAC,CAAC;AACN,CAAC,CAAC"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
export declare function useAssetsData({ search, currencyIds, }: {
|
2
|
+
search?: string;
|
3
|
+
currencyIds?: string[];
|
4
|
+
}): {
|
5
|
+
data: import("../data/state-manager/api").AssetsDataWithPagination | undefined;
|
6
|
+
error: import("@reduxjs/toolkit/query").FetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
7
|
+
isLoading: boolean;
|
8
|
+
isSuccess: boolean;
|
9
|
+
hasMore: boolean;
|
10
|
+
cursor: string | undefined;
|
11
|
+
loadNext: () => void;
|
12
|
+
};
|
13
|
+
//# sourceMappingURL=useAssetsData.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useAssetsData.d.ts","sourceRoot":"","sources":["../../../src/modularDrawer/hooks/useAssetsData.ts"],"names":[],"mappings":"AAGA,wBAAgB,aAAa,CAAC,EAC5B,MAAM,EACN,WAAW,GACZ,EAAE;IACD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB;;;;;;;;EA0BA"}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { useState, useCallback } from "react";
|
2
|
+
import { useGetAssetsDataQuery } from "../data/state-manager/api";
|
3
|
+
export function useAssetsData({ search, currencyIds, }) {
|
4
|
+
const [cursor, setCursor] = useState(undefined);
|
5
|
+
const { data, error, isLoading, isSuccess } = useGetAssetsDataQuery({
|
6
|
+
cursor,
|
7
|
+
search,
|
8
|
+
currencyIds,
|
9
|
+
});
|
10
|
+
const loadNext = useCallback(() => {
|
11
|
+
const nextCursor = data?.pagination?.nextCursor;
|
12
|
+
if (nextCursor) {
|
13
|
+
setCursor(nextCursor);
|
14
|
+
}
|
15
|
+
}, [data?.pagination?.nextCursor]);
|
16
|
+
const hasMore = Boolean(data?.pagination?.nextCursor);
|
17
|
+
return {
|
18
|
+
data,
|
19
|
+
error,
|
20
|
+
isLoading,
|
21
|
+
isSuccess,
|
22
|
+
hasMore,
|
23
|
+
cursor,
|
24
|
+
loadNext,
|
25
|
+
};
|
26
|
+
}
|
27
|
+
//# sourceMappingURL=useAssetsData.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useAssetsData.js","sourceRoot":"","sources":["../../../src/modularDrawer/hooks/useAssetsData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE,MAAM,UAAU,aAAa,CAAC,EAC5B,MAAM,EACN,WAAW,GAIZ;IACC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAqB,SAAS,CAAC,CAAC;IACpE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,qBAAqB,CAAC;QAClE,MAAM;QACN,MAAM;QACN,WAAW;KACZ,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,EAAE;QAChC,MAAM,UAAU,GAAG,IAAI,EAAE,UAAU,EAAE,UAAU,CAAC;QAChD,IAAI,UAAU,EAAE;YACd,SAAS,CAAC,UAAU,CAAC,CAAC;SACvB;IACH,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC;IAEnC,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;IAEtD,OAAO;QACL,IAAI;QACJ,KAAK;QACL,SAAS;QACT,SAAS;QACT,OAAO;QACP,MAAM;QACN,QAAQ;KACT,CAAC;AACJ,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/modularDrawer/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/modularDrawer/types.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"counterValueFormatter.test.d.ts","sourceRoot":"","sources":["../../../../src/modularDrawer/utils/__tests__/counterValueFormatter.test.ts"],"names":[],"mappings":""}
|