@ledgerhq/live-common 34.50.0 → 34.51.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/__tests__/test-helpers/bridge.js +1 -1
- package/lib/__tests__/test-helpers/bridge.js.map +1 -1
- package/lib/__tests__/test-helpers/environment.js +1 -1
- package/lib/__tests__/test-helpers/environment.js.map +1 -1
- package/lib/bridge/generic-alpaca/alpaca/index.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/alpaca/index.js +3 -0
- package/lib/bridge/generic-alpaca/alpaca/index.js.map +1 -1
- package/lib/bridge/generic-alpaca/buildSubAccounts.d.ts +4 -4
- package/lib/bridge/generic-alpaca/buildSubAccounts.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/buildSubAccounts.js +7 -9
- package/lib/bridge/generic-alpaca/buildSubAccounts.js.map +1 -1
- package/lib/bridge/generic-alpaca/createTransaction.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/createTransaction.js +11 -0
- package/lib/bridge/generic-alpaca/createTransaction.js.map +1 -1
- package/lib/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/getAccountShape.js +15 -9
- package/lib/bridge/generic-alpaca/getAccountShape.js.map +1 -1
- package/lib/bridge/generic-alpaca/getTransactionStatus.js +1 -1
- 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 +29 -4
- package/lib/bridge/generic-alpaca/prepareTransaction.js.map +1 -1
- package/lib/bridge/generic-alpaca/signer/index.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/signer/index.js +37 -0
- package/lib/bridge/generic-alpaca/signer/index.js.map +1 -1
- package/lib/bridge/generic-alpaca/signer/signTransaction.d.ts +2 -0
- package/lib/bridge/generic-alpaca/signer/signTransaction.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/signer/signTransaction.js +8 -1
- package/lib/bridge/generic-alpaca/signer/signTransaction.js.map +1 -1
- package/lib/bridge/generic-alpaca/tests/estimateMaxSpendable.test.js +15 -1
- package/lib/bridge/generic-alpaca/tests/estimateMaxSpendable.test.js.map +1 -1
- package/lib/bridge/generic-alpaca/tests/getAccountShape.test.js +5 -3
- package/lib/bridge/generic-alpaca/tests/getAccountShape.test.js.map +1 -1
- package/lib/bridge/generic-alpaca/tests/prepareTransaction.test.js +60 -0
- package/lib/bridge/generic-alpaca/tests/prepareTransaction.test.js.map +1 -1
- package/lib/bridge/generic-alpaca/tests/signOperation.test.js +1 -1
- package/lib/bridge/generic-alpaca/tests/signOperation.test.js.map +1 -1
- package/lib/bridge/generic-alpaca/types.d.ts +1 -2
- package/lib/bridge/generic-alpaca/types.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/utils.d.ts +2 -2
- package/lib/bridge/generic-alpaca/utils.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/utils.js +23 -4
- package/lib/bridge/generic-alpaca/utils.js.map +1 -1
- package/lib/bridge/impl.d.ts.map +1 -1
- package/lib/bridge/impl.js +1 -0
- package/lib/bridge/impl.js.map +1 -1
- package/lib/dada-client/entities/index.d.ts.map +1 -0
- package/lib/dada-client/entities/index.js.map +1 -0
- package/lib/{modularDrawer/data → dada-client}/entities/interestRateSelectors.d.ts +1 -1
- package/lib/dada-client/entities/interestRateSelectors.d.ts.map +1 -0
- package/lib/dada-client/entities/interestRateSelectors.js.map +1 -0
- package/lib/{modularDrawer/data → dada-client}/entities/marketSelectors.d.ts +1 -1
- package/lib/dada-client/entities/marketSelectors.d.ts.map +1 -0
- package/lib/dada-client/entities/marketSelectors.js.map +1 -0
- package/lib/dada-client/entities/selectorUtils.d.ts.map +1 -0
- package/lib/dada-client/entities/selectorUtils.js.map +1 -0
- package/lib/dada-client/hooks/__tests__/useAssetsData.test.d.ts.map +1 -0
- package/lib/{modularDrawer/hooks/__test__ → dada-client/hooks/__tests__}/useAssetsData.test.js +2 -2
- package/lib/dada-client/hooks/__tests__/useAssetsData.test.js.map +1 -0
- package/lib/dada-client/hooks/useAssetData.d.ts +10 -0
- package/lib/dada-client/hooks/useAssetData.d.ts.map +1 -0
- package/lib/dada-client/hooks/useAssetData.js +23 -0
- package/lib/dada-client/hooks/useAssetData.js.map +1 -0
- package/lib/dada-client/hooks/useAssetsData.d.ts +19 -0
- package/lib/dada-client/hooks/useAssetsData.d.ts.map +1 -0
- package/lib/{modularDrawer → dada-client}/hooks/useAssetsData.js +1 -1
- package/lib/dada-client/hooks/useAssetsData.js.map +1 -0
- package/lib/dada-client/hooks/useInterestRatesByCurrencies.d.ts.map +1 -0
- package/lib/{modularDrawer → dada-client}/hooks/useInterestRatesByCurrencies.js +3 -3
- package/lib/dada-client/hooks/useInterestRatesByCurrencies.js.map +1 -0
- package/lib/dada-client/hooks/useMarketByCurrencies.d.ts.map +1 -0
- package/lib/{modularDrawer → dada-client}/hooks/useMarketByCurrencies.js +5 -6
- package/lib/dada-client/hooks/useMarketByCurrencies.js.map +1 -0
- package/lib/{modularDrawer/data → dada-client}/state-manager/api.d.ts +134 -1
- package/lib/{modularDrawer/data → dada-client}/state-manager/api.d.ts.map +1 -1
- package/lib/{modularDrawer/data → dada-client}/state-manager/api.js +21 -2
- package/lib/dada-client/state-manager/api.js.map +1 -0
- package/lib/dada-client/state-manager/types.d.ts.map +1 -0
- package/lib/dada-client/state-manager/types.js.map +1 -0
- package/lib/dada-client/types/trend.d.ts +2 -0
- package/lib/dada-client/types/trend.d.ts.map +1 -0
- package/lib/dada-client/types/trend.js +3 -0
- package/lib/dada-client/types/trend.js.map +1 -0
- package/lib/deposit/useGroupedCurrenciesByProvider.hook.d.ts.map +1 -1
- package/lib/deposit/useGroupedCurrenciesByProvider.hook.js +6 -1
- package/lib/deposit/useGroupedCurrenciesByProvider.hook.js.map +1 -1
- package/lib/e2e/enum/Account.d.ts +2 -0
- package/lib/e2e/enum/Account.d.ts.map +1 -1
- package/lib/e2e/enum/Account.js +4 -0
- package/lib/e2e/enum/Account.js.map +1 -1
- package/lib/e2e/enum/AppInfos.d.ts +1 -0
- package/lib/e2e/enum/AppInfos.d.ts.map +1 -1
- package/lib/e2e/enum/AppInfos.js +1 -0
- package/lib/e2e/enum/AppInfos.js.map +1 -1
- package/lib/e2e/enum/Currency.d.ts +2 -0
- package/lib/e2e/enum/Currency.d.ts.map +1 -1
- package/lib/e2e/enum/Currency.js +4 -0
- package/lib/e2e/enum/Currency.js.map +1 -1
- package/lib/e2e/enum/Network.d.ts +2 -1
- package/lib/e2e/enum/Network.d.ts.map +1 -1
- package/lib/e2e/enum/Network.js +1 -0
- package/lib/e2e/enum/Network.js.map +1 -1
- package/lib/e2e/enum/Provider.d.ts +1 -0
- package/lib/e2e/enum/Provider.d.ts.map +1 -1
- package/lib/e2e/enum/Provider.js +1 -0
- package/lib/e2e/enum/Provider.js.map +1 -1
- package/lib/e2e/families/hedera.d.ts +2 -0
- package/lib/e2e/families/hedera.d.ts.map +1 -0
- package/lib/e2e/families/hedera.js +11 -0
- package/lib/e2e/families/hedera.js.map +1 -0
- package/lib/e2e/speculos.d.ts.map +1 -1
- package/lib/e2e/speculos.js +12 -0
- package/lib/e2e/speculos.js.map +1 -1
- package/lib/e2e/swap.d.ts +1 -1
- package/lib/e2e/swap.d.ts.map +1 -1
- package/lib/e2e/swap.js +6 -5
- package/lib/e2e/swap.js.map +1 -1
- package/lib/exchange/platform/types.d.ts +2 -0
- package/lib/exchange/platform/types.d.ts.map +1 -1
- package/lib/exchange/swap/completeExchange.d.ts.map +1 -1
- package/lib/exchange/swap/completeExchange.js +22 -1
- package/lib/exchange/swap/completeExchange.js.map +1 -1
- package/lib/exchange/swap/getIncompatibleCurrencyKeys.d.ts.map +1 -1
- package/lib/exchange/swap/getIncompatibleCurrencyKeys.js +8 -0
- package/lib/exchange/swap/getIncompatibleCurrencyKeys.js.map +1 -1
- package/lib/exchange/swap/postSwapState.d.ts.map +1 -1
- package/lib/exchange/swap/postSwapState.js +19 -23
- package/lib/exchange/swap/postSwapState.js.map +1 -1
- package/lib/exchange/swap/setBroadcastTransaction.d.ts +4 -4
- package/lib/exchange/swap/setBroadcastTransaction.js +7 -7
- package/lib/exchange/swap/setBroadcastTransaction.js.map +1 -1
- package/lib/exchange/swap/types.d.ts +3 -3
- package/lib/exchange/swap/types.d.ts.map +1 -1
- package/lib/exchange/swap/updateAccountSwapStatus.d.ts.map +1 -1
- package/lib/exchange/swap/updateAccountSwapStatus.js +6 -4
- package/lib/exchange/swap/updateAccountSwapStatus.js.map +1 -1
- package/lib/families/canton/config.js +10 -10
- package/lib/families/canton/config.js.map +1 -1
- package/lib/families/evm/shouldUseReceiveOptions.d.ts +3 -0
- package/lib/families/evm/shouldUseReceiveOptions.d.ts.map +1 -0
- package/lib/families/evm/shouldUseReceiveOptions.js +5 -0
- package/lib/families/evm/shouldUseReceiveOptions.js.map +1 -0
- package/lib/families/evm/shouldUseReceiveOptions.test.d.ts +2 -0
- package/lib/families/evm/shouldUseReceiveOptions.test.d.ts.map +1 -0
- package/lib/families/evm/shouldUseReceiveOptions.test.js +26 -0
- package/lib/families/evm/shouldUseReceiveOptions.test.js.map +1 -0
- package/lib/families/hedera/exchange.d.ts +9 -0
- package/lib/families/hedera/exchange.d.ts.map +1 -0
- package/lib/families/hedera/exchange.js +36 -0
- package/lib/families/hedera/exchange.js.map +1 -0
- package/lib/families/tezos/config.js +2 -2
- package/lib/families/tezos/react.d.ts +2 -1
- package/lib/families/tezos/react.d.ts.map +1 -1
- package/lib/families/tezos/react.js +19 -1
- package/lib/families/tezos/react.js.map +1 -1
- package/lib/families/tezos/setup.d.ts +1 -4
- package/lib/families/tezos/setup.d.ts.map +1 -1
- package/lib/families/tezos/setup.js +3 -11
- package/lib/families/tezos/setup.js.map +1 -1
- package/lib/generated/bridge/js.d.ts +0 -1
- package/lib/generated/bridge/js.d.ts.map +1 -1
- package/lib/generated/bridge/js.js +10 -12
- package/lib/generated/bridge/js.js.map +1 -1
- package/lib/hw/actions/completeExchange.d.ts +2 -0
- package/lib/hw/actions/completeExchange.d.ts.map +1 -1
- package/lib/hw/actions/completeExchange.js +1 -0
- package/lib/hw/actions/completeExchange.js.map +1 -1
- package/lib/hw/signMessage/index.d.ts.map +1 -1
- package/lib/hw/signMessage/index.js +7 -0
- package/lib/hw/signMessage/index.js.map +1 -1
- package/lib/modularDrawer/hooks/modules/useLeftApyModule.d.ts +1 -1
- package/lib/modularDrawer/hooks/modules/useLeftApyModule.d.ts.map +1 -1
- package/lib/modularDrawer/hooks/modules/useLeftApyModule.js +1 -1
- package/lib/modularDrawer/hooks/modules/useLeftApyModule.js.map +1 -1
- package/lib/modularDrawer/hooks/modules/useLeftMarketTrendModule.js +1 -1
- package/lib/modularDrawer/hooks/modules/useLeftMarketTrendModule.js.map +1 -1
- package/lib/modularDrawer/hooks/modules/useRightMarketTrendModule.js +6 -3
- package/lib/modularDrawer/hooks/modules/useRightMarketTrendModule.js.map +1 -1
- package/lib/modularDrawer/hooks/useAssetAccountCounts.d.ts.map +1 -1
- package/lib/modularDrawer/hooks/useAssetAccountCounts.js +2 -4
- package/lib/modularDrawer/hooks/useAssetAccountCounts.js.map +1 -1
- package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.d.ts +7 -0
- package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.d.ts.map +1 -0
- package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js +224 -0
- package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js.map +1 -0
- package/lib/modularDrawer/hooks/useLeftAccountsApy.js +1 -1
- package/lib/modularDrawer/hooks/useLeftAccountsApy.js.map +1 -1
- package/lib/modularDrawer/hooks/useRightBalanceAsset.d.ts +8 -10
- package/lib/modularDrawer/hooks/useRightBalanceAsset.d.ts.map +1 -1
- package/lib/modularDrawer/hooks/useRightBalanceAsset.js +21 -64
- package/lib/modularDrawer/hooks/useRightBalanceAsset.js.map +1 -1
- package/lib/modularDrawer/hooks/useRightBalanceNetwork.d.ts +7 -28
- package/lib/modularDrawer/hooks/useRightBalanceNetwork.d.ts.map +1 -1
- package/lib/modularDrawer/hooks/useRightBalanceNetwork.js +12 -56
- package/lib/modularDrawer/hooks/useRightBalanceNetwork.js.map +1 -1
- package/lib/modularDrawer/modules/createAssetConfiguration.d.ts.map +1 -1
- package/lib/modularDrawer/modules/createAssetConfiguration.js +2 -2
- package/lib/modularDrawer/modules/createAssetConfiguration.js.map +1 -1
- package/lib/modularDrawer/modules/createNetworkConfiguration.d.ts +1 -1
- package/lib/modularDrawer/modules/createNetworkConfiguration.d.ts.map +1 -1
- package/lib/modularDrawer/modules/createNetworkConfiguration.js +15 -4
- package/lib/modularDrawer/modules/createNetworkConfiguration.js.map +1 -1
- package/lib/modularDrawer/utils/__tests__/calculateProviderTotal.test.d.ts +2 -0
- package/lib/modularDrawer/utils/__tests__/calculateProviderTotal.test.d.ts.map +1 -0
- package/lib/modularDrawer/utils/__tests__/calculateProviderTotal.test.js +212 -0
- package/lib/modularDrawer/utils/__tests__/calculateProviderTotal.test.js.map +1 -0
- package/lib/modularDrawer/utils/__tests__/groupAccountsByAsset.test.d.ts +2 -0
- package/lib/modularDrawer/utils/__tests__/groupAccountsByAsset.test.d.ts.map +1 -0
- package/lib/modularDrawer/utils/__tests__/groupAccountsByAsset.test.js +202 -0
- package/lib/modularDrawer/utils/__tests__/groupAccountsByAsset.test.js.map +1 -0
- package/lib/modularDrawer/utils/calculateProviderTotal.d.ts +1 -0
- package/lib/modularDrawer/utils/calculateProviderTotal.d.ts.map +1 -1
- package/lib/modularDrawer/utils/calculateProviderTotal.js +10 -2
- package/lib/modularDrawer/utils/calculateProviderTotal.js.map +1 -1
- package/lib/modularDrawer/utils/currencyUtils.d.ts.map +1 -1
- package/lib/modularDrawer/utils/currencyUtils.js.map +1 -1
- package/lib/modularDrawer/utils/getBalanceAndFiatValueByAssets.d.ts +6 -4
- package/lib/modularDrawer/utils/getBalanceAndFiatValueByAssets.d.ts.map +1 -1
- package/lib/modularDrawer/utils/getBalanceAndFiatValueByAssets.js +9 -22
- package/lib/modularDrawer/utils/getBalanceAndFiatValueByAssets.js.map +1 -1
- package/lib/modularDrawer/utils/getInterestRateForAsset.d.ts +1 -1
- package/lib/modularDrawer/utils/getInterestRateForAsset.d.ts.map +1 -1
- package/lib/modularDrawer/utils/groupAccountsByAsset.d.ts +4 -3
- package/lib/modularDrawer/utils/groupAccountsByAsset.d.ts.map +1 -1
- package/lib/modularDrawer/utils/groupAccountsByAsset.js +27 -11
- package/lib/modularDrawer/utils/groupAccountsByAsset.js.map +1 -1
- package/lib/modularDrawer/utils/index.d.ts +2 -6
- package/lib/modularDrawer/utils/index.d.ts.map +1 -1
- package/lib/modularDrawer/utils/index.js +2 -13
- package/lib/modularDrawer/utils/index.js.map +1 -1
- package/lib/modularDrawer/utils/index.test.js +0 -26
- package/lib/modularDrawer/utils/index.test.js.map +1 -1
- package/lib/modularDrawer/utils/sortByBalance.d.ts +1 -3
- package/lib/modularDrawer/utils/sortByBalance.d.ts.map +1 -1
- package/lib/modularDrawer/utils/sortByBalance.js +6 -18
- package/lib/modularDrawer/utils/sortByBalance.js.map +1 -1
- package/lib/modularDrawer/utils/type.d.ts +15 -17
- package/lib/modularDrawer/utils/type.d.ts.map +1 -1
- package/lib/wallet-api/CustomDeeplink/server.d.ts +16 -0
- package/lib/wallet-api/CustomDeeplink/server.d.ts.map +1 -0
- package/lib/wallet-api/CustomDeeplink/server.js +10 -0
- package/lib/wallet-api/CustomDeeplink/server.js.map +1 -0
- package/lib/wallet-api/Exchange/server.js +6 -6
- package/lib/wallet-api/Exchange/server.js.map +1 -1
- package/lib/wallet-api/constants.d.ts +1 -1
- package/lib/wallet-api/constants.d.ts.map +1 -1
- package/lib-es/__tests__/test-helpers/bridge.js +1 -1
- package/lib-es/__tests__/test-helpers/bridge.js.map +1 -1
- package/lib-es/__tests__/test-helpers/environment.js +1 -1
- package/lib-es/__tests__/test-helpers/environment.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 +3 -0
- package/lib-es/bridge/generic-alpaca/alpaca/index.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/buildSubAccounts.d.ts +4 -4
- package/lib-es/bridge/generic-alpaca/buildSubAccounts.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/buildSubAccounts.js +7 -9
- package/lib-es/bridge/generic-alpaca/buildSubAccounts.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/createTransaction.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/createTransaction.js +11 -0
- package/lib-es/bridge/generic-alpaca/createTransaction.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/getAccountShape.js +15 -9
- package/lib-es/bridge/generic-alpaca/getAccountShape.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/getTransactionStatus.js +1 -1
- 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 +29 -4
- package/lib-es/bridge/generic-alpaca/prepareTransaction.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/signer/index.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/signer/index.js +38 -1
- package/lib-es/bridge/generic-alpaca/signer/index.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/signer/signTransaction.d.ts +2 -0
- package/lib-es/bridge/generic-alpaca/signer/signTransaction.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/signer/signTransaction.js +6 -0
- package/lib-es/bridge/generic-alpaca/signer/signTransaction.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/tests/estimateMaxSpendable.test.js +15 -1
- package/lib-es/bridge/generic-alpaca/tests/estimateMaxSpendable.test.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/tests/getAccountShape.test.js +5 -3
- package/lib-es/bridge/generic-alpaca/tests/getAccountShape.test.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/tests/prepareTransaction.test.js +60 -0
- package/lib-es/bridge/generic-alpaca/tests/prepareTransaction.test.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/tests/signOperation.test.js +1 -1
- package/lib-es/bridge/generic-alpaca/tests/signOperation.test.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/types.d.ts +1 -2
- package/lib-es/bridge/generic-alpaca/types.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/utils.d.ts +2 -2
- package/lib-es/bridge/generic-alpaca/utils.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/utils.js +23 -4
- package/lib-es/bridge/generic-alpaca/utils.js.map +1 -1
- package/lib-es/bridge/impl.d.ts.map +1 -1
- package/lib-es/bridge/impl.js +1 -0
- package/lib-es/bridge/impl.js.map +1 -1
- package/lib-es/dada-client/entities/index.d.ts.map +1 -0
- package/lib-es/dada-client/entities/index.js.map +1 -0
- package/lib-es/{modularDrawer/data → dada-client}/entities/interestRateSelectors.d.ts +1 -1
- package/lib-es/dada-client/entities/interestRateSelectors.d.ts.map +1 -0
- package/lib-es/dada-client/entities/interestRateSelectors.js.map +1 -0
- package/lib-es/{modularDrawer/data → dada-client}/entities/marketSelectors.d.ts +1 -1
- package/lib-es/dada-client/entities/marketSelectors.d.ts.map +1 -0
- package/lib-es/dada-client/entities/marketSelectors.js.map +1 -0
- package/lib-es/dada-client/entities/selectorUtils.d.ts.map +1 -0
- package/lib-es/dada-client/entities/selectorUtils.js.map +1 -0
- package/lib-es/dada-client/hooks/__tests__/useAssetsData.test.d.ts.map +1 -0
- package/lib-es/{modularDrawer/hooks/__test__ → dada-client/hooks/__tests__}/useAssetsData.test.js +2 -2
- package/lib-es/dada-client/hooks/__tests__/useAssetsData.test.js.map +1 -0
- package/lib-es/dada-client/hooks/useAssetData.d.ts +10 -0
- package/lib-es/dada-client/hooks/useAssetData.d.ts.map +1 -0
- package/lib-es/dada-client/hooks/useAssetData.js +19 -0
- package/lib-es/dada-client/hooks/useAssetData.js.map +1 -0
- package/lib-es/dada-client/hooks/useAssetsData.d.ts +19 -0
- package/lib-es/dada-client/hooks/useAssetsData.d.ts.map +1 -0
- package/lib-es/{modularDrawer → dada-client}/hooks/useAssetsData.js +1 -1
- package/lib-es/dada-client/hooks/useAssetsData.js.map +1 -0
- package/lib-es/dada-client/hooks/useInterestRatesByCurrencies.d.ts.map +1 -0
- package/lib-es/{modularDrawer → dada-client}/hooks/useInterestRatesByCurrencies.js +3 -3
- package/lib-es/dada-client/hooks/useInterestRatesByCurrencies.js.map +1 -0
- package/lib-es/dada-client/hooks/useMarketByCurrencies.d.ts.map +1 -0
- package/lib-es/{modularDrawer → dada-client}/hooks/useMarketByCurrencies.js +5 -6
- package/lib-es/dada-client/hooks/useMarketByCurrencies.js.map +1 -0
- package/lib-es/{modularDrawer/data → dada-client}/state-manager/api.d.ts +134 -1
- package/lib-es/{modularDrawer/data → dada-client}/state-manager/api.d.ts.map +1 -1
- package/lib-es/{modularDrawer/data → dada-client}/state-manager/api.js +20 -1
- package/lib-es/dada-client/state-manager/api.js.map +1 -0
- package/lib-es/dada-client/state-manager/types.d.ts.map +1 -0
- package/lib-es/dada-client/state-manager/types.js.map +1 -0
- package/lib-es/dada-client/types/trend.d.ts +2 -0
- package/lib-es/dada-client/types/trend.d.ts.map +1 -0
- package/lib-es/dada-client/types/trend.js +2 -0
- package/lib-es/dada-client/types/trend.js.map +1 -0
- package/lib-es/deposit/useGroupedCurrenciesByProvider.hook.d.ts.map +1 -1
- package/lib-es/deposit/useGroupedCurrenciesByProvider.hook.js +6 -1
- package/lib-es/deposit/useGroupedCurrenciesByProvider.hook.js.map +1 -1
- package/lib-es/e2e/enum/Account.d.ts +2 -0
- package/lib-es/e2e/enum/Account.d.ts.map +1 -1
- package/lib-es/e2e/enum/Account.js +4 -0
- package/lib-es/e2e/enum/Account.js.map +1 -1
- package/lib-es/e2e/enum/AppInfos.d.ts +1 -0
- package/lib-es/e2e/enum/AppInfos.d.ts.map +1 -1
- package/lib-es/e2e/enum/AppInfos.js +1 -0
- package/lib-es/e2e/enum/AppInfos.js.map +1 -1
- package/lib-es/e2e/enum/Currency.d.ts +2 -0
- package/lib-es/e2e/enum/Currency.d.ts.map +1 -1
- package/lib-es/e2e/enum/Currency.js +4 -0
- package/lib-es/e2e/enum/Currency.js.map +1 -1
- package/lib-es/e2e/enum/Network.d.ts +2 -1
- package/lib-es/e2e/enum/Network.d.ts.map +1 -1
- package/lib-es/e2e/enum/Network.js +1 -0
- package/lib-es/e2e/enum/Network.js.map +1 -1
- package/lib-es/e2e/enum/Provider.d.ts +1 -0
- package/lib-es/e2e/enum/Provider.d.ts.map +1 -1
- package/lib-es/e2e/enum/Provider.js +1 -0
- package/lib-es/e2e/enum/Provider.js.map +1 -1
- package/lib-es/e2e/families/hedera.d.ts +2 -0
- package/lib-es/e2e/families/hedera.d.ts.map +1 -0
- package/lib-es/e2e/families/hedera.js +7 -0
- package/lib-es/e2e/families/hedera.js.map +1 -0
- package/lib-es/e2e/speculos.d.ts.map +1 -1
- package/lib-es/e2e/speculos.js +12 -0
- package/lib-es/e2e/speculos.js.map +1 -1
- package/lib-es/e2e/swap.d.ts +1 -1
- package/lib-es/e2e/swap.d.ts.map +1 -1
- package/lib-es/e2e/swap.js +6 -5
- package/lib-es/e2e/swap.js.map +1 -1
- package/lib-es/exchange/platform/types.d.ts +2 -0
- package/lib-es/exchange/platform/types.d.ts.map +1 -1
- package/lib-es/exchange/swap/completeExchange.d.ts.map +1 -1
- package/lib-es/exchange/swap/completeExchange.js +22 -1
- package/lib-es/exchange/swap/completeExchange.js.map +1 -1
- package/lib-es/exchange/swap/getIncompatibleCurrencyKeys.d.ts.map +1 -1
- package/lib-es/exchange/swap/getIncompatibleCurrencyKeys.js +8 -0
- package/lib-es/exchange/swap/getIncompatibleCurrencyKeys.js.map +1 -1
- package/lib-es/exchange/swap/postSwapState.d.ts.map +1 -1
- package/lib-es/exchange/swap/postSwapState.js +19 -23
- package/lib-es/exchange/swap/postSwapState.js.map +1 -1
- package/lib-es/exchange/swap/setBroadcastTransaction.d.ts +4 -4
- package/lib-es/exchange/swap/setBroadcastTransaction.js +7 -7
- package/lib-es/exchange/swap/setBroadcastTransaction.js.map +1 -1
- package/lib-es/exchange/swap/types.d.ts +3 -3
- package/lib-es/exchange/swap/types.d.ts.map +1 -1
- package/lib-es/exchange/swap/updateAccountSwapStatus.d.ts.map +1 -1
- package/lib-es/exchange/swap/updateAccountSwapStatus.js +6 -4
- package/lib-es/exchange/swap/updateAccountSwapStatus.js.map +1 -1
- package/lib-es/families/canton/config.js +10 -10
- package/lib-es/families/canton/config.js.map +1 -1
- package/lib-es/families/evm/shouldUseReceiveOptions.d.ts +3 -0
- package/lib-es/families/evm/shouldUseReceiveOptions.d.ts.map +1 -0
- package/lib-es/families/evm/shouldUseReceiveOptions.js +3 -0
- package/lib-es/families/evm/shouldUseReceiveOptions.js.map +1 -0
- package/lib-es/families/evm/shouldUseReceiveOptions.test.d.ts +2 -0
- package/lib-es/families/evm/shouldUseReceiveOptions.test.d.ts.map +1 -0
- package/lib-es/families/evm/shouldUseReceiveOptions.test.js +21 -0
- package/lib-es/families/evm/shouldUseReceiveOptions.test.js.map +1 -0
- package/lib-es/families/hedera/exchange.d.ts +9 -0
- package/lib-es/families/hedera/exchange.d.ts.map +1 -0
- package/lib-es/families/hedera/exchange.js +29 -0
- package/lib-es/families/hedera/exchange.js.map +1 -0
- package/lib-es/families/tezos/config.js +2 -2
- package/lib-es/families/tezos/react.d.ts +2 -1
- package/lib-es/families/tezos/react.d.ts.map +1 -1
- package/lib-es/families/tezos/react.js +17 -0
- package/lib-es/families/tezos/react.js.map +1 -1
- package/lib-es/families/tezos/setup.d.ts +1 -4
- package/lib-es/families/tezos/setup.d.ts.map +1 -1
- package/lib-es/families/tezos/setup.js +2 -9
- package/lib-es/families/tezos/setup.js.map +1 -1
- package/lib-es/generated/bridge/js.d.ts +0 -1
- package/lib-es/generated/bridge/js.d.ts.map +1 -1
- package/lib-es/generated/bridge/js.js +0 -2
- package/lib-es/generated/bridge/js.js.map +1 -1
- package/lib-es/hw/actions/completeExchange.d.ts +2 -0
- package/lib-es/hw/actions/completeExchange.d.ts.map +1 -1
- package/lib-es/hw/actions/completeExchange.js +1 -0
- package/lib-es/hw/actions/completeExchange.js.map +1 -1
- package/lib-es/hw/signMessage/index.d.ts.map +1 -1
- package/lib-es/hw/signMessage/index.js +7 -0
- package/lib-es/hw/signMessage/index.js.map +1 -1
- package/lib-es/modularDrawer/hooks/modules/useLeftApyModule.d.ts +1 -1
- package/lib-es/modularDrawer/hooks/modules/useLeftApyModule.d.ts.map +1 -1
- package/lib-es/modularDrawer/hooks/modules/useLeftApyModule.js +1 -1
- package/lib-es/modularDrawer/hooks/modules/useLeftApyModule.js.map +1 -1
- package/lib-es/modularDrawer/hooks/modules/useLeftMarketTrendModule.js +1 -1
- package/lib-es/modularDrawer/hooks/modules/useLeftMarketTrendModule.js.map +1 -1
- package/lib-es/modularDrawer/hooks/modules/useRightMarketTrendModule.js +2 -2
- package/lib-es/modularDrawer/hooks/modules/useRightMarketTrendModule.js.map +1 -1
- package/lib-es/modularDrawer/hooks/useAssetAccountCounts.d.ts.map +1 -1
- package/lib-es/modularDrawer/hooks/useAssetAccountCounts.js +2 -4
- package/lib-es/modularDrawer/hooks/useAssetAccountCounts.js.map +1 -1
- package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.d.ts +7 -0
- package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.d.ts.map +1 -0
- package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js +217 -0
- package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js.map +1 -0
- package/lib-es/modularDrawer/hooks/useLeftAccountsApy.js +1 -1
- package/lib-es/modularDrawer/hooks/useLeftAccountsApy.js.map +1 -1
- package/lib-es/modularDrawer/hooks/useRightBalanceAsset.d.ts +8 -10
- package/lib-es/modularDrawer/hooks/useRightBalanceAsset.d.ts.map +1 -1
- package/lib-es/modularDrawer/hooks/useRightBalanceAsset.js +21 -64
- package/lib-es/modularDrawer/hooks/useRightBalanceAsset.js.map +1 -1
- package/lib-es/modularDrawer/hooks/useRightBalanceNetwork.d.ts +7 -28
- package/lib-es/modularDrawer/hooks/useRightBalanceNetwork.d.ts.map +1 -1
- package/lib-es/modularDrawer/hooks/useRightBalanceNetwork.js +12 -56
- package/lib-es/modularDrawer/hooks/useRightBalanceNetwork.js.map +1 -1
- package/lib-es/modularDrawer/modules/createAssetConfiguration.d.ts.map +1 -1
- package/lib-es/modularDrawer/modules/createAssetConfiguration.js +2 -2
- package/lib-es/modularDrawer/modules/createAssetConfiguration.js.map +1 -1
- package/lib-es/modularDrawer/modules/createNetworkConfiguration.d.ts +1 -1
- package/lib-es/modularDrawer/modules/createNetworkConfiguration.d.ts.map +1 -1
- package/lib-es/modularDrawer/modules/createNetworkConfiguration.js +15 -4
- package/lib-es/modularDrawer/modules/createNetworkConfiguration.js.map +1 -1
- package/lib-es/modularDrawer/utils/__tests__/calculateProviderTotal.test.d.ts +2 -0
- package/lib-es/modularDrawer/utils/__tests__/calculateProviderTotal.test.d.ts.map +1 -0
- package/lib-es/modularDrawer/utils/__tests__/calculateProviderTotal.test.js +207 -0
- package/lib-es/modularDrawer/utils/__tests__/calculateProviderTotal.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__/groupAccountsByAsset.test.d.ts +2 -0
- package/lib-es/modularDrawer/utils/__tests__/groupAccountsByAsset.test.d.ts.map +1 -0
- package/lib-es/modularDrawer/utils/__tests__/groupAccountsByAsset.test.js +197 -0
- package/lib-es/modularDrawer/utils/__tests__/groupAccountsByAsset.test.js.map +1 -0
- package/lib-es/modularDrawer/utils/calculateProviderTotal.d.ts +1 -0
- package/lib-es/modularDrawer/utils/calculateProviderTotal.d.ts.map +1 -1
- package/lib-es/modularDrawer/utils/calculateProviderTotal.js +10 -2
- package/lib-es/modularDrawer/utils/calculateProviderTotal.js.map +1 -1
- package/lib-es/modularDrawer/utils/currencyUtils.d.ts.map +1 -1
- package/lib-es/modularDrawer/utils/currencyUtils.js.map +1 -1
- package/lib-es/modularDrawer/utils/getBalanceAndFiatValueByAssets.d.ts +6 -4
- package/lib-es/modularDrawer/utils/getBalanceAndFiatValueByAssets.d.ts.map +1 -1
- package/lib-es/modularDrawer/utils/getBalanceAndFiatValueByAssets.js +9 -22
- package/lib-es/modularDrawer/utils/getBalanceAndFiatValueByAssets.js.map +1 -1
- package/lib-es/modularDrawer/utils/getInterestRateForAsset.d.ts +1 -1
- package/lib-es/modularDrawer/utils/getInterestRateForAsset.d.ts.map +1 -1
- package/lib-es/modularDrawer/utils/groupAccountsByAsset.d.ts +4 -3
- package/lib-es/modularDrawer/utils/groupAccountsByAsset.d.ts.map +1 -1
- package/lib-es/modularDrawer/utils/groupAccountsByAsset.js +27 -11
- package/lib-es/modularDrawer/utils/groupAccountsByAsset.js.map +1 -1
- package/lib-es/modularDrawer/utils/index.d.ts +2 -6
- package/lib-es/modularDrawer/utils/index.d.ts.map +1 -1
- package/lib-es/modularDrawer/utils/index.js +2 -10
- package/lib-es/modularDrawer/utils/index.js.map +1 -1
- package/lib-es/modularDrawer/utils/index.test.js +1 -27
- package/lib-es/modularDrawer/utils/index.test.js.map +1 -1
- package/lib-es/modularDrawer/utils/sortByBalance.d.ts +1 -3
- package/lib-es/modularDrawer/utils/sortByBalance.d.ts.map +1 -1
- package/lib-es/modularDrawer/utils/sortByBalance.js +5 -15
- package/lib-es/modularDrawer/utils/sortByBalance.js.map +1 -1
- package/lib-es/modularDrawer/utils/type.d.ts +15 -17
- package/lib-es/modularDrawer/utils/type.d.ts.map +1 -1
- package/lib-es/wallet-api/CustomDeeplink/server.d.ts +16 -0
- package/lib-es/wallet-api/CustomDeeplink/server.d.ts.map +1 -0
- package/lib-es/wallet-api/CustomDeeplink/server.js +6 -0
- package/lib-es/wallet-api/CustomDeeplink/server.js.map +1 -0
- package/lib-es/wallet-api/Exchange/server.js +6 -6
- package/lib-es/wallet-api/Exchange/server.js.map +1 -1
- package/lib-es/wallet-api/constants.d.ts +1 -1
- package/lib-es/wallet-api/constants.d.ts.map +1 -1
- package/package.json +11 -9
- package/src/__tests__/test-helpers/bridge.ts +1 -1
- package/src/__tests__/test-helpers/environment.ts +1 -1
- package/src/bridge/generic-alpaca/alpaca/index.ts +4 -0
- package/src/bridge/generic-alpaca/buildSubAccounts.ts +28 -28
- package/src/bridge/generic-alpaca/createTransaction.ts +11 -0
- package/src/bridge/generic-alpaca/getAccountShape.ts +22 -15
- package/src/bridge/generic-alpaca/getTransactionStatus.ts +1 -1
- package/src/bridge/generic-alpaca/prepareTransaction.ts +47 -5
- package/src/bridge/generic-alpaca/signer/index.ts +44 -1
- package/src/bridge/generic-alpaca/signer/signTransaction.ts +10 -0
- package/src/bridge/generic-alpaca/tests/estimateMaxSpendable.test.ts +15 -1
- package/src/bridge/generic-alpaca/tests/getAccountShape.test.ts +5 -3
- package/src/bridge/generic-alpaca/tests/prepareTransaction.test.ts +78 -0
- package/src/bridge/generic-alpaca/tests/signOperation.test.ts +1 -1
- package/src/bridge/generic-alpaca/types.ts +10 -2
- package/src/bridge/generic-alpaca/utils.ts +25 -6
- package/src/bridge/impl.ts +1 -0
- package/src/dada-client/README.md +93 -0
- package/src/{modularDrawer/data → dada-client}/entities/interestRateSelectors.ts +1 -1
- package/src/{modularDrawer/data → dada-client}/entities/marketSelectors.ts +1 -1
- package/src/{modularDrawer/hooks/__test__ → dada-client/hooks/__tests__}/useAssetsData.test.ts +2 -2
- package/src/dada-client/hooks/useAssetData.ts +22 -0
- package/src/{modularDrawer → dada-client}/hooks/useAssetsData.ts +2 -2
- package/src/{modularDrawer → dada-client}/hooks/useInterestRatesByCurrencies.ts +4 -4
- package/src/{modularDrawer → dada-client}/hooks/useMarketByCurrencies.ts +5 -6
- package/src/{modularDrawer/data → dada-client}/state-manager/api.ts +22 -1
- package/src/dada-client/types/trend.ts +1 -0
- package/src/deposit/useGroupedCurrenciesByProvider.hook.ts +8 -2
- package/src/e2e/enum/Account.ts +10 -0
- package/src/e2e/enum/AppInfos.ts +2 -0
- package/src/e2e/enum/Currency.ts +11 -0
- package/src/e2e/enum/Network.ts +1 -0
- package/src/e2e/enum/Provider.ts +1 -0
- package/src/e2e/families/hedera.ts +7 -0
- package/src/e2e/speculos.ts +12 -0
- package/src/e2e/swap.ts +6 -6
- package/src/exchange/platform/types.ts +2 -0
- package/src/exchange/swap/completeExchange.ts +32 -2
- package/src/exchange/swap/getIncompatibleCurrencyKeys.ts +8 -0
- package/src/exchange/swap/postSwapState.ts +28 -32
- package/src/exchange/swap/setBroadcastTransaction.ts +12 -12
- package/src/exchange/swap/types.ts +3 -3
- package/src/exchange/swap/updateAccountSwapStatus.ts +8 -6
- package/src/families/canton/config.ts +10 -10
- package/src/families/evm/shouldUseReceiveOptions.test.ts +25 -0
- package/src/families/evm/shouldUseReceiveOptions.ts +4 -0
- package/src/families/hedera/exchange.ts +48 -0
- package/src/families/tezos/config.ts +2 -2
- package/src/families/tezos/react.ts +20 -1
- package/src/families/tezos/setup.ts +3 -22
- package/src/generated/bridge/js.ts +0 -2
- package/src/hw/actions/completeExchange.ts +3 -0
- package/src/hw/signMessage/index.ts +10 -0
- package/src/modularDrawer/hooks/modules/useLeftApyModule.tsx +2 -2
- package/src/modularDrawer/hooks/modules/useLeftMarketTrendModule.tsx +1 -1
- package/src/modularDrawer/hooks/modules/useRightMarketTrendModule.tsx +2 -2
- package/src/modularDrawer/hooks/useAssetAccountCounts.tsx +8 -10
- package/src/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.ts +231 -0
- package/src/modularDrawer/hooks/useLeftAccountsApy.tsx +1 -1
- package/src/modularDrawer/hooks/useRightBalanceAsset.tsx +26 -102
- package/src/modularDrawer/hooks/useRightBalanceNetwork.tsx +19 -100
- package/src/modularDrawer/modules/createAssetConfiguration.ts +3 -11
- package/src/modularDrawer/modules/createNetworkConfiguration.ts +26 -10
- package/src/modularDrawer/utils/__tests__/calculateProviderTotal.test.ts +237 -0
- package/src/modularDrawer/utils/__tests__/currencyUtils.test.ts +1 -1
- package/src/modularDrawer/utils/__tests__/getInterestRateForAsset.test.ts +1 -1
- package/src/modularDrawer/utils/__tests__/groupAccountsByAsset.test.ts +228 -0
- package/src/modularDrawer/utils/calculateProviderTotal.ts +13 -2
- package/src/modularDrawer/utils/currencyUtils.ts +0 -1
- package/src/modularDrawer/utils/getBalanceAndFiatValueByAssets.ts +13 -37
- package/src/modularDrawer/utils/getInterestRateForAsset.ts +1 -1
- package/src/modularDrawer/utils/groupAccountsByAsset.ts +38 -19
- package/src/modularDrawer/utils/index.test.ts +1 -32
- package/src/modularDrawer/utils/index.ts +2 -23
- package/src/modularDrawer/utils/sortByBalance.tsx +5 -18
- package/src/modularDrawer/utils/type.ts +18 -14
- package/src/wallet-api/CustomDeeplink/server.ts +23 -0
- package/src/wallet-api/Exchange/server.ts +6 -6
- package/lib/modularDrawer/data/entities/index.d.ts.map +0 -1
- package/lib/modularDrawer/data/entities/index.js.map +0 -1
- package/lib/modularDrawer/data/entities/interestRateSelectors.d.ts.map +0 -1
- package/lib/modularDrawer/data/entities/interestRateSelectors.js.map +0 -1
- package/lib/modularDrawer/data/entities/marketSelectors.d.ts.map +0 -1
- package/lib/modularDrawer/data/entities/marketSelectors.js.map +0 -1
- package/lib/modularDrawer/data/entities/selectorUtils.d.ts.map +0 -1
- package/lib/modularDrawer/data/entities/selectorUtils.js.map +0 -1
- package/lib/modularDrawer/data/state-manager/api.js.map +0 -1
- package/lib/modularDrawer/data/state-manager/types.d.ts.map +0 -1
- package/lib/modularDrawer/data/state-manager/types.js.map +0 -1
- package/lib/modularDrawer/hooks/__test__/useAssetsData.test.d.ts.map +0 -1
- package/lib/modularDrawer/hooks/__test__/useAssetsData.test.js.map +0 -1
- package/lib/modularDrawer/hooks/useAssetsData.d.ts +0 -19
- package/lib/modularDrawer/hooks/useAssetsData.d.ts.map +0 -1
- package/lib/modularDrawer/hooks/useAssetsData.js.map +0 -1
- package/lib/modularDrawer/hooks/useInterestRatesByCurrencies.d.ts.map +0 -1
- package/lib/modularDrawer/hooks/useInterestRatesByCurrencies.js.map +0 -1
- package/lib/modularDrawer/hooks/useMarketByCurrencies.d.ts.map +0 -1
- package/lib/modularDrawer/hooks/useMarketByCurrencies.js.map +0 -1
- package/lib/modularDrawer/utils/__tests__/counterValueFormatter.test.d.ts +0 -2
- package/lib/modularDrawer/utils/__tests__/counterValueFormatter.test.d.ts.map +0 -1
- package/lib/modularDrawer/utils/__tests__/counterValueFormatter.test.js +0 -496
- package/lib/modularDrawer/utils/__tests__/counterValueFormatter.test.js.map +0 -1
- package/lib/modularDrawer/utils/__tests__/haveOneCommonProvider.test.d.ts +0 -2
- package/lib/modularDrawer/utils/__tests__/haveOneCommonProvider.test.d.ts.map +0 -1
- package/lib/modularDrawer/utils/__tests__/haveOneCommonProvider.test.js +0 -28
- package/lib/modularDrawer/utils/__tests__/haveOneCommonProvider.test.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/counterValueFormatter.d.ts +0 -14
- package/lib/modularDrawer/utils/counterValueFormatter.d.ts.map +0 -1
- package/lib/modularDrawer/utils/counterValueFormatter.js +0 -107
- package/lib/modularDrawer/utils/counterValueFormatter.js.map +0 -1
- package/lib/modularDrawer/utils/getBalanceAndFiatValue.d.ts +0 -20
- package/lib/modularDrawer/utils/getBalanceAndFiatValue.d.ts.map +0 -1
- package/lib/modularDrawer/utils/getBalanceAndFiatValue.js +0 -39
- package/lib/modularDrawer/utils/getBalanceAndFiatValue.js.map +0 -1
- package/lib/modularDrawer/utils/getProviderCurrency.d.ts +0 -3
- package/lib/modularDrawer/utils/getProviderCurrency.d.ts.map +0 -1
- package/lib/modularDrawer/utils/getProviderCurrency.js +0 -14
- package/lib/modularDrawer/utils/getProviderCurrency.js.map +0 -1
- package/lib/modularDrawer/utils/haveOneCommonProvider.d.ts +0 -11
- package/lib/modularDrawer/utils/haveOneCommonProvider.d.ts.map +0 -1
- package/lib/modularDrawer/utils/haveOneCommonProvider.js +0 -29
- package/lib/modularDrawer/utils/haveOneCommonProvider.js.map +0 -1
- package/lib/modularDrawer/utils/parseToBigNumber.d.ts +0 -9
- package/lib/modularDrawer/utils/parseToBigNumber.d.ts.map +0 -1
- package/lib/modularDrawer/utils/parseToBigNumber.js +0 -24
- package/lib/modularDrawer/utils/parseToBigNumber.js.map +0 -1
- package/lib-es/modularDrawer/data/entities/index.d.ts.map +0 -1
- package/lib-es/modularDrawer/data/entities/index.js.map +0 -1
- package/lib-es/modularDrawer/data/entities/interestRateSelectors.d.ts.map +0 -1
- package/lib-es/modularDrawer/data/entities/interestRateSelectors.js.map +0 -1
- package/lib-es/modularDrawer/data/entities/marketSelectors.d.ts.map +0 -1
- package/lib-es/modularDrawer/data/entities/marketSelectors.js.map +0 -1
- package/lib-es/modularDrawer/data/entities/selectorUtils.d.ts.map +0 -1
- package/lib-es/modularDrawer/data/entities/selectorUtils.js.map +0 -1
- package/lib-es/modularDrawer/data/state-manager/api.js.map +0 -1
- package/lib-es/modularDrawer/data/state-manager/types.d.ts.map +0 -1
- package/lib-es/modularDrawer/data/state-manager/types.js.map +0 -1
- package/lib-es/modularDrawer/hooks/__test__/useAssetsData.test.d.ts.map +0 -1
- package/lib-es/modularDrawer/hooks/__test__/useAssetsData.test.js.map +0 -1
- package/lib-es/modularDrawer/hooks/useAssetsData.d.ts +0 -19
- package/lib-es/modularDrawer/hooks/useAssetsData.d.ts.map +0 -1
- package/lib-es/modularDrawer/hooks/useAssetsData.js.map +0 -1
- package/lib-es/modularDrawer/hooks/useInterestRatesByCurrencies.d.ts.map +0 -1
- package/lib-es/modularDrawer/hooks/useInterestRatesByCurrencies.js.map +0 -1
- package/lib-es/modularDrawer/hooks/useMarketByCurrencies.d.ts.map +0 -1
- package/lib-es/modularDrawer/hooks/useMarketByCurrencies.js.map +0 -1
- package/lib-es/modularDrawer/utils/__tests__/counterValueFormatter.test.d.ts +0 -2
- package/lib-es/modularDrawer/utils/__tests__/counterValueFormatter.test.d.ts.map +0 -1
- package/lib-es/modularDrawer/utils/__tests__/counterValueFormatter.test.js +0 -494
- package/lib-es/modularDrawer/utils/__tests__/counterValueFormatter.test.js.map +0 -1
- package/lib-es/modularDrawer/utils/__tests__/haveOneCommonProvider.test.d.ts +0 -2
- package/lib-es/modularDrawer/utils/__tests__/haveOneCommonProvider.test.d.ts.map +0 -1
- package/lib-es/modularDrawer/utils/__tests__/haveOneCommonProvider.test.js +0 -26
- package/lib-es/modularDrawer/utils/__tests__/haveOneCommonProvider.test.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/counterValueFormatter.d.ts +0 -14
- package/lib-es/modularDrawer/utils/counterValueFormatter.d.ts.map +0 -1
- package/lib-es/modularDrawer/utils/counterValueFormatter.js +0 -103
- package/lib-es/modularDrawer/utils/counterValueFormatter.js.map +0 -1
- package/lib-es/modularDrawer/utils/getBalanceAndFiatValue.d.ts +0 -20
- package/lib-es/modularDrawer/utils/getBalanceAndFiatValue.d.ts.map +0 -1
- package/lib-es/modularDrawer/utils/getBalanceAndFiatValue.js +0 -32
- package/lib-es/modularDrawer/utils/getBalanceAndFiatValue.js.map +0 -1
- package/lib-es/modularDrawer/utils/getProviderCurrency.d.ts +0 -3
- package/lib-es/modularDrawer/utils/getProviderCurrency.d.ts.map +0 -1
- package/lib-es/modularDrawer/utils/getProviderCurrency.js +0 -10
- package/lib-es/modularDrawer/utils/getProviderCurrency.js.map +0 -1
- package/lib-es/modularDrawer/utils/haveOneCommonProvider.d.ts +0 -11
- package/lib-es/modularDrawer/utils/haveOneCommonProvider.d.ts.map +0 -1
- package/lib-es/modularDrawer/utils/haveOneCommonProvider.js +0 -25
- package/lib-es/modularDrawer/utils/haveOneCommonProvider.js.map +0 -1
- package/lib-es/modularDrawer/utils/parseToBigNumber.d.ts +0 -9
- package/lib-es/modularDrawer/utils/parseToBigNumber.d.ts.map +0 -1
- package/lib-es/modularDrawer/utils/parseToBigNumber.js +0 -17
- package/lib-es/modularDrawer/utils/parseToBigNumber.js.map +0 -1
- package/src/modularDrawer/utils/__tests__/counterValueFormatter.test.ts +0 -549
- package/src/modularDrawer/utils/__tests__/haveOneCommonProvider.test.ts +0 -34
- package/src/modularDrawer/utils/buildProviderCurrenciesMap.tsx +0 -25
- package/src/modularDrawer/utils/counterValueFormatter.ts +0 -165
- package/src/modularDrawer/utils/getBalanceAndFiatValue.ts +0 -53
- package/src/modularDrawer/utils/getProviderCurrency.ts +0 -13
- package/src/modularDrawer/utils/haveOneCommonProvider.ts +0 -31
- package/src/modularDrawer/utils/parseToBigNumber.ts +0 -17
- /package/lib/{modularDrawer/data → dada-client}/entities/index.d.ts +0 -0
- /package/lib/{modularDrawer/data → dada-client}/entities/index.js +0 -0
- /package/lib/{modularDrawer/data → dada-client}/entities/interestRateSelectors.js +0 -0
- /package/lib/{modularDrawer/data → dada-client}/entities/marketSelectors.js +0 -0
- /package/lib/{modularDrawer/data → dada-client}/entities/selectorUtils.d.ts +0 -0
- /package/lib/{modularDrawer/data → dada-client}/entities/selectorUtils.js +0 -0
- /package/lib/{modularDrawer/hooks/__test__ → dada-client/hooks/__tests__}/useAssetsData.test.d.ts +0 -0
- /package/lib/{modularDrawer → dada-client}/hooks/useInterestRatesByCurrencies.d.ts +0 -0
- /package/lib/{modularDrawer → dada-client}/hooks/useMarketByCurrencies.d.ts +0 -0
- /package/lib/{modularDrawer/data → dada-client}/state-manager/types.d.ts +0 -0
- /package/lib/{modularDrawer/data → dada-client}/state-manager/types.js +0 -0
- /package/lib-es/{modularDrawer/data → dada-client}/entities/index.d.ts +0 -0
- /package/lib-es/{modularDrawer/data → dada-client}/entities/index.js +0 -0
- /package/lib-es/{modularDrawer/data → dada-client}/entities/interestRateSelectors.js +0 -0
- /package/lib-es/{modularDrawer/data → dada-client}/entities/marketSelectors.js +0 -0
- /package/lib-es/{modularDrawer/data → dada-client}/entities/selectorUtils.d.ts +0 -0
- /package/lib-es/{modularDrawer/data → dada-client}/entities/selectorUtils.js +0 -0
- /package/lib-es/{modularDrawer/hooks/__test__ → dada-client/hooks/__tests__}/useAssetsData.test.d.ts +0 -0
- /package/lib-es/{modularDrawer → dada-client}/hooks/useInterestRatesByCurrencies.d.ts +0 -0
- /package/lib-es/{modularDrawer → dada-client}/hooks/useMarketByCurrencies.d.ts +0 -0
- /package/lib-es/{modularDrawer/data → dada-client}/state-manager/types.d.ts +0 -0
- /package/lib-es/{modularDrawer/data → dada-client}/state-manager/types.js +0 -0
- /package/src/{modularDrawer/data → dada-client}/entities/index.ts +0 -0
- /package/src/{modularDrawer/data → dada-client}/entities/selectorUtils.ts +0 -0
- /package/src/{modularDrawer/data → dada-client}/state-manager/types.ts +0 -0
@@ -1,65 +1,21 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.createUseRightBalanceNetwork = void 0;
|
4
|
-
const react_1 = require("react");
|
5
|
-
const sortByBalance_1 = require("../utils/sortByBalance");
|
6
4
|
const getBalanceAndFiatValueByAssets_1 = require("../utils/getBalanceAndFiatValueByAssets");
|
7
5
|
function createUseRightBalanceNetwork({ useBalanceDeps, balanceItem }) {
|
8
|
-
return function useRightBalanceNetwork({
|
9
|
-
const { flattenedAccounts,
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
? currency.parentCurrency.id === network.id
|
18
|
-
: currency.id === network.id),
|
19
|
-
}));
|
20
|
-
const validAssets = pairs.filter(p => p.asset).map(p => p.asset);
|
21
|
-
const allBalanceData = validAssets.length > 0
|
22
|
-
? (0, getBalanceAndFiatValueByAssets_1.getBalanceAndFiatValueByAssets)(flattenedAccounts, validAssets, state, counterValueCurrency, discreet, locale)
|
23
|
-
: [];
|
24
|
-
const balanceMap = new Map(allBalanceData.map(b => [b.id, b]));
|
25
|
-
const networkWithBalanceData = pairs.map(({ network, asset }) => {
|
26
|
-
const balanceData = asset ? balanceMap.get(asset.id) || {} : {};
|
27
|
-
return {
|
28
|
-
network,
|
29
|
-
balanceData,
|
30
|
-
};
|
31
|
-
});
|
32
|
-
networkWithBalanceData.sort((a, b) => (0, sortByBalance_1.compareByBalanceThenFiat)(a.balanceData, b.balanceData, discreet));
|
33
|
-
return networkWithBalanceData.map(({ network, balanceData }) => ({
|
34
|
-
...network,
|
35
|
-
rightElement: balanceItem(balanceData),
|
36
|
-
}));
|
37
|
-
}
|
38
|
-
}
|
39
|
-
const networkBalanceData = (0, getBalanceAndFiatValueByAssets_1.getBalanceAndFiatValueByAssets)(flattenedAccounts, actualNetworks, state, counterValueCurrency, discreet, locale);
|
40
|
-
const balanceMap = new Map(networkBalanceData.map(b => [b.id, b]));
|
41
|
-
const networksWithBalance = actualNetworks.map(network => {
|
42
|
-
const balanceData = balanceMap.get(network.id) || {};
|
43
|
-
return {
|
44
|
-
network,
|
45
|
-
balanceData,
|
46
|
-
};
|
47
|
-
});
|
48
|
-
networksWithBalance.sort((a, b) => (0, sortByBalance_1.compareByBalanceThenFiat)(a.balanceData, b.balanceData, discreet));
|
49
|
-
return networksWithBalance.map(({ network, balanceData }) => ({
|
50
|
-
...network,
|
6
|
+
return function useRightBalanceNetwork({ networks }) {
|
7
|
+
const { flattenedAccounts, state, counterValueCurrency } = useBalanceDeps();
|
8
|
+
const networkBalanceData = (0, getBalanceAndFiatValueByAssets_1.getBalanceAndFiatValueByAssets)(flattenedAccounts, networks, state, counterValueCurrency);
|
9
|
+
const balanceMap = new Map(networkBalanceData.map(b => [b.id, b]));
|
10
|
+
return networks.map(network => {
|
11
|
+
const balanceData = balanceMap.get(network.id) || {};
|
12
|
+
const details = network.type === "TokenCurrency" ? network.parentCurrency : network;
|
13
|
+
return {
|
14
|
+
...details,
|
51
15
|
rightElement: balanceItem(balanceData),
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
selectedAssetId,
|
56
|
-
currenciesByProvider,
|
57
|
-
flattenedAccounts,
|
58
|
-
state,
|
59
|
-
counterValueCurrency,
|
60
|
-
discreet,
|
61
|
-
locale,
|
62
|
-
]);
|
16
|
+
balanceData: balanceData,
|
17
|
+
};
|
18
|
+
});
|
63
19
|
};
|
64
20
|
}
|
65
21
|
exports.createUseRightBalanceNetwork = createUseRightBalanceNetwork;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useRightBalanceNetwork.js","sourceRoot":"","sources":["../../../src/modularDrawer/hooks/useRightBalanceNetwork.tsx"],"names":[],"mappings":";;;
|
1
|
+
{"version":3,"file":"useRightBalanceNetwork.js","sourceRoot":"","sources":["../../../src/modularDrawer/hooks/useRightBalanceNetwork.tsx"],"names":[],"mappings":";;;AAEA,4FAAyF;AAWzF,SAAgB,4BAA4B,CAAC,EAAE,cAAc,EAAE,WAAW,EAAe;IACvF,OAAO,SAAS,sBAAsB,CAAC,EAAE,QAAQ,EAAU;QACzD,MAAM,EAAE,iBAAiB,EAAE,KAAK,EAAE,oBAAoB,EAAE,GAAG,cAAc,EAAE,CAAC;QAE5E,MAAM,kBAAkB,GAAG,IAAA,+DAA8B,EACvD,iBAAiB,EACjB,QAAQ,EACR,KAAK,EACL,oBAAoB,CACrB,CAAC;QAEF,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAEnE,OAAO,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;YAC5B,MAAM,WAAW,GAAG,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YACrD,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,KAAK,eAAe,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC;YACpF,OAAO;gBACL,GAAG,OAAO;gBACV,YAAY,EAAE,WAAW,CAAC,WAAW,CAAC;gBACtC,WAAW,EAAE,WAAW;aACzB,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAvBD,oEAuBC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"createAssetConfiguration.d.ts","sourceRoot":"","sources":["../../../src/modularDrawer/modules/createAssetConfiguration.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,4BAA4B,EAA0B,MAAM,eAAe,CAAC;
|
1
|
+
{"version":3,"file":"createAssetConfiguration.d.ts","sourceRoot":"","sources":["../../../src/modularDrawer/modules/createAssetConfiguration.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,4BAA4B,EAA0B,MAAM,eAAe,CAAC;AA4ChG,QAAA,MAAM,4BAA4B,EAAE,4BAiBjC,CAAC;AAEJ,eAAe,4BAA4B,CAAC"}
|
@@ -35,14 +35,14 @@ const getLeftElement = (AssetConfigurationDeps) => (leftElement) => {
|
|
35
35
|
return undefined;
|
36
36
|
}
|
37
37
|
};
|
38
|
-
const createAssetConfigurationHook = deps => ({ assetsConfiguration
|
38
|
+
const createAssetConfigurationHook = deps => ({ assetsConfiguration }) => {
|
39
39
|
const { rightElement, leftElement } = assetsConfiguration ?? {};
|
40
40
|
const rightHook = getRightElement(deps)(rightElement);
|
41
41
|
const leftHook = getLeftElement(deps)(leftElement);
|
42
42
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
43
43
|
const hooks = [rightHook, leftHook].filter(Boolean);
|
44
44
|
return (assets) => {
|
45
|
-
const composedHook = (0, composeHooks_1.composeHooks)(...hooks
|
45
|
+
const composedHook = (0, composeHooks_1.composeHooks)(...hooks);
|
46
46
|
return composedHook(assets);
|
47
47
|
};
|
48
48
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"createAssetConfiguration.js","sourceRoot":"","sources":["../../../src/modularDrawer/modules/createAssetConfiguration.ts"],"names":[],"mappings":";;
|
1
|
+
{"version":3,"file":"createAssetConfiguration.js","sourceRoot":"","sources":["../../../src/modularDrawer/modules/createAssetConfiguration.ts"],"names":[],"mappings":";;AAEA,2DAAwD;AACxD,wEAAqE;AACrE,wEAA2E;AAC3E,wFAAqF;AACrF,0FAAuF;AAEvF,MAAM,eAAe,GACnB,CAAC,sBAA8C,EAAE,EAAE,CAAC,CAAC,YAAqB,EAAE,EAAE;IAC5E,QAAQ,YAAY,EAAE;QACpB,KAAK,WAAW;YACd,OAAO,SAAS,CAAC;QACnB,KAAK,aAAa;YAChB,OAAO,CAAC,UAAmC,EAAE,EAAE,CAC7C,IAAA,qDAAyB,EAAC;gBACxB,UAAU;gBACV,cAAc,EAAE,sBAAsB,CAAC,cAAc;gBACrD,oBAAoB,EAAE,sBAAsB,CAAC,oBAAoB;aAClE,CAAC,CAAC;QACP,KAAK,SAAS,CAAC;QACf;YACE,OAAO,IAAA,iDAA0B,EAAC;gBAChC,cAAc,EAAE,sBAAsB,CAAC,cAAc;gBACrD,WAAW,EAAE,sBAAsB,CAAC,WAAW;gBAC/C,SAAS,EAAE,sBAAsB,CA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kConfigurationDeps, LeftElementKind, Network, NetworkHook, RightElementKind } from "../utils/type";
|
3
3
|
export declare const getLeftElement: (NetworkConfigurationDeps: NetworkConfigurationDeps) => (leftElement?: LeftElementKind) => NetworkHook | undefined;
|
4
4
|
export declare const getRightElement: (NetworkConfigurationDeps: NetworkConfigurationDeps) => (rightElement?: RightElementKind) => NetworkHook | undefined;
|
5
|
-
export declare const createNetworkConfigurationHook: (NetworkConfigurationDeps: NetworkConfigurationDeps) => ({ networksConfig,
|
5
|
+
export declare const createNetworkConfigurationHook: (NetworkConfigurationDeps: NetworkConfigurationDeps) => ({ networksConfig, accounts$ }: CreateNetworkConfigurationHookProps) => (assets: CryptoOrTokenCurrency[], networks: CryptoOrTokenCurrency[]) => Array<CryptoOrTokenCurrency & Network>;
|
6
6
|
//# sourceMappingURL=createNetworkConfiguration.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"createNetworkConfiguration.d.ts","sourceRoot":"","sources":["../../../src/modularDrawer/modules/createNetworkConfiguration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAI1E,OAAO,EACL,mCAAmC,EACnC,wBAAwB,EACxB,eAAe,EACf,OAAO,EACP,WAAW,EACX,gBAAgB,
|
1
|
+
{"version":3,"file":"createNetworkConfiguration.d.ts","sourceRoot":"","sources":["../../../src/modularDrawer/modules/createNetworkConfiguration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAI1E,OAAO,EACL,mCAAmC,EACnC,wBAAwB,EACxB,eAAe,EACf,OAAO,EACP,WAAW,EACX,gBAAgB,EAGjB,MAAM,eAAe,CAAC;AAIvB,eAAO,MAAM,cAAc,yEAEV,eAAe,KAAG,WAAW,GAAG,SAmB9C,CAAC;AAEJ,eAAO,MAAM,eAAe,0EAEV,gBAAgB,KAAG,WAAW,GAAG,SAWhD,CAAC;AAEJ,eAAO,MAAM,8BAA8B,0FAET,mCAAmC,cASvD,qBAAqB,EAAE,YACrB,qBAAqB,EAAE,KAChC,MAAM,qBAAqB,GAAG,OAAO,CAkCzC,CAAC"}
|
@@ -5,6 +5,7 @@ const useLeftAccounts_1 = require("../hooks/useLeftAccounts");
|
|
5
5
|
const useLeftAccountsApy_1 = require("../hooks/useLeftAccountsApy");
|
6
6
|
const useRightBalanceNetwork_1 = require("../hooks/useRightBalanceNetwork");
|
7
7
|
const composeHooks_1 = require("../../utils/composeHooks");
|
8
|
+
const sortByBalance_1 = require("../utils/sortByBalance");
|
8
9
|
const getLeftElement = (NetworkConfigurationDeps) => (leftElement) => {
|
9
10
|
switch (leftElement) {
|
10
11
|
case "undefined":
|
@@ -33,7 +34,7 @@ const getRightElement = (NetworkConfigurationDeps) => (rightElement) => {
|
|
33
34
|
}
|
34
35
|
};
|
35
36
|
exports.getRightElement = getRightElement;
|
36
|
-
const createNetworkConfigurationHook = (NetworkConfigurationDeps) => ({ networksConfig,
|
37
|
+
const createNetworkConfigurationHook = (NetworkConfigurationDeps) => ({ networksConfig, accounts$ }) => {
|
37
38
|
const { leftElement, rightElement } = networksConfig ?? {};
|
38
39
|
const leftHook = (0, exports.getLeftElement)(NetworkConfigurationDeps)(leftElement);
|
39
40
|
const rightHook = (0, exports.getRightElement)(NetworkConfigurationDeps)(rightElement);
|
@@ -42,12 +43,22 @@ const createNetworkConfigurationHook = (NetworkConfigurationDeps) => ({ networks
|
|
42
43
|
return (assets, networks) => {
|
43
44
|
const composedHook = (0, composeHooks_1.composeHooks)(...hooks.map(hook => () => hook({
|
44
45
|
assets,
|
45
|
-
selectedAssetId,
|
46
|
-
currenciesByProvider: currenciesByProvider || [],
|
47
46
|
accounts$,
|
48
47
|
networks,
|
49
48
|
})));
|
50
|
-
|
49
|
+
const result = composedHook(assets);
|
50
|
+
if (leftElement === "numberOfAccounts" ||
|
51
|
+
leftElement === "numberOfAccountsAndApy" ||
|
52
|
+
leftElement === undefined // default
|
53
|
+
) {
|
54
|
+
result.sort((a, b) => (b?.count || 0) - (a?.count || 0));
|
55
|
+
}
|
56
|
+
if (rightElement === "balance" ||
|
57
|
+
rightElement === undefined // default
|
58
|
+
) {
|
59
|
+
result.sort((a, b) => (0, sortByBalance_1.compareByBalanceThenFiat)(a?.balanceData, b?.balanceData));
|
60
|
+
}
|
61
|
+
return result;
|
51
62
|
};
|
52
63
|
};
|
53
64
|
exports.createNetworkConfigurationHook = createNetworkConfigurationHook;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"createNetworkConfiguration.js","sourceRoot":"","sources":["../../../src/modularDrawer/modules/createNetworkConfiguration.ts"],"names":[],"mappings":";;;AACA,8DAAuE;AACvE,oEAAuE;AACvE,4EAA+E;
|
1
|
+
{"version":3,"file":"createNetworkConfiguration.js","sourceRoot":"","sources":["../../../src/modularDrawer/modules/createNetworkConfiguration.ts"],"names":[],"mappings":";;;AACA,8DAAuE;AACvE,oEAAuE;AACvE,4EAA+E;AAW/E,2DAAwD;AACxD,0DAAkE;AAE3D,MAAM,cAAc,GACzB,CAAC,wBAAkD,EAAE,EAAE,CACvD,CAAC,WAA6B,EAA2B,EAAE;IACzD,QAAQ,WAAW,EAAE;QACnB,KAAK,WAAW;YACd,OAAO,SAAS,CAAC;QACnB,KAAK,wBAAwB;YAC3B,OAAO,CAAC,MAAmE,EAAE,EAAE,CAC7E,IAAA,6CAAwB,EACtB,MAAM,EACN,wBAAwB,CAAC,cAAc,EACvC,wBAAwB,CAAC,mBAAmB,EAC5C,MAAM,CAAC,QAAQ,CAChB,CAAC;QACN,KAAK,kBAAkB,CAAC;QACxB;YACE,OAAO,IAAA,6CAA2B,EAAC;gBACjC,cAAc,EAAE,wBAAwB,CAAC,cAAc;gBACvD,aAAa,EAAE,wBAAwB,CAAC,aAAa;aACtD,CAAC,CAAC;KACN;AACH,CAAC,CAAC;AArBS,QAAA,cAAc,kBAqBvB;AAEG,MAAM,eAAe,GAC1B,CAAC,wBAAkD,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AC,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC;SAC1D;QAED,IACE,YAAY,KAAK,SAAS;YAC1B,YAAY,KAAK,SAAS,CAAC,UAAU;UACrC;YACA,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,IAAA,wCAAwB,EAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC;SACjF;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC,CAAC;AA/CS,QAAA,8BAA8B,kCA+CvC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"calculateProviderTotal.test.d.ts","sourceRoot":"","sources":["../../../../src/modularDrawer/utils/__tests__/calculateProviderTotal.test.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,212 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
const calculateProviderTotal_1 = require("../calculateProviderTotal");
|
7
|
+
const cryptoCurrencies_1 = require("../../../mock/fixtures/cryptoCurrencies");
|
8
|
+
const account_1 = require("../../../mock/account");
|
9
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
10
|
+
describe("calculateProviderTotals", () => {
|
11
|
+
const mockBTCCurrency = (0, cryptoCurrencies_1.createFixtureCryptoCurrency)("bitcoin");
|
12
|
+
const mockETHCurrency = (0, cryptoCurrencies_1.createFixtureCryptoCurrency)("ethereum");
|
13
|
+
const mockBTCAccount = (0, account_1.genAccount)("btc-account", { currency: mockBTCCurrency });
|
14
|
+
const mockUSDCAccount = (0, account_1.genAccount)("usdc-account", { currency: mockETHCurrency });
|
15
|
+
const mockBscUSDCAccount = (0, account_1.genAccount)("bsc-usdc-account", { currency: mockETHCurrency });
|
16
|
+
const mockUSDCToken = {
|
17
|
+
type: "TokenCurrency",
|
18
|
+
id: "ethereum/erc20/usdc",
|
19
|
+
contractAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
20
|
+
parentCurrency: mockETHCurrency,
|
21
|
+
tokenType: "erc20",
|
22
|
+
name: "USD Coin",
|
23
|
+
ticker: "USDC",
|
24
|
+
units: [{ name: "USD Coin", code: "USDC", magnitude: 6 }],
|
25
|
+
};
|
26
|
+
const mockBscUSDCToken = {
|
27
|
+
type: "TokenCurrency",
|
28
|
+
id: "bsc/bep20/usdc",
|
29
|
+
contractAddress: "0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d",
|
30
|
+
parentCurrency: mockETHCurrency,
|
31
|
+
tokenType: "bep20",
|
32
|
+
name: "USD Coin (BSC)",
|
33
|
+
ticker: "USDC",
|
34
|
+
units: [{ name: "USD Coin", code: "USDC", magnitude: 18 }],
|
35
|
+
};
|
36
|
+
it("should return totals with hasAccounts false when no accounts exist", () => {
|
37
|
+
const currencies = [mockBTCCurrency, mockUSDCToken];
|
38
|
+
const groupedAccounts = {};
|
39
|
+
const result = (0, calculateProviderTotal_1.calculateProviderTotals)(currencies, groupedAccounts);
|
40
|
+
expect(result).toEqual({
|
41
|
+
totalBalance: new bignumber_js_1.default(0),
|
42
|
+
totalFiatValue: new bignumber_js_1.default(0),
|
43
|
+
hasAccounts: false,
|
44
|
+
referenceCurrency: null,
|
45
|
+
});
|
46
|
+
});
|
47
|
+
it("should sum totals across multiple currencies", () => {
|
48
|
+
const currencies = [mockBTCCurrency, mockUSDCToken];
|
49
|
+
const groupedAccounts = {
|
50
|
+
[mockBTCCurrency.id]: {
|
51
|
+
totalBalance: new bignumber_js_1.default(100000000),
|
52
|
+
totalFiatValue: new bignumber_js_1.default(50000),
|
53
|
+
accounts: [mockBTCAccount],
|
54
|
+
referenceCurrency: mockBTCCurrency,
|
55
|
+
},
|
56
|
+
[mockUSDCToken.id]: {
|
57
|
+
totalBalance: new bignumber_js_1.default(1000000),
|
58
|
+
totalFiatValue: new bignumber_js_1.default(1),
|
59
|
+
accounts: [mockUSDCAccount],
|
60
|
+
referenceCurrency: mockUSDCToken,
|
61
|
+
},
|
62
|
+
};
|
63
|
+
const result = (0, calculateProviderTotal_1.calculateProviderTotals)(currencies, groupedAccounts);
|
64
|
+
// BTC (magnitude 8) sets reference, USDC (magnitude 6) gets normalized
|
65
|
+
// USDC: 1000000 * 10^(8-6) = 1000000 * 100 = 100000000
|
66
|
+
// Total: 100000000 (BTC) + 100000000 (normalized USDC) = 200000000
|
67
|
+
expect(result).toEqual({
|
68
|
+
totalBalance: new bignumber_js_1.default(200000000),
|
69
|
+
totalFiatValue: new bignumber_js_1.default(50001),
|
70
|
+
hasAccounts: true,
|
71
|
+
referenceCurrency: mockBTCCurrency, // First currency with accounts
|
72
|
+
});
|
73
|
+
});
|
74
|
+
it("should return referenceCurrency from first asset group with accounts", () => {
|
75
|
+
const currencies = [mockUSDCToken, mockBscUSDCToken];
|
76
|
+
const groupedAccounts = {
|
77
|
+
[mockUSDCToken.id]: {
|
78
|
+
totalBalance: new bignumber_js_1.default(1000000),
|
79
|
+
totalFiatValue: new bignumber_js_1.default(1),
|
80
|
+
accounts: [mockUSDCAccount],
|
81
|
+
referenceCurrency: mockUSDCToken, // ETH USDC with 6 decimals
|
82
|
+
},
|
83
|
+
[mockBscUSDCToken.id]: {
|
84
|
+
totalBalance: new bignumber_js_1.default("1000000000000000000"),
|
85
|
+
totalFiatValue: new bignumber_js_1.default(1),
|
86
|
+
accounts: [mockBscUSDCAccount],
|
87
|
+
referenceCurrency: mockBscUSDCToken, // BSC USDC with 18 decimals
|
88
|
+
},
|
89
|
+
};
|
90
|
+
const result = (0, calculateProviderTotal_1.calculateProviderTotals)(currencies, groupedAccounts);
|
91
|
+
expect(result.referenceCurrency).toEqual(mockUSDCToken); // First currency
|
92
|
+
expect(result.hasAccounts).toBe(true);
|
93
|
+
});
|
94
|
+
it("should skip currencies with no accounts", () => {
|
95
|
+
const currencies = [mockBTCCurrency, mockUSDCToken];
|
96
|
+
const groupedAccounts = {
|
97
|
+
[mockUSDCToken.id]: {
|
98
|
+
totalBalance: new bignumber_js_1.default(1000000),
|
99
|
+
totalFiatValue: new bignumber_js_1.default(1),
|
100
|
+
accounts: [mockUSDCAccount],
|
101
|
+
referenceCurrency: mockUSDCToken,
|
102
|
+
},
|
103
|
+
// BTC has no entry in groupedAccounts
|
104
|
+
};
|
105
|
+
const result = (0, calculateProviderTotal_1.calculateProviderTotals)(currencies, groupedAccounts);
|
106
|
+
expect(result).toEqual({
|
107
|
+
totalBalance: new bignumber_js_1.default(1000000),
|
108
|
+
totalFiatValue: new bignumber_js_1.default(1),
|
109
|
+
hasAccounts: true,
|
110
|
+
referenceCurrency: mockUSDCToken,
|
111
|
+
});
|
112
|
+
});
|
113
|
+
it("should skip currencies with empty accounts array", () => {
|
114
|
+
const currencies = [mockBTCCurrency, mockUSDCToken];
|
115
|
+
const groupedAccounts = {
|
116
|
+
[mockBTCCurrency.id]: {
|
117
|
+
totalBalance: new bignumber_js_1.default(100000000),
|
118
|
+
totalFiatValue: new bignumber_js_1.default(50000),
|
119
|
+
accounts: [],
|
120
|
+
referenceCurrency: mockBTCCurrency,
|
121
|
+
},
|
122
|
+
[mockUSDCToken.id]: {
|
123
|
+
totalBalance: new bignumber_js_1.default(1000000),
|
124
|
+
totalFiatValue: new bignumber_js_1.default(1),
|
125
|
+
accounts: [mockUSDCAccount],
|
126
|
+
referenceCurrency: mockUSDCToken,
|
127
|
+
},
|
128
|
+
};
|
129
|
+
const result = (0, calculateProviderTotal_1.calculateProviderTotals)(currencies, groupedAccounts);
|
130
|
+
expect(result).toEqual({
|
131
|
+
totalBalance: new bignumber_js_1.default(1000000),
|
132
|
+
totalFiatValue: new bignumber_js_1.default(1),
|
133
|
+
hasAccounts: true,
|
134
|
+
referenceCurrency: mockUSDCToken,
|
135
|
+
});
|
136
|
+
});
|
137
|
+
it("should normalize balances based on magnitude differences", () => {
|
138
|
+
// Test the specific code: magnitude normalization between currencies
|
139
|
+
const currencies = [mockUSDCToken, mockBscUSDCToken];
|
140
|
+
const groupedAccounts = {
|
141
|
+
[mockUSDCToken.id]: {
|
142
|
+
totalBalance: new bignumber_js_1.default(1000000),
|
143
|
+
totalFiatValue: new bignumber_js_1.default(1),
|
144
|
+
accounts: [mockUSDCAccount],
|
145
|
+
referenceCurrency: mockUSDCToken, // 6 decimals
|
146
|
+
},
|
147
|
+
[mockBscUSDCToken.id]: {
|
148
|
+
totalBalance: new bignumber_js_1.default("1000000000000000000"),
|
149
|
+
totalFiatValue: new bignumber_js_1.default(1),
|
150
|
+
accounts: [mockBscUSDCAccount],
|
151
|
+
referenceCurrency: mockBscUSDCToken, // 18 decimals
|
152
|
+
},
|
153
|
+
};
|
154
|
+
const result = (0, calculateProviderTotal_1.calculateProviderTotals)(currencies, groupedAccounts);
|
155
|
+
// First currency (USDC) sets reference magnitude of 6
|
156
|
+
// Second currency (BSC USDC) has magnitude 18, so diff = 6 - 18 = -12
|
157
|
+
// BSC balance of 1000000000000000000 shifted by -12 = 1000000
|
158
|
+
// Total should be 1000000 + 1000000 = 2000000
|
159
|
+
expect(result.totalBalance).toEqual(new bignumber_js_1.default(2000000));
|
160
|
+
expect(result.totalFiatValue).toEqual(new bignumber_js_1.default(2));
|
161
|
+
expect(result.hasAccounts).toBe(true);
|
162
|
+
expect(result.referenceCurrency).toEqual(mockUSDCToken);
|
163
|
+
});
|
164
|
+
it("should handle magnitude normalization when referenceCurrency is set", () => {
|
165
|
+
const currencies = [mockBscUSDCToken];
|
166
|
+
const groupedAccounts = {
|
167
|
+
[mockBscUSDCToken.id]: {
|
168
|
+
totalBalance: new bignumber_js_1.default("2000000000000000000"),
|
169
|
+
totalFiatValue: new bignumber_js_1.default(2),
|
170
|
+
accounts: [mockBscUSDCAccount],
|
171
|
+
referenceCurrency: mockBscUSDCToken,
|
172
|
+
},
|
173
|
+
};
|
174
|
+
const result = (0, calculateProviderTotal_1.calculateProviderTotals)(currencies, groupedAccounts);
|
175
|
+
expect(result.totalBalance).toEqual(new bignumber_js_1.default("2000000000000000000"));
|
176
|
+
expect(result.referenceCurrency).toEqual(mockBscUSDCToken);
|
177
|
+
});
|
178
|
+
it("should handle zero magnitude difference correctly", () => {
|
179
|
+
const sameMagnitudeCurrency = {
|
180
|
+
type: "TokenCurrency",
|
181
|
+
id: "ethereum/erc20/usdc2",
|
182
|
+
contractAddress: "0x1234567890123456789012345678901234567890",
|
183
|
+
parentCurrency: mockETHCurrency,
|
184
|
+
tokenType: "erc20",
|
185
|
+
name: "USD Coin 2",
|
186
|
+
ticker: "USDC2",
|
187
|
+
units: [{ name: "USD Coin 2", code: "USDC2", magnitude: 6 }],
|
188
|
+
};
|
189
|
+
const mockSameMagnitudeAccount = (0, account_1.genAccount)("usdc2-account", { currency: mockETHCurrency });
|
190
|
+
const currencies = [mockUSDCToken, sameMagnitudeCurrency];
|
191
|
+
const groupedAccounts = {
|
192
|
+
[mockUSDCToken.id]: {
|
193
|
+
totalBalance: new bignumber_js_1.default(1000000),
|
194
|
+
totalFiatValue: new bignumber_js_1.default(1),
|
195
|
+
accounts: [mockUSDCAccount],
|
196
|
+
referenceCurrency: mockUSDCToken, // 6 decimals
|
197
|
+
},
|
198
|
+
[sameMagnitudeCurrency.id]: {
|
199
|
+
totalBalance: new bignumber_js_1.default(2000000),
|
200
|
+
totalFiatValue: new bignumber_js_1.default(2),
|
201
|
+
accounts: [mockSameMagnitudeAccount],
|
202
|
+
referenceCurrency: sameMagnitudeCurrency, // 6 decimals
|
203
|
+
},
|
204
|
+
};
|
205
|
+
const result = (0, calculateProviderTotal_1.calculateProviderTotals)(currencies, groupedAccounts);
|
206
|
+
// Both have magnitude 6, so diff = 6 - 6 = 0
|
207
|
+
// No shifting needed, simple addition: 1000000 + 2000000 = 3000000
|
208
|
+
expect(result.totalBalance).toEqual(new bignumber_js_1.default(3000000));
|
209
|
+
expect(result.totalFiatValue).toEqual(new bignumber_js_1.default(3));
|
210
|
+
});
|
211
|
+
});
|
212
|
+
//# sourceMappingURL=calculateProviderTotal.test.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"calculateProviderTotal.test.js","sourceRoot":"","sources":["../../../../src/modularDrawer/utils/__tests__/calculateProviderTotal.test.ts"],"names":[],"mappings":";;;;;AAAA,sEAAoE;AACpE,8EAAsF;AACtF,mDAAmD;AACnD,gEAAqC;AAGrC,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACvC,MAAM,eAAe,GAAG,IAAA,8CAA2B,EAAC,SAAS,CAAC,CAAC;IAC/D,MAAM,eAAe,GAAG,IAAA,8CAA2B,EAAC,UAAU,CAAC,CAAC;IAEhE,MAAM,cAAc,GAAG,IAAA,oBAAU,EAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC,CAAC;IAChF,MAAM,eAAe,GAAG,IAAA,oBAAU,EAAC,cAAc,EAAE,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC,CAAC;IAClF,MAAM,kBAAkB,GAAG,IAAA,oBAAU,EAAC,kBAAkB,EAAE,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC,CAAC;IAEzF,MAAM,aAAa,GAA0B;QAC3C,IAAI,EAAE,eAAe;QACrB,EAAE,EAAE,qBAAqB;QACzB,eAAe,EAAE,4CAA4C;QAC7D,cAAc,EAAE,eAAe;QAC/B,SAAS,EAAE,OAAO;QAClB,IAAI,EAAE,UAAU;QAChB,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;KAC1D,CAAC;IAEF,MAAM,gBAAgB,GAA0B;QAC9C,IAAI,EAAE,eAAe;QACrB,EAAE,EAAE,gBAAgB;QACpB,eAAe,EAAE,4CA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