@ledgerhq/live-common 34.50.0-nightly.4 → 34.50.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/bridge/generic-alpaca/alpaca/index.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/alpaca/index.js +0 -3
- 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 +9 -7
- 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 +0 -11
- 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 +9 -15
- 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 +2 -30
- 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 +0 -37
- package/lib/bridge/generic-alpaca/signer/index.js.map +1 -1
- package/lib/bridge/generic-alpaca/signer/signTransaction.d.ts +0 -2
- package/lib/bridge/generic-alpaca/signer/signTransaction.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/signer/signTransaction.js +1 -8
- package/lib/bridge/generic-alpaca/signer/signTransaction.js.map +1 -1
- package/lib/bridge/generic-alpaca/tests/estimateMaxSpendable.test.js +1 -15
- package/lib/bridge/generic-alpaca/tests/estimateMaxSpendable.test.js.map +1 -1
- package/lib/bridge/generic-alpaca/tests/getAccountShape.test.js +3 -5
- package/lib/bridge/generic-alpaca/tests/getAccountShape.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 -1
- package/lib/bridge/generic-alpaca/types.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/utils.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/utils.js +2 -5
- package/lib/bridge/generic-alpaca/utils.js.map +1 -1
- package/lib/bridge/impl.d.ts.map +1 -1
- package/lib/bridge/impl.js +0 -1
- package/lib/bridge/impl.js.map +1 -1
- package/lib/e2e/enum/Account.d.ts +0 -6
- package/lib/e2e/enum/Account.d.ts.map +1 -1
- package/lib/e2e/enum/Account.js +0 -8
- package/lib/e2e/enum/Account.js.map +1 -1
- package/lib/e2e/enum/AppInfos.d.ts +0 -2
- package/lib/e2e/enum/AppInfos.d.ts.map +1 -1
- package/lib/e2e/enum/AppInfos.js +0 -2
- package/lib/e2e/enum/AppInfos.js.map +1 -1
- package/lib/e2e/enum/Currency.d.ts +0 -4
- package/lib/e2e/enum/Currency.d.ts.map +1 -1
- package/lib/e2e/enum/Currency.js +0 -6
- package/lib/e2e/enum/Currency.js.map +1 -1
- package/lib/e2e/enum/Network.d.ts +1 -3
- package/lib/e2e/enum/Network.d.ts.map +1 -1
- package/lib/e2e/enum/Network.js +0 -2
- package/lib/e2e/enum/Network.js.map +1 -1
- package/lib/e2e/enum/TokenType.d.ts +1 -2
- package/lib/e2e/enum/TokenType.d.ts.map +1 -1
- package/lib/e2e/enum/TokenType.js +0 -1
- package/lib/e2e/enum/TokenType.js.map +1 -1
- package/lib/e2e/enum/TransactionStatus.d.ts +1 -4
- package/lib/e2e/enum/TransactionStatus.d.ts.map +1 -1
- package/lib/e2e/enum/TransactionStatus.js +0 -3
- package/lib/e2e/enum/TransactionStatus.js.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 +1 -35
- package/lib/e2e/speculos.js.map +1 -1
- package/lib/exchange/platform/types.d.ts +0 -2
- 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 +1 -22
- 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 +0 -8
- package/lib/exchange/swap/getIncompatibleCurrencyKeys.js.map +1 -1
- package/lib/families/tezos/react.d.ts +1 -2
- package/lib/families/tezos/react.d.ts.map +1 -1
- package/lib/families/tezos/react.js +1 -19
- package/lib/families/tezos/react.js.map +1 -1
- package/lib/families/tezos/setup.d.ts +4 -1
- package/lib/families/tezos/setup.d.ts.map +1 -1
- package/lib/families/tezos/setup.js +11 -3
- package/lib/families/tezos/setup.js.map +1 -1
- package/lib/generated/bridge/js.d.ts +1 -0
- package/lib/generated/bridge/js.d.ts.map +1 -1
- package/lib/generated/bridge/js.js +12 -10
- package/lib/generated/bridge/js.js.map +1 -1
- package/lib/hw/actions/completeExchange.d.ts +0 -2
- package/lib/hw/actions/completeExchange.d.ts.map +1 -1
- package/lib/hw/actions/completeExchange.js +0 -1
- package/lib/hw/actions/completeExchange.js.map +1 -1
- package/lib/modularDrawer/hooks/useRightBalanceAsset.d.ts +3 -4
- package/lib/modularDrawer/hooks/useRightBalanceAsset.d.ts.map +1 -1
- package/lib/modularDrawer/hooks/useRightBalanceAsset.js +47 -13
- package/lib/modularDrawer/hooks/useRightBalanceAsset.js.map +1 -1
- package/lib/modularDrawer/hooks/useRightBalanceNetwork.d.ts +5 -1
- package/lib/modularDrawer/hooks/useRightBalanceNetwork.d.ts.map +1 -1
- package/lib/modularDrawer/hooks/useRightBalanceNetwork.js +55 -15
- 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 +3 -1
- package/lib/modularDrawer/modules/createNetworkConfiguration.js.map +1 -1
- package/lib/modularDrawer/utils/__tests__/haveOneCommonProvider.test.d.ts +2 -0
- package/lib/modularDrawer/utils/__tests__/haveOneCommonProvider.test.d.ts.map +1 -0
- package/lib/modularDrawer/utils/__tests__/haveOneCommonProvider.test.js +28 -0
- package/lib/modularDrawer/utils/__tests__/haveOneCommonProvider.test.js.map +1 -0
- package/lib/modularDrawer/utils/buildProviderCurrenciesMap.d.ts +9 -0
- package/lib/modularDrawer/utils/buildProviderCurrenciesMap.d.ts.map +1 -0
- package/lib/modularDrawer/utils/buildProviderCurrenciesMap.js +17 -0
- package/lib/modularDrawer/utils/buildProviderCurrenciesMap.js.map +1 -0
- package/lib/modularDrawer/utils/currencyUtils.d.ts.map +1 -1
- package/lib/modularDrawer/utils/currencyUtils.js.map +1 -1
- package/lib/modularDrawer/utils/getProviderCurrency.d.ts +3 -0
- package/lib/modularDrawer/utils/getProviderCurrency.d.ts.map +1 -0
- package/lib/modularDrawer/utils/getProviderCurrency.js +14 -0
- package/lib/modularDrawer/utils/getProviderCurrency.js.map +1 -0
- package/lib/modularDrawer/utils/haveOneCommonProvider.d.ts +11 -0
- package/lib/modularDrawer/utils/haveOneCommonProvider.d.ts.map +1 -0
- package/lib/modularDrawer/utils/haveOneCommonProvider.js +29 -0
- package/lib/modularDrawer/utils/haveOneCommonProvider.js.map +1 -0
- package/lib/modularDrawer/utils/index.d.ts +6 -3
- package/lib/modularDrawer/utils/index.d.ts.map +1 -1
- package/lib/modularDrawer/utils/index.js +12 -3
- package/lib/modularDrawer/utils/index.js.map +1 -1
- package/lib/modularDrawer/utils/index.test.js +26 -0
- package/lib/modularDrawer/utils/index.test.js.map +1 -1
- package/lib/modularDrawer/utils/type.d.ts +6 -0
- package/lib/modularDrawer/utils/type.d.ts.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/bridge/generic-alpaca/alpaca/index.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/alpaca/index.js +0 -3
- 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 +9 -7
- 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 +0 -11
- 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 +9 -15
- 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 +2 -30
- 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 +1 -38
- package/lib-es/bridge/generic-alpaca/signer/index.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/signer/signTransaction.d.ts +0 -2
- package/lib-es/bridge/generic-alpaca/signer/signTransaction.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/signer/signTransaction.js +0 -6
- package/lib-es/bridge/generic-alpaca/signer/signTransaction.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/tests/estimateMaxSpendable.test.js +1 -15
- package/lib-es/bridge/generic-alpaca/tests/estimateMaxSpendable.test.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/tests/getAccountShape.test.js +3 -5
- package/lib-es/bridge/generic-alpaca/tests/getAccountShape.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 -1
- package/lib-es/bridge/generic-alpaca/types.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/utils.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/utils.js +2 -5
- 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 +0 -1
- package/lib-es/bridge/impl.js.map +1 -1
- package/lib-es/e2e/enum/Account.d.ts +0 -6
- package/lib-es/e2e/enum/Account.d.ts.map +1 -1
- package/lib-es/e2e/enum/Account.js +0 -8
- package/lib-es/e2e/enum/Account.js.map +1 -1
- package/lib-es/e2e/enum/AppInfos.d.ts +0 -2
- package/lib-es/e2e/enum/AppInfos.d.ts.map +1 -1
- package/lib-es/e2e/enum/AppInfos.js +0 -2
- package/lib-es/e2e/enum/AppInfos.js.map +1 -1
- package/lib-es/e2e/enum/Currency.d.ts +0 -4
- package/lib-es/e2e/enum/Currency.d.ts.map +1 -1
- package/lib-es/e2e/enum/Currency.js +0 -6
- package/lib-es/e2e/enum/Currency.js.map +1 -1
- package/lib-es/e2e/enum/Network.d.ts +1 -3
- package/lib-es/e2e/enum/Network.d.ts.map +1 -1
- package/lib-es/e2e/enum/Network.js +0 -2
- package/lib-es/e2e/enum/Network.js.map +1 -1
- package/lib-es/e2e/enum/TokenType.d.ts +1 -2
- package/lib-es/e2e/enum/TokenType.d.ts.map +1 -1
- package/lib-es/e2e/enum/TokenType.js +0 -1
- package/lib-es/e2e/enum/TokenType.js.map +1 -1
- package/lib-es/e2e/enum/TransactionStatus.d.ts +1 -4
- package/lib-es/e2e/enum/TransactionStatus.d.ts.map +1 -1
- package/lib-es/e2e/enum/TransactionStatus.js +0 -3
- package/lib-es/e2e/enum/TransactionStatus.js.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 +0 -33
- package/lib-es/e2e/speculos.js.map +1 -1
- package/lib-es/exchange/platform/types.d.ts +0 -2
- 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 +1 -22
- 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 +0 -8
- package/lib-es/exchange/swap/getIncompatibleCurrencyKeys.js.map +1 -1
- package/lib-es/families/tezos/react.d.ts +1 -2
- package/lib-es/families/tezos/react.d.ts.map +1 -1
- package/lib-es/families/tezos/react.js +0 -17
- package/lib-es/families/tezos/react.js.map +1 -1
- package/lib-es/families/tezos/setup.d.ts +4 -1
- package/lib-es/families/tezos/setup.d.ts.map +1 -1
- package/lib-es/families/tezos/setup.js +9 -2
- package/lib-es/families/tezos/setup.js.map +1 -1
- package/lib-es/generated/bridge/js.d.ts +1 -0
- package/lib-es/generated/bridge/js.d.ts.map +1 -1
- package/lib-es/generated/bridge/js.js +2 -0
- package/lib-es/generated/bridge/js.js.map +1 -1
- package/lib-es/hw/actions/completeExchange.d.ts +0 -2
- package/lib-es/hw/actions/completeExchange.d.ts.map +1 -1
- package/lib-es/hw/actions/completeExchange.js +0 -1
- package/lib-es/hw/actions/completeExchange.js.map +1 -1
- package/lib-es/modularDrawer/hooks/useRightBalanceAsset.d.ts +3 -4
- package/lib-es/modularDrawer/hooks/useRightBalanceAsset.d.ts.map +1 -1
- package/lib-es/modularDrawer/hooks/useRightBalanceAsset.js +47 -13
- package/lib-es/modularDrawer/hooks/useRightBalanceAsset.js.map +1 -1
- package/lib-es/modularDrawer/hooks/useRightBalanceNetwork.d.ts +5 -1
- package/lib-es/modularDrawer/hooks/useRightBalanceNetwork.d.ts.map +1 -1
- package/lib-es/modularDrawer/hooks/useRightBalanceNetwork.js +55 -15
- 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 +3 -1
- package/lib-es/modularDrawer/modules/createNetworkConfiguration.js.map +1 -1
- package/lib-es/modularDrawer/utils/__tests__/currencyUtils.test.js +1 -1
- package/lib-es/modularDrawer/utils/__tests__/currencyUtils.test.js.map +1 -1
- package/lib-es/modularDrawer/utils/__tests__/haveOneCommonProvider.test.d.ts +2 -0
- package/lib-es/modularDrawer/utils/__tests__/haveOneCommonProvider.test.d.ts.map +1 -0
- package/lib-es/modularDrawer/utils/__tests__/haveOneCommonProvider.test.js +26 -0
- package/lib-es/modularDrawer/utils/__tests__/haveOneCommonProvider.test.js.map +1 -0
- package/lib-es/modularDrawer/utils/buildProviderCurrenciesMap.d.ts +9 -0
- package/lib-es/modularDrawer/utils/buildProviderCurrenciesMap.d.ts.map +1 -0
- package/lib-es/modularDrawer/utils/buildProviderCurrenciesMap.js +13 -0
- package/lib-es/modularDrawer/utils/buildProviderCurrenciesMap.js.map +1 -0
- 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/getProviderCurrency.d.ts +3 -0
- package/lib-es/modularDrawer/utils/getProviderCurrency.d.ts.map +1 -0
- package/lib-es/modularDrawer/utils/getProviderCurrency.js +10 -0
- package/lib-es/modularDrawer/utils/getProviderCurrency.js.map +1 -0
- package/lib-es/modularDrawer/utils/haveOneCommonProvider.d.ts +11 -0
- package/lib-es/modularDrawer/utils/haveOneCommonProvider.d.ts.map +1 -0
- package/lib-es/modularDrawer/utils/haveOneCommonProvider.js +25 -0
- package/lib-es/modularDrawer/utils/haveOneCommonProvider.js.map +1 -0
- package/lib-es/modularDrawer/utils/index.d.ts +6 -3
- package/lib-es/modularDrawer/utils/index.d.ts.map +1 -1
- package/lib-es/modularDrawer/utils/index.js +10 -3
- package/lib-es/modularDrawer/utils/index.js.map +1 -1
- package/lib-es/modularDrawer/utils/index.test.js +27 -1
- package/lib-es/modularDrawer/utils/index.test.js.map +1 -1
- package/lib-es/modularDrawer/utils/type.d.ts +6 -0
- package/lib-es/modularDrawer/utils/type.d.ts.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 +73 -75
- package/src/__tests__/test-helpers/bridge.ts +1 -1
- package/src/bridge/generic-alpaca/alpaca/index.ts +0 -4
- package/src/bridge/generic-alpaca/buildSubAccounts.ts +28 -28
- package/src/bridge/generic-alpaca/createTransaction.ts +0 -11
- package/src/bridge/generic-alpaca/getAccountShape.ts +15 -22
- package/src/bridge/generic-alpaca/getTransactionStatus.ts +1 -1
- package/src/bridge/generic-alpaca/prepareTransaction.ts +2 -48
- package/src/bridge/generic-alpaca/signer/index.ts +1 -44
- package/src/bridge/generic-alpaca/signer/signTransaction.ts +0 -10
- package/src/bridge/generic-alpaca/tests/estimateMaxSpendable.test.ts +1 -15
- package/src/bridge/generic-alpaca/tests/getAccountShape.test.ts +3 -5
- package/src/bridge/generic-alpaca/tests/signOperation.test.ts +1 -1
- package/src/bridge/generic-alpaca/types.ts +1 -9
- package/src/bridge/generic-alpaca/utils.ts +2 -5
- package/src/bridge/impl.ts +0 -1
- package/src/e2e/enum/Account.ts +0 -41
- package/src/e2e/enum/AppInfos.ts +0 -4
- package/src/e2e/enum/Currency.ts +0 -21
- package/src/e2e/enum/Network.ts +0 -2
- package/src/e2e/enum/TokenType.ts +0 -1
- package/src/e2e/enum/TransactionStatus.ts +0 -3
- package/src/e2e/speculos.ts +0 -34
- package/src/exchange/platform/types.ts +0 -2
- package/src/exchange/swap/completeExchange.ts +2 -32
- package/src/exchange/swap/getIncompatibleCurrencyKeys.ts +0 -8
- package/src/families/tezos/react.ts +1 -20
- package/src/families/tezos/setup.ts +22 -3
- package/src/generated/bridge/js.ts +2 -0
- package/src/hw/actions/completeExchange.ts +0 -3
- package/src/modularDrawer/hooks/useRightBalanceAsset.tsx +76 -16
- package/src/modularDrawer/hooks/useRightBalanceNetwork.tsx +95 -25
- package/src/modularDrawer/modules/createAssetConfiguration.ts +11 -3
- package/src/modularDrawer/modules/createNetworkConfiguration.ts +8 -1
- package/src/modularDrawer/utils/__tests__/currencyUtils.test.ts +1 -1
- package/src/modularDrawer/utils/__tests__/haveOneCommonProvider.test.ts +34 -0
- package/src/modularDrawer/utils/buildProviderCurrenciesMap.tsx +25 -0
- package/src/modularDrawer/utils/currencyUtils.ts +1 -0
- package/src/modularDrawer/utils/getProviderCurrency.ts +13 -0
- package/src/modularDrawer/utils/haveOneCommonProvider.ts +31 -0
- package/src/modularDrawer/utils/index.test.ts +32 -1
- package/src/modularDrawer/utils/index.ts +23 -4
- package/src/modularDrawer/utils/type.ts +6 -0
- package/lib/e2e/families/hedera.d.ts +0 -2
- package/lib/e2e/families/hedera.d.ts.map +0 -1
- package/lib/e2e/families/hedera.js +0 -11
- package/lib/e2e/families/hedera.js.map +0 -1
- package/lib/e2e/families/sui.d.ts +0 -2
- package/lib/e2e/families/sui.d.ts.map +0 -1
- package/lib/e2e/families/sui.js +0 -11
- package/lib/e2e/families/sui.js.map +0 -1
- package/lib/families/hedera/exchange.d.ts +0 -9
- package/lib/families/hedera/exchange.d.ts.map +0 -1
- package/lib/families/hedera/exchange.js +0 -36
- package/lib/families/hedera/exchange.js.map +0 -1
- package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.d.ts +0 -7
- package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.d.ts.map +0 -1
- package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js +0 -224
- package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js.map +0 -1
- package/lib-es/e2e/families/hedera.d.ts +0 -2
- package/lib-es/e2e/families/hedera.d.ts.map +0 -1
- package/lib-es/e2e/families/hedera.js +0 -7
- package/lib-es/e2e/families/hedera.js.map +0 -1
- package/lib-es/e2e/families/sui.d.ts +0 -2
- package/lib-es/e2e/families/sui.d.ts.map +0 -1
- package/lib-es/e2e/families/sui.js +0 -7
- package/lib-es/e2e/families/sui.js.map +0 -1
- package/lib-es/families/hedera/exchange.d.ts +0 -9
- package/lib-es/families/hedera/exchange.d.ts.map +0 -1
- package/lib-es/families/hedera/exchange.js +0 -29
- package/lib-es/families/hedera/exchange.js.map +0 -1
- package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.d.ts +0 -7
- package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.d.ts.map +0 -1
- package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js +0 -217
- package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js.map +0 -1
- package/src/e2e/families/hedera.ts +0 -7
- package/src/e2e/families/sui.ts +0 -7
- package/src/families/hedera/exchange.ts +0 -48
- package/src/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.ts +0 -231
@@ -55,47 +55,47 @@ function buildTokenAccount({
|
|
55
55
|
};
|
56
56
|
}
|
57
57
|
|
58
|
-
export
|
58
|
+
export function buildSubAccounts({
|
59
59
|
currency,
|
60
60
|
accountId,
|
61
|
-
|
61
|
+
assetsBalance,
|
62
62
|
syncConfig,
|
63
63
|
operations,
|
64
64
|
getTokenFromAsset,
|
65
65
|
}: {
|
66
66
|
currency: CryptoCurrency;
|
67
67
|
accountId: string;
|
68
|
-
|
68
|
+
assetsBalance: Balance[];
|
69
69
|
syncConfig: SyncConfig;
|
70
70
|
operations: OperationCommon[];
|
71
|
-
getTokenFromAsset?: (asset: AssetInfo) =>
|
72
|
-
}):
|
71
|
+
getTokenFromAsset?: (asset: AssetInfo) => TokenCurrency | undefined;
|
72
|
+
}): TokenAccount[] | undefined {
|
73
73
|
const { blacklistedTokenIds = [] } = syncConfig;
|
74
74
|
const allTokens = listTokensForCryptoCurrency(currency);
|
75
|
-
const tokenAccounts: TokenAccount[] = [];
|
76
|
-
|
77
|
-
if (allTokens.length === 0 || allTokenAssetsBalances.length === 0) {
|
78
|
-
return tokenAccounts;
|
79
|
-
}
|
80
75
|
|
81
|
-
|
82
|
-
|
83
|
-
// NOTE: for future tokens, will need to check over currencyName/standard(erc20,trc10,trc20, etc)/id
|
84
|
-
if (token && !blacklistedTokenIds.includes(token.id)) {
|
85
|
-
tokenAccounts.push(
|
86
|
-
buildTokenAccount({
|
87
|
-
parentAccountId: accountId,
|
88
|
-
assetBalance: balance,
|
89
|
-
token,
|
90
|
-
operations: operations.filter(
|
91
|
-
op =>
|
92
|
-
op.extra.assetReference === balance.asset?.["assetReference"] &&
|
93
|
-
op.extra.assetOwner === balance.asset?.["assetOwner"], // NOTE: we could narrow type
|
94
|
-
),
|
95
|
-
}),
|
96
|
-
);
|
97
|
-
}
|
76
|
+
if (allTokens.length === 0 || assetsBalance.length === 0) {
|
77
|
+
return undefined;
|
98
78
|
}
|
99
|
-
|
79
|
+
const tokenAccounts: TokenAccount[] = [];
|
80
|
+
assetsBalance
|
81
|
+
.filter(b => b.asset.type !== "native") // NOTE: this could be removed, keeping here while fixing things up
|
82
|
+
.map(balance => {
|
83
|
+
const token = getTokenFromAsset && getTokenFromAsset(balance.asset);
|
84
|
+
// NOTE: for future tokens, will need to check over currencyName/standard(erc20,trc10,trc20, etc)/id
|
85
|
+
if (token && !blacklistedTokenIds.includes(token.id)) {
|
86
|
+
tokenAccounts.push(
|
87
|
+
buildTokenAccount({
|
88
|
+
parentAccountId: accountId,
|
89
|
+
assetBalance: balance,
|
90
|
+
token,
|
91
|
+
operations: operations.filter(
|
92
|
+
op =>
|
93
|
+
op.extra.assetReference === balance.asset?.["assetReference"] &&
|
94
|
+
op.extra.assetOwner === balance.asset?.["assetOwner"], // NOTE: we could narrow type
|
95
|
+
),
|
96
|
+
}),
|
97
|
+
);
|
98
|
+
}
|
99
|
+
});
|
100
100
|
return tokenAccounts;
|
101
101
|
}
|
@@ -30,17 +30,6 @@ export function createTransaction(account: Account | TokenAccount): GenericTrans
|
|
30
30
|
assetOwner: "",
|
31
31
|
networkInfo: null,
|
32
32
|
};
|
33
|
-
case "tezos":
|
34
|
-
// note: default transaction for tezos, mode will be set by UI (send, stake, unstake)
|
35
|
-
return {
|
36
|
-
family: currency.family,
|
37
|
-
amount: new BigNumber(0),
|
38
|
-
fees: null,
|
39
|
-
recipient: "",
|
40
|
-
useAllAmount: false,
|
41
|
-
mode: "send",
|
42
|
-
networkInfo: null,
|
43
|
-
};
|
44
33
|
case "evm": {
|
45
34
|
return {
|
46
35
|
mode: "send-eip1559",
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { encodeAccountId } from "@ledgerhq/coin-framework/account/index";
|
2
2
|
import { GetAccountShape, mergeOps } from "@ledgerhq/coin-framework/bridge/jsHelpers";
|
3
|
-
import { encodeOperationId } from "@ledgerhq/coin-framework/operation";
|
4
3
|
import BigNumber from "bignumber.js";
|
5
4
|
import { getAlpacaApi } from "./alpaca";
|
6
5
|
import { adaptCoreOperationToLiveOperation, extractBalance } from "./utils";
|
@@ -32,25 +31,18 @@ export function genericGetAccountShape(network: string, kind: string): GetAccoun
|
|
32
31
|
const balanceRes = await alpacaApi.getBalance(address);
|
33
32
|
const nativeAsset = extractBalance(balanceRes, "native");
|
34
33
|
|
35
|
-
const
|
34
|
+
const assetsBalance = balanceRes
|
35
|
+
.filter(b => b.asset.type !== "native")
|
36
|
+
.filter(b => alpacaApi.getTokenFromAsset && alpacaApi.getTokenFromAsset(b.asset));
|
36
37
|
const nativeBalance = BigInt(nativeAsset?.value ?? "0");
|
37
38
|
|
38
39
|
const spendableBalance = BigInt(nativeBalance - BigInt(nativeAsset?.locked ?? "0"));
|
39
40
|
|
40
|
-
|
41
|
-
const oldOps = ((initialAccount?.operations || []) as OperationCommon[]).map(op =>
|
42
|
-
op.accountId === accountId
|
43
|
-
? op
|
44
|
-
: { ...op, accountId, id: encodeOperationId(accountId, op.hash, op.type) },
|
45
|
-
);
|
41
|
+
const oldOps = (initialAccount?.operations || []) as OperationCommon[];
|
46
42
|
const lastPagingToken = oldOps[0]?.extra?.pagingToken || "";
|
47
43
|
|
48
|
-
|
49
|
-
|
50
|
-
if (oldOps.length > 0 && initialAccount?.blockHeight !== 0) {
|
51
|
-
minHeight = (oldOps[0].blockHeight ?? 0) + 1;
|
52
|
-
}
|
53
|
-
const paginationParams: Pagination = { minHeight, order: "asc" };
|
44
|
+
const blockHeight = oldOps.length ? (oldOps[0].blockHeight ?? 0) + 1 : 0;
|
45
|
+
const paginationParams: Pagination = { minHeight: blockHeight, order: "asc" };
|
54
46
|
if (lastPagingToken) {
|
55
47
|
paginationParams.lastPagingToken = lastPagingToken;
|
56
48
|
}
|
@@ -72,14 +64,15 @@ export function genericGetAccountShape(network: string, kind: string): GetAccoun
|
|
72
64
|
}
|
73
65
|
});
|
74
66
|
|
75
|
-
const subAccounts =
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
67
|
+
const subAccounts =
|
68
|
+
buildSubAccounts({
|
69
|
+
currency,
|
70
|
+
accountId,
|
71
|
+
assetsBalance,
|
72
|
+
syncConfig,
|
73
|
+
operations: assetOperations,
|
74
|
+
getTokenFromAsset: alpacaApi.getTokenFromAsset,
|
75
|
+
}) || [];
|
83
76
|
|
84
77
|
const operations = mergedOps.map(op => {
|
85
78
|
const subOperations = inferSubOperations(op.hash, subAccounts);
|
@@ -13,7 +13,7 @@ export function genericGetTransactionStatus(
|
|
13
13
|
return async (account, transaction: GenericTransaction) => {
|
14
14
|
const alpacaApi = getAlpacaApi(account.currency.id, kind);
|
15
15
|
const draftTransaction = {
|
16
|
-
mode: transaction?.mode
|
16
|
+
mode: transaction?.mode,
|
17
17
|
recipient: transaction.recipient,
|
18
18
|
amount: transaction.amount ?? new BigNumber(0),
|
19
19
|
useAllAmount: !!transaction.useAllAmount,
|
@@ -26,7 +26,7 @@ export function genericPrepareTransaction(
|
|
26
26
|
kind,
|
27
27
|
): AccountBridge<GenericTransaction, Account>["prepareTransaction"] {
|
28
28
|
return async (account, transaction: GenericTransaction) => {
|
29
|
-
const { getAssetFromToken, computeIntentType, estimateFees
|
29
|
+
const { getAssetFromToken, computeIntentType, estimateFees } = getAlpacaApi(
|
30
30
|
account.currency.id,
|
31
31
|
kind,
|
32
32
|
);
|
@@ -50,7 +50,7 @@ export function genericPrepareTransaction(
|
|
50
50
|
}
|
51
51
|
|
52
52
|
if (!bnEq(transaction.fees, new BigNumber(fees.toString()))) {
|
53
|
-
|
53
|
+
return {
|
54
54
|
...transaction,
|
55
55
|
fees: new BigNumber(fees.toString()),
|
56
56
|
assetReference,
|
@@ -61,52 +61,6 @@ export function genericPrepareTransaction(
|
|
61
61
|
},
|
62
62
|
},
|
63
63
|
};
|
64
|
-
|
65
|
-
// propagate storageLimit fee parameter when present (ex: tezos)
|
66
|
-
const feeEstimation = await estimateFees(
|
67
|
-
transactionToIntent(
|
68
|
-
account,
|
69
|
-
{
|
70
|
-
...transaction,
|
71
|
-
},
|
72
|
-
computeIntentType,
|
73
|
-
),
|
74
|
-
);
|
75
|
-
const params = feeEstimation?.parameters;
|
76
|
-
if (params) {
|
77
|
-
const storageLimit = params["storageLimit"];
|
78
|
-
if (
|
79
|
-
storageLimit !== undefined &&
|
80
|
-
(typeof storageLimit === "bigint" ||
|
81
|
-
typeof storageLimit === "number" ||
|
82
|
-
typeof storageLimit === "string")
|
83
|
-
) {
|
84
|
-
next.storageLimit = new BigNumber(storageLimit.toString());
|
85
|
-
// Add storageLimit to customFees parameters
|
86
|
-
if (next.customFees?.parameters) {
|
87
|
-
next.customFees.parameters.storageLimit = new BigNumber(storageLimit.toString());
|
88
|
-
}
|
89
|
-
}
|
90
|
-
}
|
91
|
-
|
92
|
-
// align with stellar/xrp: when send max (or staking intents), reflect validated amount in UI
|
93
|
-
if (
|
94
|
-
transaction.useAllAmount ||
|
95
|
-
transaction["mode"] === "stake" ||
|
96
|
-
transaction["mode"] === "unstake"
|
97
|
-
) {
|
98
|
-
const { amount } = await validateIntent(
|
99
|
-
transactionToIntent(
|
100
|
-
account,
|
101
|
-
{
|
102
|
-
...transaction,
|
103
|
-
},
|
104
|
-
computeIntentType,
|
105
|
-
),
|
106
|
-
);
|
107
|
-
next.amount = new BigNumber(amount.toString());
|
108
|
-
}
|
109
|
-
return next;
|
110
64
|
}
|
111
65
|
|
112
66
|
return transaction;
|
@@ -1,15 +1,12 @@
|
|
1
1
|
import xrpGetAddress from "@ledgerhq/coin-xrp/signer/getAddress";
|
2
2
|
import stellarGetAddress from "@ledgerhq/coin-stellar/signer/getAddress";
|
3
3
|
import Stellar from "@ledgerhq/hw-app-str";
|
4
|
-
import { signTransaction, stellarSignTransaction
|
4
|
+
import { signTransaction, stellarSignTransaction } from "./signTransaction";
|
5
5
|
import { StrKey } from "@stellar/stellar-sdk";
|
6
6
|
import { CreateSigner, executeWithSigner } from "../../setup";
|
7
7
|
import Xrp from "@ledgerhq/hw-app-xrp";
|
8
8
|
import Transport from "@ledgerhq/hw-transport";
|
9
9
|
import { AlpacaSigner } from "./types";
|
10
|
-
import { DerivationType, LedgerSigner as TaquitoLedgerSigner } from "@taquito/ledger-signer";
|
11
|
-
import tezosGetAddress from "@ledgerhq/coin-tezos/signer/getAddress";
|
12
|
-
import Tezos from "@ledgerhq/hw-app-tezos";
|
13
10
|
|
14
11
|
const createSignerXrp: CreateSigner<Xrp> = (transport: Transport) => {
|
15
12
|
return new Xrp(transport);
|
@@ -40,39 +37,6 @@ const createSignerStellar: CreateSigner<Stellar> = (transport: Transport) => {
|
|
40
37
|
|
41
38
|
const signerContextStellar = executeWithSigner(createSignerStellar);
|
42
39
|
|
43
|
-
const createSignerTezos: CreateSigner<
|
44
|
-
Tezos & { createLedgerSigner: (path: string, prompt: boolean, derivationType: number) => any }
|
45
|
-
> = (transport: Transport) => {
|
46
|
-
const tezos = new Tezos(transport);
|
47
|
-
// align with genericSignOperation that calls signer.signTransaction
|
48
|
-
return Object.assign(tezos, {
|
49
|
-
async signTransaction(path: string, rawTxHex: string) {
|
50
|
-
const { signature } = await tezos.signOperation(path, rawTxHex, {});
|
51
|
-
return signature;
|
52
|
-
},
|
53
|
-
async getAddress(path: string, { verify }: { verify?: boolean } = {}) {
|
54
|
-
// Use Taquito LedgerSigner to retrieve base58 public key and matching pkh (like oldbridge)
|
55
|
-
const ledgerSigner = new TaquitoLedgerSigner(
|
56
|
-
transport,
|
57
|
-
path,
|
58
|
-
!!verify,
|
59
|
-
DerivationType.ED25519,
|
60
|
-
);
|
61
|
-
const address = await ledgerSigner.publicKeyHash();
|
62
|
-
const publicKey = await ledgerSigner.publicKey();
|
63
|
-
return { path, address, publicKey };
|
64
|
-
},
|
65
|
-
createLedgerSigner(path: string, prompt: boolean, derivationType: number) {
|
66
|
-
// Map 0 -> ED25519, 1 -> SECP256K1, 2 -> P256 by convention
|
67
|
-
let dt: DerivationType = DerivationType.ED25519;
|
68
|
-
if (derivationType === 1) dt = DerivationType.SECP256K1;
|
69
|
-
else if (derivationType === 2) dt = DerivationType.P256;
|
70
|
-
return new TaquitoLedgerSigner(transport, path, prompt, dt);
|
71
|
-
},
|
72
|
-
});
|
73
|
-
};
|
74
|
-
const signerContextTezos = executeWithSigner(createSignerTezos);
|
75
|
-
|
76
40
|
export function getSigner(network: string): AlpacaSigner {
|
77
41
|
switch (network) {
|
78
42
|
case "ripple":
|
@@ -90,13 +54,6 @@ export function getSigner(network: string): AlpacaSigner {
|
|
90
54
|
context: signerContextStellar,
|
91
55
|
};
|
92
56
|
}
|
93
|
-
case "tezos": {
|
94
|
-
return {
|
95
|
-
getAddress: tezosGetAddress(signerContextTezos),
|
96
|
-
signTransaction: tezosSignTransaction(executeWithSigner(createSignerTezos)),
|
97
|
-
context: signerContextTezos,
|
98
|
-
};
|
99
|
-
}
|
100
57
|
}
|
101
58
|
throw new Error(`signer for ${network} not implemented`);
|
102
59
|
}
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { SignerContext } from "@ledgerhq/coin-framework/signer";
|
2
2
|
import { StellarSigner } from "@ledgerhq/coin-stellar/types/signer";
|
3
|
-
import { TezosSigner } from "@ledgerhq/coin-tezos/types/signer";
|
4
3
|
import { LegacySigner, SignTransactionOptions } from "./types";
|
5
4
|
|
6
5
|
export const signTransaction = <Signer extends LegacySigner>(
|
@@ -24,12 +23,3 @@ export const stellarSignTransaction = (signerContext: SignerContext<StellarSigne
|
|
24
23
|
return signedTx.signature.toString("base64"); // It should return a Buffer
|
25
24
|
};
|
26
25
|
};
|
27
|
-
|
28
|
-
export const tezosSignTransaction = (signerContext: SignerContext<TezosSigner>) => {
|
29
|
-
return async (deviceId: string, { path, rawTxHex }: SignTransactionOptions) => {
|
30
|
-
const signed = await signerContext(deviceId, signer =>
|
31
|
-
signer.signOperation(path, rawTxHex, {}),
|
32
|
-
);
|
33
|
-
return signed.signature;
|
34
|
-
};
|
35
|
-
};
|
@@ -35,23 +35,9 @@ const dummyAccounts = [
|
|
35
35
|
freshAddress: "s123",
|
36
36
|
pendingOperations: [],
|
37
37
|
},
|
38
|
-
{
|
39
|
-
id: "js:2:tezos:t123",
|
40
|
-
type: "Account",
|
41
|
-
spendableBalance: new BigNumber(50000000),
|
42
|
-
balance: new BigNumber(60000000),
|
43
|
-
currency: {
|
44
|
-
id: "tezos",
|
45
|
-
family: "tezos",
|
46
|
-
name: "Tezos",
|
47
|
-
units: [{ name: "XTZ", magnitude: 6 }],
|
48
|
-
},
|
49
|
-
freshAddress: "t123",
|
50
|
-
pendingOperations: [],
|
51
|
-
},
|
52
38
|
] as unknown as Account[];
|
53
39
|
|
54
|
-
["xrp", "stellar"
|
40
|
+
["xrp", "stellar"].forEach((currencyName, idx) => {
|
55
41
|
describe(`genericEstimateMaxSpendable for ${currencyName}`, () => {
|
56
42
|
const dummyAccount = dummyAccounts[idx];
|
57
43
|
|
@@ -117,11 +117,9 @@ describe("genericGetAccountShape (stellar & xrp)", () => {
|
|
117
117
|
lastPagingToken: "pt1",
|
118
118
|
});
|
119
119
|
|
120
|
-
const assetsBalancePassed = buildSubAccountsMock.mock.calls[0][0].
|
121
|
-
expect(assetsBalancePassed).
|
122
|
-
|
123
|
-
{ asset: { symbol: "TOK_IGNORE", type: "token" }, value: "5" },
|
124
|
-
]);
|
120
|
+
const assetsBalancePassed = buildSubAccountsMock.mock.calls[0][0].assetsBalance;
|
121
|
+
expect(assetsBalancePassed).toHaveLength(1);
|
122
|
+
expect(assetsBalancePassed[0].asset.symbol).toBe("TOK1");
|
125
123
|
|
126
124
|
const assetOpsPassed = buildSubAccountsMock.mock.calls[0][0].operations;
|
127
125
|
expect(assetOpsPassed).toHaveLength(1);
|
@@ -14,7 +14,7 @@ jest.mock("../utils", () => ({
|
|
14
14
|
transactionToIntent: jest.fn(),
|
15
15
|
}));
|
16
16
|
describe("genericSignOperation", () => {
|
17
|
-
const networks = ["xrp", "stellar"
|
17
|
+
const networks = ["xrp", "stellar"];
|
18
18
|
const kind = "local";
|
19
19
|
|
20
20
|
const mockSignerContext = jest.fn();
|
@@ -18,16 +18,8 @@ export type GenericTransaction = TransactionCommon & {
|
|
18
18
|
memoType?: string | null;
|
19
19
|
memoValue?: string | null;
|
20
20
|
data?: Buffer;
|
21
|
-
mode?:
|
22
|
-
| "send"
|
23
|
-
| "changeTrust"
|
24
|
-
| "send-legacy"
|
25
|
-
| "send-eip1559"
|
26
|
-
| "delegate"
|
27
|
-
| "stake"
|
28
|
-
| "undelegate"
|
29
|
-
| "unstake";
|
30
21
|
type?: number;
|
22
|
+
mode?: "send" | "changeTrust" | "send-legacy" | "send-eip1559";
|
31
23
|
assetReference?: string;
|
32
24
|
assetOwner?: string;
|
33
25
|
networkInfo?: NetworkInfo | null;
|
@@ -128,18 +128,15 @@ export function transactionToIntent(
|
|
128
128
|
data?: { type: string; value?: unknown };
|
129
129
|
} {
|
130
130
|
const intentType = (computeIntentType ?? defaultComputeIntentType)(transaction);
|
131
|
-
const isStaking = ["stake", "unstake"].includes(intentType);
|
132
|
-
const amount = isStaking ? 0n : fromBigNumberToBigInt(transaction.amount, 0n);
|
133
|
-
const useAllAmount = isStaking || !!transaction.useAllAmount;
|
134
131
|
const res: TransactionIntent & { memo?: { type: string; value?: string } } & {
|
135
132
|
data?: { type: string; value?: unknown };
|
136
133
|
} = {
|
137
134
|
type: intentType,
|
138
135
|
sender: account.freshAddress,
|
139
136
|
recipient: transaction.recipient,
|
140
|
-
amount,
|
137
|
+
amount: fromBigNumberToBigInt(transaction.amount, BigInt(0)),
|
141
138
|
asset: { type: "native", name: account.currency.name, unit: account.currency.units[0] },
|
142
|
-
useAllAmount,
|
139
|
+
useAllAmount: !!transaction.useAllAmount,
|
143
140
|
feesStrategy:
|
144
141
|
transaction.feesStrategy === "custom" ? undefined : transaction.feesStrategy ?? undefined,
|
145
142
|
data: Buffer.isBuffer(transaction.data)
|
package/src/bridge/impl.ts
CHANGED
package/src/e2e/enum/Account.ts
CHANGED
@@ -110,12 +110,6 @@ export class Account {
|
|
110
110
|
"0xa1baa625c5E6A9304cB7AcD86d2fee6B710eC3eB",
|
111
111
|
1,
|
112
112
|
);
|
113
|
-
static readonly BSC_POL = new Account(
|
114
|
-
Currency.BSC_POL,
|
115
|
-
"BNB Chain 1",
|
116
|
-
"0x4BE2E2B8872AA298D6d123b9211B53E41f611566",
|
117
|
-
0,
|
118
|
-
);
|
119
113
|
static readonly BSC_SHIBA = new Account(
|
120
114
|
Currency.BSC_SHIBA,
|
121
115
|
"BNB Chain 1",
|
@@ -248,8 +242,6 @@ export class Account {
|
|
248
242
|
undefined,
|
249
243
|
[Nft.ANTITUS, Nft.PODIUM, Nft.NY_LA_MUSE],
|
250
244
|
);
|
251
|
-
// don't use this account as a recipient, it's balance
|
252
|
-
// should stay close to null to allow for error message testing
|
253
245
|
static readonly ETH_2 = new Account(
|
254
246
|
Currency.ETH,
|
255
247
|
"Ethereum 2",
|
@@ -284,8 +276,6 @@ export class Account {
|
|
284
276
|
0,
|
285
277
|
);
|
286
278
|
|
287
|
-
static readonly HEDERA_1 = new Account(Currency.HBAR, "Hedera 1", "0.0.9374930", 0);
|
288
|
-
|
289
279
|
static readonly INJ_1 = new Account(
|
290
280
|
Currency.INJ,
|
291
281
|
"Injective 1",
|
@@ -526,19 +516,6 @@ export class Account {
|
|
526
516
|
1,
|
527
517
|
);
|
528
518
|
|
529
|
-
static readonly SUI_1 = new Account(
|
530
|
-
Currency.SUI,
|
531
|
-
"Sui 1",
|
532
|
-
"0xc6169bcce8718609e43d179b087e6c1e2ac28e5325660af34d22fb5ce284031e",
|
533
|
-
0,
|
534
|
-
);
|
535
|
-
static readonly SUI_2 = new Account(
|
536
|
-
Currency.SUI,
|
537
|
-
"Sui 2",
|
538
|
-
"0x6644c1ce77c5e5ef8d8bd3ae2a4e18239e5d418a5e0800ed5037818399e3a7f6",
|
539
|
-
1,
|
540
|
-
);
|
541
|
-
|
542
519
|
static readonly EMPTY = new Account(Currency.BTC, "Empty", "", 0);
|
543
520
|
}
|
544
521
|
|
@@ -653,24 +630,6 @@ export class TokenAccount extends Account {
|
|
653
630
|
TokenType.TRC20,
|
654
631
|
Account.TRX_1,
|
655
632
|
);
|
656
|
-
|
657
|
-
static readonly SUI_USDC_1 = new TokenAccount(
|
658
|
-
Currency.SUI_USDC,
|
659
|
-
"SUI USDC 1",
|
660
|
-
Account.SUI_1.address,
|
661
|
-
0,
|
662
|
-
TokenType.ERC20,
|
663
|
-
Account.SUI_1,
|
664
|
-
);
|
665
|
-
|
666
|
-
static readonly SUI_USDC_2 = new TokenAccount(
|
667
|
-
Currency.SUI_USDC,
|
668
|
-
"SUI USDC 2",
|
669
|
-
Account.SUI_2.address,
|
670
|
-
1,
|
671
|
-
TokenType.ERC20,
|
672
|
-
Account.SUI_2,
|
673
|
-
);
|
674
633
|
}
|
675
634
|
|
676
635
|
export type AccountType = Account | TokenAccount;
|
package/src/e2e/enum/AppInfos.ts
CHANGED
@@ -33,8 +33,6 @@ export class AppInfos {
|
|
33
33
|
|
34
34
|
static readonly STELLAR = new AppInfos("Stellar");
|
35
35
|
|
36
|
-
static readonly SUI = new AppInfos("Sui");
|
37
|
-
|
38
36
|
static readonly BITCOIN_CASH = new AppInfos("Bitcoin Cash");
|
39
37
|
|
40
38
|
static readonly ALGORAND = new AppInfos("Algorand");
|
@@ -64,6 +62,4 @@ export class AppInfos {
|
|
64
62
|
static readonly LTC = new AppInfos("Litecoin");
|
65
63
|
|
66
64
|
static readonly KASPA = new AppInfos("Kaspa");
|
67
|
-
|
68
|
-
static readonly HEDERA = new AppInfos("Hedera");
|
69
65
|
}
|
package/src/e2e/enum/Currency.ts
CHANGED
@@ -27,10 +27,6 @@ export class Currency {
|
|
27
27
|
|
28
28
|
static readonly KAS = new Currency("Kaspa", "KAS", "kaspa", AppInfos.KASPA, [Network.KASPA]);
|
29
29
|
|
30
|
-
static readonly HBAR = new Currency("Hedera", "HBAR", "hedera", AppInfos.HEDERA, [
|
31
|
-
Network.HEDERA,
|
32
|
-
]);
|
33
|
-
|
34
30
|
static readonly tBTC = new Currency(
|
35
31
|
"Bitcoin Testnet",
|
36
32
|
"𝚝BTC",
|
@@ -83,7 +79,6 @@ export class Currency {
|
|
83
79
|
static readonly XLM = new Currency("Stellar", "XLM", "stellar", AppInfos.STELLAR, [
|
84
80
|
Network.STELLAR,
|
85
81
|
]);
|
86
|
-
static readonly SUI = new Currency("Sui", "SUI", "sui", AppInfos.SUI, [Network.SUI]);
|
87
82
|
static readonly BCH = new Currency("Bitcoin Cash", "BCH", "bitcoin_cash", AppInfos.BITCOIN_CASH, [
|
88
83
|
Network.BITCOIN_CASH,
|
89
84
|
]);
|
@@ -157,13 +152,6 @@ export class Currency {
|
|
157
152
|
AppInfos.BNB_CHAIN,
|
158
153
|
[Network.BNB_CHAIN, Network.POLYGON],
|
159
154
|
);
|
160
|
-
static readonly BSC_POL = new Currency(
|
161
|
-
"Matic Token",
|
162
|
-
"MATIC",
|
163
|
-
"bsc/bep20/matic_token",
|
164
|
-
AppInfos.BNB_CHAIN,
|
165
|
-
[Network.BNB_CHAIN],
|
166
|
-
);
|
167
155
|
static readonly BSC_SHIBA = new Currency("Shiba Inu", "SHIB", "bsc", AppInfos.BNB_CHAIN, [
|
168
156
|
Network.BNB_CHAIN,
|
169
157
|
Network.ETHEREUM,
|
@@ -208,13 +196,4 @@ export class Currency {
|
|
208
196
|
static readonly OP = new Currency("OP Mainnet", "OP", "optimism", AppInfos.ETHEREUM, [
|
209
197
|
Network.OPTIMISM,
|
210
198
|
]);
|
211
|
-
|
212
|
-
static readonly SUI_USDC = new Currency(
|
213
|
-
"USDC",
|
214
|
-
"USDC",
|
215
|
-
"sui/coin/usdc_0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::usdc",
|
216
|
-
AppInfos.SUI,
|
217
|
-
[Network.SUI],
|
218
|
-
"0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7",
|
219
|
-
);
|
220
199
|
}
|
package/src/e2e/enum/Network.ts
CHANGED
@@ -16,7 +16,6 @@ export enum Network {
|
|
16
16
|
XRP = "XRP",
|
17
17
|
CARDANO = "Cardano",
|
18
18
|
STELLAR = "Stellar",
|
19
|
-
SUI = "Sui",
|
20
19
|
BITCOIN_CASH = "Bitcoin Cash",
|
21
20
|
ALGORAND = "Algorand",
|
22
21
|
COSMOS = "Cosmos",
|
@@ -33,5 +32,4 @@ export enum Network {
|
|
33
32
|
MULTIVERS_X = "MultiversX",
|
34
33
|
LITECOIN = "Litecoin",
|
35
34
|
KASPA = "Kaspa",
|
36
|
-
HEDERA = "Hedera",
|
37
35
|
}
|
@@ -2,11 +2,8 @@ export enum TransactionStatus {
|
|
2
2
|
RECEIVED = "Received",
|
3
3
|
DELEGATED = "Delegated",
|
4
4
|
NFT_RECEIVED = "NFT Received",
|
5
|
-
SEND = "Send",
|
6
5
|
SENT = "Sent",
|
7
6
|
FEES = "Fees",
|
8
7
|
STAKED = "Staked",
|
9
8
|
SENDING = "Sending",
|
10
|
-
TRANSACTION_SENT = "Transaction sent",
|
11
|
-
CONFIRMED = "Confirmed",
|
12
9
|
}
|