@ledgerhq/live-common 34.47.0-nightly.8 → 34.47.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.map +1 -1
- package/lib/bridge/crypto-assets/index.js +0 -4
- package/lib/bridge/crypto-assets/index.js.map +1 -1
- package/lib/bridge/crypto-assets/index.test.js +0 -36
- package/lib/bridge/crypto-assets/index.test.js.map +1 -1
- package/lib/bridge/generic-alpaca/alpaca/index.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/alpaca/index.js +1 -6
- package/lib/bridge/generic-alpaca/alpaca/index.js.map +1 -1
- package/lib/bridge/generic-alpaca/alpaca/network/network-alpaca.js +1 -1
- package/lib/bridge/generic-alpaca/alpaca/network/network-alpaca.js.map +1 -1
- package/lib/bridge/generic-alpaca/buildSubAccounts.d.ts +3 -2
- package/lib/bridge/generic-alpaca/buildSubAccounts.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/buildSubAccounts.js +14 -4
- package/lib/bridge/generic-alpaca/buildSubAccounts.js.map +1 -1
- package/lib/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/getAccountShape.js +4 -4
- package/lib/bridge/generic-alpaca/getAccountShape.js.map +1 -1
- package/lib/bridge/generic-alpaca/getTransactionStatus.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/getTransactionStatus.js +1 -0
- package/lib/bridge/generic-alpaca/getTransactionStatus.js.map +1 -1
- package/lib/bridge/generic-alpaca/prepareTransaction.d.ts +3 -14
- package/lib/bridge/generic-alpaca/prepareTransaction.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/prepareTransaction.js +5 -21
- package/lib/bridge/generic-alpaca/prepareTransaction.js.map +1 -1
- package/lib/bridge/generic-alpaca/tests/utils.test.d.ts.map +1 -0
- package/lib/bridge/generic-alpaca/tests/utils.test.js +20 -0
- package/lib/bridge/generic-alpaca/tests/utils.test.js.map +1 -0
- package/lib/bridge/generic-alpaca/utils.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/utils.js +5 -6
- package/lib/bridge/generic-alpaca/utils.js.map +1 -1
- package/lib/e2e/enum/DeviceLabels.d.ts +1 -3
- package/lib/e2e/enum/DeviceLabels.d.ts.map +1 -1
- package/lib/e2e/enum/DeviceLabels.js +0 -2
- package/lib/e2e/enum/DeviceLabels.js.map +1 -1
- package/lib/e2e/families/tezos.d.ts.map +1 -1
- package/lib/e2e/families/tezos.js +0 -2
- package/lib/e2e/families/tezos.js.map +1 -1
- package/lib/e2e/index.d.ts +6 -4
- package/lib/e2e/index.d.ts.map +1 -1
- package/lib/e2e/speculos.d.ts +0 -1
- package/lib/e2e/speculos.d.ts.map +1 -1
- package/lib/e2e/speculos.js +2 -12
- package/lib/e2e/speculos.js.map +1 -1
- package/lib/exchange/platform/transfer/completeExchange.d.ts.map +1 -1
- package/lib/exchange/platform/transfer/completeExchange.js +5 -3
- package/lib/exchange/platform/transfer/completeExchange.js.map +1 -1
- package/lib/exchange/swap/completeExchange.d.ts.map +1 -1
- package/lib/exchange/swap/completeExchange.js +2 -5
- package/lib/exchange/swap/completeExchange.js.map +1 -1
- package/lib/exchange/swap/initSwap.d.ts.map +1 -1
- package/lib/exchange/swap/initSwap.js +2 -5
- package/lib/exchange/swap/initSwap.js.map +1 -1
- package/lib/families/canton/config.d.ts.map +1 -1
- package/lib/families/canton/config.js +0 -4
- package/lib/families/canton/config.js.map +1 -1
- package/lib/families/solana/setup.d.ts.map +1 -1
- package/lib/families/solana/setup.js +0 -9
- package/lib/families/solana/setup.js.map +1 -1
- package/lib/featureFlags/defaultFeatures.d.ts.map +1 -1
- package/lib/featureFlags/defaultFeatures.js +2 -1
- 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/modularDrawer/data/state-manager/api.d.ts +37 -727
- package/lib/modularDrawer/data/state-manager/api.d.ts.map +1 -1
- package/lib/modularDrawer/data/state-manager/api.js +17 -38
- package/lib/modularDrawer/data/state-manager/api.js.map +1 -1
- package/lib/modularDrawer/hooks/__test__/useAssetsData.test.js +78 -134
- package/lib/modularDrawer/hooks/__test__/useAssetsData.test.js.map +1 -1
- package/{lib-es/modularDrawer/hooks → lib/modularDrawer/hooks/modules}/useAssetAccountCounts.d.ts +1 -1
- package/lib/modularDrawer/hooks/modules/useAssetAccountCounts.d.ts.map +1 -0
- package/lib/modularDrawer/hooks/{useAssetAccountCounts.js → modules/useAssetAccountCounts.js} +1 -1
- package/lib/modularDrawer/hooks/modules/useAssetAccountCounts.js.map +1 -0
- package/lib/modularDrawer/hooks/modules/useLeftApyModule.d.ts +3 -3
- package/lib/modularDrawer/hooks/modules/useLeftApyModule.d.ts.map +1 -1
- package/lib/modularDrawer/hooks/modules/useLeftApyModule.js +10 -59
- package/lib/modularDrawer/hooks/modules/useLeftApyModule.js.map +1 -1
- package/lib/modularDrawer/hooks/useAssetsData.d.ts +6 -10
- package/lib/modularDrawer/hooks/useAssetsData.d.ts.map +1 -1
- package/lib/modularDrawer/hooks/useAssetsData.js +17 -40
- package/lib/modularDrawer/hooks/useAssetsData.js.map +1 -1
- 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/type.d.ts +1 -89
- package/lib/modularDrawer/utils/type.d.ts.map +1 -1
- package/lib/wallet-api/Exchange/server.js +2 -2
- package/lib/wallet-api/Exchange/server.js.map +1 -1
- package/lib/wallet-api/react.d.ts +0 -2
- package/lib/wallet-api/react.d.ts.map +1 -1
- package/lib/wallet-api/react.js +1 -3
- package/lib/wallet-api/react.js.map +1 -1
- package/lib-es/bridge/crypto-assets/index.d.ts.map +1 -1
- package/lib-es/bridge/crypto-assets/index.js +0 -4
- package/lib-es/bridge/crypto-assets/index.js.map +1 -1
- package/lib-es/bridge/crypto-assets/index.test.js +0 -36
- package/lib-es/bridge/crypto-assets/index.test.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/alpaca/index.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/alpaca/index.js +1 -6
- package/lib-es/bridge/generic-alpaca/alpaca/index.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/alpaca/network/network-alpaca.js +1 -1
- package/lib-es/bridge/generic-alpaca/alpaca/network/network-alpaca.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/buildSubAccounts.d.ts +3 -2
- package/lib-es/bridge/generic-alpaca/buildSubAccounts.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/buildSubAccounts.js +12 -4
- package/lib-es/bridge/generic-alpaca/buildSubAccounts.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/getAccountShape.js +3 -3
- package/lib-es/bridge/generic-alpaca/getAccountShape.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/getTransactionStatus.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/getTransactionStatus.js +1 -0
- package/lib-es/bridge/generic-alpaca/getTransactionStatus.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/prepareTransaction.d.ts +3 -14
- package/lib-es/bridge/generic-alpaca/prepareTransaction.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/prepareTransaction.js +5 -21
- package/lib-es/bridge/generic-alpaca/prepareTransaction.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/tests/utils.test.d.ts.map +1 -0
- package/lib-es/bridge/generic-alpaca/tests/utils.test.js +18 -0
- package/lib-es/bridge/generic-alpaca/tests/utils.test.js.map +1 -0
- package/lib-es/bridge/generic-alpaca/utils.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/utils.js +5 -6
- package/lib-es/bridge/generic-alpaca/utils.js.map +1 -1
- package/lib-es/e2e/enum/DeviceLabels.d.ts +1 -3
- package/lib-es/e2e/enum/DeviceLabels.d.ts.map +1 -1
- package/lib-es/e2e/enum/DeviceLabels.js +0 -2
- package/lib-es/e2e/enum/DeviceLabels.js.map +1 -1
- package/lib-es/e2e/families/tezos.d.ts.map +1 -1
- package/lib-es/e2e/families/tezos.js +0 -2
- package/lib-es/e2e/families/tezos.js.map +1 -1
- package/lib-es/e2e/index.d.ts +6 -4
- package/lib-es/e2e/index.d.ts.map +1 -1
- package/lib-es/e2e/speculos.d.ts +0 -1
- package/lib-es/e2e/speculos.d.ts.map +1 -1
- package/lib-es/e2e/speculos.js +1 -10
- package/lib-es/e2e/speculos.js.map +1 -1
- package/lib-es/exchange/platform/transfer/completeExchange.d.ts.map +1 -1
- package/lib-es/exchange/platform/transfer/completeExchange.js +2 -3
- package/lib-es/exchange/platform/transfer/completeExchange.js.map +1 -1
- package/lib-es/exchange/swap/completeExchange.d.ts.map +1 -1
- package/lib-es/exchange/swap/completeExchange.js +2 -5
- package/lib-es/exchange/swap/completeExchange.js.map +1 -1
- package/lib-es/exchange/swap/initSwap.d.ts.map +1 -1
- package/lib-es/exchange/swap/initSwap.js +2 -5
- package/lib-es/exchange/swap/initSwap.js.map +1 -1
- package/lib-es/families/canton/config.d.ts.map +1 -1
- package/lib-es/families/canton/config.js +0 -4
- package/lib-es/families/canton/config.js.map +1 -1
- package/lib-es/families/solana/setup.d.ts.map +1 -1
- package/lib-es/families/solana/setup.js +0 -9
- package/lib-es/families/solana/setup.js.map +1 -1
- package/lib-es/featureFlags/defaultFeatures.d.ts.map +1 -1
- package/lib-es/featureFlags/defaultFeatures.js +2 -1
- 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/modularDrawer/data/state-manager/api.d.ts +37 -727
- package/lib-es/modularDrawer/data/state-manager/api.d.ts.map +1 -1
- package/lib-es/modularDrawer/data/state-manager/api.js +14 -35
- package/lib-es/modularDrawer/data/state-manager/api.js.map +1 -1
- package/lib-es/modularDrawer/hooks/__test__/useAssetsData.test.js +79 -135
- package/lib-es/modularDrawer/hooks/__test__/useAssetsData.test.js.map +1 -1
- package/{lib/modularDrawer/hooks → lib-es/modularDrawer/hooks/modules}/useAssetAccountCounts.d.ts +1 -1
- package/lib-es/modularDrawer/hooks/modules/useAssetAccountCounts.d.ts.map +1 -0
- package/lib-es/modularDrawer/hooks/{useAssetAccountCounts.js → modules/useAssetAccountCounts.js} +1 -1
- package/lib-es/modularDrawer/hooks/modules/useAssetAccountCounts.js.map +1 -0
- package/lib-es/modularDrawer/hooks/modules/useLeftApyModule.d.ts +3 -3
- package/lib-es/modularDrawer/hooks/modules/useLeftApyModule.d.ts.map +1 -1
- package/lib-es/modularDrawer/hooks/modules/useLeftApyModule.js +8 -37
- package/lib-es/modularDrawer/hooks/modules/useLeftApyModule.js.map +1 -1
- package/lib-es/modularDrawer/hooks/useAssetsData.d.ts +6 -10
- package/lib-es/modularDrawer/hooks/useAssetsData.d.ts.map +1 -1
- package/lib-es/modularDrawer/hooks/useAssetsData.js +19 -42
- package/lib-es/modularDrawer/hooks/useAssetsData.js.map +1 -1
- 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/type.d.ts +1 -89
- package/lib-es/modularDrawer/utils/type.d.ts.map +1 -1
- package/lib-es/wallet-api/Exchange/server.js +2 -2
- package/lib-es/wallet-api/Exchange/server.js.map +1 -1
- package/lib-es/wallet-api/react.d.ts +0 -2
- package/lib-es/wallet-api/react.d.ts.map +1 -1
- package/lib-es/wallet-api/react.js +1 -3
- package/lib-es/wallet-api/react.js.map +1 -1
- package/package.json +77 -77
- package/src/bridge/crypto-assets/index.test.ts +0 -47
- package/src/bridge/crypto-assets/index.ts +0 -5
- package/src/bridge/generic-alpaca/alpaca/index.ts +1 -14
- package/src/bridge/generic-alpaca/alpaca/network/network-alpaca.ts +1 -1
- package/src/bridge/generic-alpaca/buildSubAccounts.ts +14 -5
- package/src/bridge/generic-alpaca/getAccountShape.ts +4 -3
- package/src/bridge/generic-alpaca/getTransactionStatus.ts +1 -0
- package/src/bridge/generic-alpaca/prepareTransaction.ts +17 -44
- package/src/bridge/generic-alpaca/tests/utils.test.ts +19 -0
- package/src/bridge/generic-alpaca/utils.ts +5 -7
- package/src/e2e/enum/DeviceLabels.ts +0 -2
- package/src/e2e/families/tezos.ts +0 -2
- package/src/e2e/speculos.ts +1 -11
- package/src/exchange/platform/transfer/completeExchange.ts +2 -3
- package/src/exchange/swap/completeExchange.ts +2 -5
- package/src/exchange/swap/initSwap.ts +4 -5
- package/src/families/canton/config.ts +0 -5
- package/src/families/solana/setup.ts +0 -9
- package/src/featureFlags/defaultFeatures.ts +2 -1
- package/src/modularDrawer/data/state-manager/api.ts +27 -42
- package/src/modularDrawer/hooks/__test__/useAssetsData.test.ts +80 -141
- package/src/modularDrawer/hooks/{useAssetAccountCounts.tsx → modules/useAssetAccountCounts.tsx} +2 -2
- package/src/modularDrawer/hooks/modules/useLeftApyModule.tsx +9 -42
- package/src/modularDrawer/hooks/useAssetsData.ts +22 -59
- package/src/modularDrawer/types.ts +1 -0
- package/src/modularDrawer/utils/type.ts +0 -97
- package/src/wallet-api/Exchange/server.ts +2 -2
- package/src/wallet-api/react.ts +1 -5
- package/lib/bridge/crypto-assets/cal-integration.d.ts +0 -4
- package/lib/bridge/crypto-assets/cal-integration.d.ts.map +0 -1
- package/lib/bridge/crypto-assets/cal-integration.js +0 -26
- package/lib/bridge/crypto-assets/cal-integration.js.map +0 -1
- package/lib/bridge/crypto-assets/cal-integration.test.d.ts +0 -2
- package/lib/bridge/crypto-assets/cal-integration.test.d.ts.map +0 -1
- package/lib/bridge/crypto-assets/cal-integration.test.js +0 -45
- package/lib/bridge/crypto-assets/cal-integration.test.js.map +0 -1
- package/lib/bridge/crypto-assets/cal-store.d.ts +0 -14
- package/lib/bridge/crypto-assets/cal-store.d.ts.map +0 -1
- package/lib/bridge/crypto-assets/cal-store.js +0 -58
- package/lib/bridge/crypto-assets/cal-store.js.map +0 -1
- package/lib/bridge/crypto-assets/cal-store.test.d.ts +0 -2
- package/lib/bridge/crypto-assets/cal-store.test.d.ts.map +0 -1
- package/lib/bridge/crypto-assets/cal-store.test.js +0 -70
- package/lib/bridge/crypto-assets/cal-store.test.js.map +0 -1
- package/lib/bridge/generic-alpaca/alpaca/index.unit.test.d.ts +0 -2
- package/lib/bridge/generic-alpaca/alpaca/index.unit.test.d.ts.map +0 -1
- package/lib/bridge/generic-alpaca/alpaca/index.unit.test.js +0 -89
- package/lib/bridge/generic-alpaca/alpaca/index.unit.test.js.map +0 -1
- package/lib/bridge/generic-alpaca/utils.test.d.ts.map +0 -1
- package/lib/bridge/generic-alpaca/utils.test.js +0 -123
- package/lib/bridge/generic-alpaca/utils.test.js.map +0 -1
- package/lib/modularDrawer/__mocks__/dada.mock.d.ts +0 -3336
- package/lib/modularDrawer/__mocks__/dada.mock.d.ts.map +0 -1
- package/lib/modularDrawer/__mocks__/dada.mock.js +0 -3879
- package/lib/modularDrawer/__mocks__/dada.mock.js.map +0 -1
- package/lib/modularDrawer/data/entities/interestRateSelectors.d.ts +0 -16
- package/lib/modularDrawer/data/entities/interestRateSelectors.d.ts.map +0 -1
- package/lib/modularDrawer/data/entities/interestRateSelectors.js +0 -21
- package/lib/modularDrawer/data/entities/interestRateSelectors.js.map +0 -1
- package/lib/modularDrawer/data/state-manager/types.d.ts +0 -24
- package/lib/modularDrawer/data/state-manager/types.d.ts.map +0 -1
- package/lib/modularDrawer/data/state-manager/types.js +0 -13
- package/lib/modularDrawer/data/state-manager/types.js.map +0 -1
- package/lib/modularDrawer/hooks/useAssetAccountCounts.d.ts.map +0 -1
- package/lib/modularDrawer/hooks/useAssetAccountCounts.js.map +0 -1
- package/lib/modularDrawer/hooks/useLeftAccounts.d.ts +0 -13
- package/lib/modularDrawer/hooks/useLeftAccounts.d.ts.map +0 -1
- package/lib/modularDrawer/hooks/useLeftAccounts.js +0 -15
- package/lib/modularDrawer/hooks/useLeftAccounts.js.map +0 -1
- package/lib/modularDrawer/hooks/useLeftAccountsApy.d.ts +0 -6
- package/lib/modularDrawer/hooks/useLeftAccountsApy.d.ts.map +0 -1
- package/lib/modularDrawer/hooks/useLeftAccountsApy.js +0 -19
- package/lib/modularDrawer/hooks/useLeftAccountsApy.js.map +0 -1
- package/lib/modularDrawer/hooks/useLeftApy.d.ts +0 -54
- package/lib/modularDrawer/hooks/useLeftApy.d.ts.map +0 -1
- package/lib/modularDrawer/hooks/useLeftApy.js +0 -15
- package/lib/modularDrawer/hooks/useLeftApy.js.map +0 -1
- package/lib/modularDrawer/hooks/useRightBalanceAsset.d.ts +0 -57
- package/lib/modularDrawer/hooks/useRightBalanceAsset.d.ts.map +0 -1
- package/lib/modularDrawer/hooks/useRightBalanceAsset.js +0 -87
- package/lib/modularDrawer/hooks/useRightBalanceAsset.js.map +0 -1
- package/lib/modularDrawer/hooks/useRightBalanceNetwork.d.ts +0 -63
- package/lib/modularDrawer/hooks/useRightBalanceNetwork.d.ts.map +0 -1
- package/lib/modularDrawer/hooks/useRightBalanceNetwork.js +0 -66
- package/lib/modularDrawer/hooks/useRightBalanceNetwork.js.map +0 -1
- package/lib/modularDrawer/modules/createAssetConfiguration.d.ts +0 -4
- package/lib/modularDrawer/modules/createAssetConfiguration.d.ts.map +0 -1
- package/lib/modularDrawer/modules/createAssetConfiguration.js +0 -41
- package/lib/modularDrawer/modules/createAssetConfiguration.js.map +0 -1
- package/lib/modularDrawer/modules/createNetworkConfiguration.d.ts +0 -6
- package/lib/modularDrawer/modules/createNetworkConfiguration.d.ts.map +0 -1
- package/lib/modularDrawer/modules/createNetworkConfiguration.js +0 -56
- package/lib/modularDrawer/modules/createNetworkConfiguration.js.map +0 -1
- package/lib/modularDrawer/utils/buildProviderCurrenciesMap.d.ts +0 -9
- package/lib/modularDrawer/utils/buildProviderCurrenciesMap.d.ts.map +0 -1
- package/lib/modularDrawer/utils/buildProviderCurrenciesMap.js +0 -17
- package/lib/modularDrawer/utils/buildProviderCurrenciesMap.js.map +0 -1
- package/lib/modularDrawer/utils/getLoadingStatus.d.ts +0 -9
- package/lib/modularDrawer/utils/getLoadingStatus.d.ts.map +0 -1
- package/lib/modularDrawer/utils/getLoadingStatus.js +0 -18
- package/lib/modularDrawer/utils/getLoadingStatus.js.map +0 -1
- package/lib/modularDrawer/utils/sortByBalance.d.ts +0 -6
- package/lib/modularDrawer/utils/sortByBalance.d.ts.map +0 -1
- package/lib/modularDrawer/utils/sortByBalance.js +0 -32
- package/lib/modularDrawer/utils/sortByBalance.js.map +0 -1
- package/lib-es/bridge/crypto-assets/cal-integration.d.ts +0 -4
- package/lib-es/bridge/crypto-assets/cal-integration.d.ts.map +0 -1
- package/lib-es/bridge/crypto-assets/cal-integration.js +0 -21
- package/lib-es/bridge/crypto-assets/cal-integration.js.map +0 -1
- package/lib-es/bridge/crypto-assets/cal-integration.test.d.ts +0 -2
- package/lib-es/bridge/crypto-assets/cal-integration.test.d.ts.map +0 -1
- package/lib-es/bridge/crypto-assets/cal-integration.test.js +0 -43
- package/lib-es/bridge/crypto-assets/cal-integration.test.js.map +0 -1
- package/lib-es/bridge/crypto-assets/cal-store.d.ts +0 -14
- package/lib-es/bridge/crypto-assets/cal-store.d.ts.map +0 -1
- package/lib-es/bridge/crypto-assets/cal-store.js +0 -54
- package/lib-es/bridge/crypto-assets/cal-store.js.map +0 -1
- package/lib-es/bridge/crypto-assets/cal-store.test.d.ts +0 -2
- package/lib-es/bridge/crypto-assets/cal-store.test.d.ts.map +0 -1
- package/lib-es/bridge/crypto-assets/cal-store.test.js +0 -68
- package/lib-es/bridge/crypto-assets/cal-store.test.js.map +0 -1
- package/lib-es/bridge/generic-alpaca/alpaca/index.unit.test.d.ts +0 -2
- package/lib-es/bridge/generic-alpaca/alpaca/index.unit.test.d.ts.map +0 -1
- package/lib-es/bridge/generic-alpaca/alpaca/index.unit.test.js +0 -64
- package/lib-es/bridge/generic-alpaca/alpaca/index.unit.test.js.map +0 -1
- package/lib-es/bridge/generic-alpaca/utils.test.d.ts.map +0 -1
- package/lib-es/bridge/generic-alpaca/utils.test.js +0 -118
- package/lib-es/bridge/generic-alpaca/utils.test.js.map +0 -1
- package/lib-es/modularDrawer/__mocks__/dada.mock.d.ts +0 -3336
- package/lib-es/modularDrawer/__mocks__/dada.mock.d.ts.map +0 -1
- package/lib-es/modularDrawer/__mocks__/dada.mock.js +0 -3876
- package/lib-es/modularDrawer/__mocks__/dada.mock.js.map +0 -1
- package/lib-es/modularDrawer/data/entities/interestRateSelectors.d.ts +0 -16
- package/lib-es/modularDrawer/data/entities/interestRateSelectors.d.ts.map +0 -1
- package/lib-es/modularDrawer/data/entities/interestRateSelectors.js +0 -18
- package/lib-es/modularDrawer/data/entities/interestRateSelectors.js.map +0 -1
- package/lib-es/modularDrawer/data/state-manager/types.d.ts +0 -24
- package/lib-es/modularDrawer/data/state-manager/types.d.ts.map +0 -1
- package/lib-es/modularDrawer/data/state-manager/types.js +0 -10
- package/lib-es/modularDrawer/data/state-manager/types.js.map +0 -1
- package/lib-es/modularDrawer/hooks/useAssetAccountCounts.d.ts.map +0 -1
- package/lib-es/modularDrawer/hooks/useAssetAccountCounts.js.map +0 -1
- package/lib-es/modularDrawer/hooks/useLeftAccounts.d.ts +0 -13
- package/lib-es/modularDrawer/hooks/useLeftAccounts.d.ts.map +0 -1
- package/lib-es/modularDrawer/hooks/useLeftAccounts.js +0 -11
- package/lib-es/modularDrawer/hooks/useLeftAccounts.js.map +0 -1
- package/lib-es/modularDrawer/hooks/useLeftAccountsApy.d.ts +0 -6
- package/lib-es/modularDrawer/hooks/useLeftAccountsApy.d.ts.map +0 -1
- package/lib-es/modularDrawer/hooks/useLeftAccountsApy.js +0 -15
- package/lib-es/modularDrawer/hooks/useLeftAccountsApy.js.map +0 -1
- package/lib-es/modularDrawer/hooks/useLeftApy.d.ts +0 -54
- package/lib-es/modularDrawer/hooks/useLeftApy.d.ts.map +0 -1
- package/lib-es/modularDrawer/hooks/useLeftApy.js +0 -11
- package/lib-es/modularDrawer/hooks/useLeftApy.js.map +0 -1
- package/lib-es/modularDrawer/hooks/useRightBalanceAsset.d.ts +0 -57
- package/lib-es/modularDrawer/hooks/useRightBalanceAsset.d.ts.map +0 -1
- package/lib-es/modularDrawer/hooks/useRightBalanceAsset.js +0 -83
- package/lib-es/modularDrawer/hooks/useRightBalanceAsset.js.map +0 -1
- package/lib-es/modularDrawer/hooks/useRightBalanceNetwork.d.ts +0 -63
- package/lib-es/modularDrawer/hooks/useRightBalanceNetwork.d.ts.map +0 -1
- package/lib-es/modularDrawer/hooks/useRightBalanceNetwork.js +0 -62
- package/lib-es/modularDrawer/hooks/useRightBalanceNetwork.js.map +0 -1
- package/lib-es/modularDrawer/modules/createAssetConfiguration.d.ts +0 -4
- package/lib-es/modularDrawer/modules/createAssetConfiguration.d.ts.map +0 -1
- package/lib-es/modularDrawer/modules/createAssetConfiguration.js +0 -39
- package/lib-es/modularDrawer/modules/createAssetConfiguration.js.map +0 -1
- package/lib-es/modularDrawer/modules/createNetworkConfiguration.d.ts +0 -6
- package/lib-es/modularDrawer/modules/createNetworkConfiguration.d.ts.map +0 -1
- package/lib-es/modularDrawer/modules/createNetworkConfiguration.js +0 -50
- package/lib-es/modularDrawer/modules/createNetworkConfiguration.js.map +0 -1
- package/lib-es/modularDrawer/utils/buildProviderCurrenciesMap.d.ts +0 -9
- package/lib-es/modularDrawer/utils/buildProviderCurrenciesMap.d.ts.map +0 -1
- package/lib-es/modularDrawer/utils/buildProviderCurrenciesMap.js +0 -13
- package/lib-es/modularDrawer/utils/buildProviderCurrenciesMap.js.map +0 -1
- package/lib-es/modularDrawer/utils/getLoadingStatus.d.ts +0 -9
- package/lib-es/modularDrawer/utils/getLoadingStatus.d.ts.map +0 -1
- package/lib-es/modularDrawer/utils/getLoadingStatus.js +0 -14
- package/lib-es/modularDrawer/utils/getLoadingStatus.js.map +0 -1
- package/lib-es/modularDrawer/utils/sortByBalance.d.ts +0 -6
- package/lib-es/modularDrawer/utils/sortByBalance.d.ts.map +0 -1
- package/lib-es/modularDrawer/utils/sortByBalance.js +0 -25
- package/lib-es/modularDrawer/utils/sortByBalance.js.map +0 -1
- package/src/bridge/crypto-assets/cal-integration.test.ts +0 -53
- package/src/bridge/crypto-assets/cal-integration.ts +0 -23
- package/src/bridge/crypto-assets/cal-store.test.ts +0 -93
- package/src/bridge/crypto-assets/cal-store.ts +0 -63
- package/src/bridge/generic-alpaca/alpaca/index.unit.test.ts +0 -78
- package/src/bridge/generic-alpaca/utils.test.ts +0 -133
- package/src/modularDrawer/__mocks__/dada.mock.ts +0 -3890
- package/src/modularDrawer/data/entities/interestRateSelectors.ts +0 -39
- package/src/modularDrawer/data/state-manager/types.ts +0 -28
- package/src/modularDrawer/hooks/useLeftAccounts.tsx +0 -23
- package/src/modularDrawer/hooks/useLeftAccountsApy.tsx +0 -28
- package/src/modularDrawer/hooks/useLeftApy.tsx +0 -19
- package/src/modularDrawer/hooks/useRightBalanceAsset.tsx +0 -140
- package/src/modularDrawer/hooks/useRightBalanceNetwork.tsx +0 -116
- package/src/modularDrawer/modules/createAssetConfiguration.ts +0 -61
- package/src/modularDrawer/modules/createNetworkConfiguration.ts +0 -79
- package/src/modularDrawer/utils/buildProviderCurrenciesMap.tsx +0 -25
- package/src/modularDrawer/utils/getLoadingStatus.ts +0 -24
- package/src/modularDrawer/utils/sortByBalance.tsx +0 -32
- /package/lib/bridge/generic-alpaca/{utils.test.d.ts → tests/utils.test.d.ts} +0 -0
- /package/lib-es/bridge/generic-alpaca/{utils.test.d.ts → tests/utils.test.d.ts} +0 -0
@@ -1,78 +0,0 @@
|
|
1
|
-
import { getAlpacaApi } from "./index";
|
2
|
-
import * as xrpModule from "@ledgerhq/coin-xrp/api/index";
|
3
|
-
import * as stellarModule from "@ledgerhq/coin-stellar/api/index";
|
4
|
-
import * as cantonModule from "@ledgerhq/coin-canton/api/index";
|
5
|
-
import * as tronModule from "@ledgerhq/coin-tron/api/index";
|
6
|
-
import * as config from "../../../config";
|
7
|
-
import * as networkApi from "./network/network-alpaca";
|
8
|
-
import * as cryptoAssets from "@ledgerhq/cryptoassets/currencies";
|
9
|
-
|
10
|
-
const mockApiInstance = { mock: "api" };
|
11
|
-
|
12
|
-
jest.mock("@ledgerhq/cryptoassets/currencies", () => ({
|
13
|
-
getCryptoCurrencyById: jest.fn(),
|
14
|
-
}));
|
15
|
-
|
16
|
-
jest.mock("../../../config", () => ({
|
17
|
-
getCurrencyConfiguration: jest.fn(),
|
18
|
-
}));
|
19
|
-
|
20
|
-
jest.mock("@ledgerhq/coin-xrp/api/index", () => ({
|
21
|
-
createApi: jest.fn(),
|
22
|
-
}));
|
23
|
-
|
24
|
-
jest.mock("@ledgerhq/coin-stellar/api/index", () => ({
|
25
|
-
createApi: jest.fn(),
|
26
|
-
}));
|
27
|
-
|
28
|
-
jest.mock("@ledgerhq/coin-canton/api/index", () => ({
|
29
|
-
createApi: jest.fn(),
|
30
|
-
}));
|
31
|
-
|
32
|
-
jest.mock("@ledgerhq/coin-tron/api/index", () => ({
|
33
|
-
createApi: jest.fn(),
|
34
|
-
}));
|
35
|
-
|
36
|
-
jest.mock("./network/network-alpaca", () => ({
|
37
|
-
getNetworkAlpacaApi: jest.fn(),
|
38
|
-
}));
|
39
|
-
|
40
|
-
describe("getAlpacaApi", () => {
|
41
|
-
const mockCurrency = { id: "mock-currency" };
|
42
|
-
|
43
|
-
beforeEach(() => {
|
44
|
-
jest.clearAllMocks();
|
45
|
-
|
46
|
-
// Common mocks
|
47
|
-
(cryptoAssets.getCryptoCurrencyById as jest.Mock).mockReturnValue(mockCurrency);
|
48
|
-
(config.getCurrencyConfiguration as jest.Mock).mockReturnValue({ config: true });
|
49
|
-
|
50
|
-
// API mocks
|
51
|
-
jest.spyOn(xrpModule, "createApi").mockReturnValue(mockApiInstance as any);
|
52
|
-
jest.spyOn(stellarModule, "createApi").mockReturnValue(mockApiInstance as any);
|
53
|
-
jest.spyOn(cantonModule, "createApi").mockReturnValue(mockApiInstance as any);
|
54
|
-
jest.spyOn(tronModule, "createApi").mockReturnValue(mockApiInstance as any);
|
55
|
-
jest.spyOn(networkApi, "getNetworkAlpacaApi").mockReturnValue(mockApiInstance as any);
|
56
|
-
});
|
57
|
-
|
58
|
-
const testCases = [
|
59
|
-
{ network: "xrp", module: xrpModule, label: "XRP" },
|
60
|
-
{ network: "stellar", module: stellarModule, label: "Stellar" },
|
61
|
-
{ network: "tron", module: tronModule, label: "Tron" },
|
62
|
-
{ network: "canton", module: cantonModule, label: "Canton" },
|
63
|
-
];
|
64
|
-
|
65
|
-
testCases.forEach(({ network, module, label }) => {
|
66
|
-
it(`should return ${label} API for network "${network}" and kind "local"`, () => {
|
67
|
-
const result = getAlpacaApi(network, "local");
|
68
|
-
expect(result).toEqual(mockApiInstance);
|
69
|
-
expect(module.createApi).toHaveBeenCalledWith({ config: true });
|
70
|
-
});
|
71
|
-
});
|
72
|
-
|
73
|
-
it("should return network API for kind !== 'local'", () => {
|
74
|
-
const result = getAlpacaApi("xrp", "remote");
|
75
|
-
expect(networkApi.getNetworkAlpacaApi).toHaveBeenCalledWith("xrp");
|
76
|
-
expect(result).toEqual(mockApiInstance);
|
77
|
-
});
|
78
|
-
});
|
@@ -1,133 +0,0 @@
|
|
1
|
-
import { adaptCoreOperationToLiveOperation, extractBalance } from "./utils";
|
2
|
-
import BigNumber from "bignumber.js";
|
3
|
-
import { Operation as CoreOperation } from "@ledgerhq/coin-framework/api/types";
|
4
|
-
|
5
|
-
describe("Alpaca utils", () => {
|
6
|
-
describe("extractBalance", () => {
|
7
|
-
it("extracts an existing balance", () => {
|
8
|
-
expect(extractBalance([{ value: 4n, asset: { type: "type1" } }], "type1")).toEqual({
|
9
|
-
value: 4n,
|
10
|
-
asset: { type: "type1" },
|
11
|
-
});
|
12
|
-
});
|
13
|
-
|
14
|
-
it("generates an empty balance for a missing type", () => {
|
15
|
-
expect(extractBalance([{ value: 4n, asset: { type: "type1" } }], "type2")).toEqual({
|
16
|
-
value: 0n,
|
17
|
-
asset: { type: "type2" },
|
18
|
-
});
|
19
|
-
});
|
20
|
-
});
|
21
|
-
|
22
|
-
jest.mock("@ledgerhq/coin-framework/operation", () => ({
|
23
|
-
encodeOperationId: jest.fn((accountId, txHash, opType) => `${accountId}-${txHash}-${opType}`),
|
24
|
-
}));
|
25
|
-
|
26
|
-
describe("adaptCoreOperationToLiveOperation", () => {
|
27
|
-
const accountId = "acc_123";
|
28
|
-
const baseOp: CoreOperation = {
|
29
|
-
id: "op_123",
|
30
|
-
asset: { type: "native" },
|
31
|
-
type: "OUT",
|
32
|
-
value: BigInt(100),
|
33
|
-
tx: {
|
34
|
-
hash: "txhash123",
|
35
|
-
fees: BigInt(10),
|
36
|
-
block: {
|
37
|
-
hash: "blockhash123",
|
38
|
-
height: 123456,
|
39
|
-
},
|
40
|
-
date: new Date("2025-08-29T12:00:00Z"),
|
41
|
-
},
|
42
|
-
senders: ["sender1"],
|
43
|
-
recipients: ["recipient1"],
|
44
|
-
};
|
45
|
-
|
46
|
-
it("does not include fees in non native asset value", () => {
|
47
|
-
expect(
|
48
|
-
adaptCoreOperationToLiveOperation("account", {
|
49
|
-
id: "operation",
|
50
|
-
asset: { type: "token", assetOwner: "owner", assetReference: "reference" },
|
51
|
-
type: "OUT",
|
52
|
-
value: BigInt(100),
|
53
|
-
tx: {
|
54
|
-
hash: "hash",
|
55
|
-
fees: BigInt(10),
|
56
|
-
block: {
|
57
|
-
hash: "block_hash",
|
58
|
-
height: 123456,
|
59
|
-
},
|
60
|
-
date: new Date("2025-08-29T12:00:00Z"),
|
61
|
-
},
|
62
|
-
senders: ["sender"],
|
63
|
-
recipients: ["recipient"],
|
64
|
-
}),
|
65
|
-
).toEqual({
|
66
|
-
id: "account-hash-OUT",
|
67
|
-
hash: "hash",
|
68
|
-
accountId: "account",
|
69
|
-
type: "OUT",
|
70
|
-
value: new BigNumber(100), // value only
|
71
|
-
fee: new BigNumber(10),
|
72
|
-
extra: {
|
73
|
-
assetOwner: "owner",
|
74
|
-
assetReference: "reference",
|
75
|
-
},
|
76
|
-
blockHash: "block_hash",
|
77
|
-
blockHeight: 123456,
|
78
|
-
senders: ["sender"],
|
79
|
-
recipients: ["recipient"],
|
80
|
-
date: new Date("2025-08-29T12:00:00Z"),
|
81
|
-
transactionSequenceNumber: undefined,
|
82
|
-
hasFailed: false,
|
83
|
-
});
|
84
|
-
});
|
85
|
-
|
86
|
-
it("adapts a basic OUT operation", () => {
|
87
|
-
const result = adaptCoreOperationToLiveOperation(accountId, baseOp);
|
88
|
-
|
89
|
-
expect(result).toEqual({
|
90
|
-
id: "acc_123-txhash123-OUT",
|
91
|
-
hash: "txhash123",
|
92
|
-
accountId,
|
93
|
-
type: "OUT",
|
94
|
-
value: new BigNumber(110), // value + fee
|
95
|
-
fee: new BigNumber(10),
|
96
|
-
blockHash: "blockhash123",
|
97
|
-
blockHeight: 123456,
|
98
|
-
senders: ["sender1"],
|
99
|
-
recipients: ["recipient1"],
|
100
|
-
date: new Date("2025-08-29T12:00:00Z"),
|
101
|
-
transactionSequenceNumber: undefined,
|
102
|
-
hasFailed: false,
|
103
|
-
extra: {},
|
104
|
-
});
|
105
|
-
});
|
106
|
-
|
107
|
-
it("handles FEES operation where value = value + fees", () => {
|
108
|
-
const op = {
|
109
|
-
...baseOp,
|
110
|
-
type: "FEES",
|
111
|
-
value: BigInt(5),
|
112
|
-
tx: { ...baseOp.tx, fees: BigInt(2) },
|
113
|
-
};
|
114
|
-
|
115
|
-
const result = adaptCoreOperationToLiveOperation(accountId, op);
|
116
|
-
|
117
|
-
expect(result.value.toString()).toEqual("7");
|
118
|
-
});
|
119
|
-
|
120
|
-
it("handles non-FEES/OUT operation where value = value only", () => {
|
121
|
-
const op = {
|
122
|
-
...baseOp,
|
123
|
-
type: "IN",
|
124
|
-
value: BigInt(50),
|
125
|
-
tx: { ...baseOp.tx, fees: BigInt(2) },
|
126
|
-
};
|
127
|
-
|
128
|
-
const result = adaptCoreOperationToLiveOperation(accountId, op);
|
129
|
-
|
130
|
-
expect(result.value.toString()).toEqual("50");
|
131
|
-
});
|
132
|
-
});
|
133
|
-
});
|