@ledgerhq/live-common 34.50.0-nightly.1 → 34.50.0-nightly.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/bridge/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/getAccountShape.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/getAccountShape.js +4 -6
- package/lib/bridge/generic-alpaca/getAccountShape.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/e2e/enum/Account.d.ts +6 -0
- package/lib/e2e/enum/Account.d.ts.map +1 -1
- package/lib/e2e/enum/Account.js +8 -0
- package/lib/e2e/enum/Account.js.map +1 -1
- package/lib/e2e/enum/AppInfos.d.ts +2 -0
- package/lib/e2e/enum/AppInfos.d.ts.map +1 -1
- package/lib/e2e/enum/AppInfos.js +2 -0
- package/lib/e2e/enum/AppInfos.js.map +1 -1
- package/lib/e2e/enum/Currency.d.ts +4 -0
- package/lib/e2e/enum/Currency.d.ts.map +1 -1
- package/lib/e2e/enum/Currency.js +6 -0
- package/lib/e2e/enum/Currency.js.map +1 -1
- package/lib/e2e/enum/Network.d.ts +3 -1
- package/lib/e2e/enum/Network.d.ts.map +1 -1
- package/lib/e2e/enum/Network.js +2 -0
- package/lib/e2e/enum/Network.js.map +1 -1
- package/lib/e2e/enum/TokenType.d.ts +2 -1
- package/lib/e2e/enum/TokenType.d.ts.map +1 -1
- package/lib/e2e/enum/TokenType.js +1 -0
- package/lib/e2e/enum/TokenType.js.map +1 -1
- package/lib/e2e/enum/TransactionStatus.d.ts +4 -1
- package/lib/e2e/enum/TransactionStatus.d.ts.map +1 -1
- package/lib/e2e/enum/TransactionStatus.js +3 -0
- package/lib/e2e/enum/TransactionStatus.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/families/sui.d.ts +2 -0
- package/lib/e2e/families/sui.d.ts.map +1 -0
- package/lib/e2e/families/sui.js +11 -0
- package/lib/e2e/families/sui.js.map +1 -0
- package/lib/e2e/speculos.d.ts +1 -0
- package/lib/e2e/speculos.d.ts.map +1 -1
- package/lib/e2e/speculos.js +35 -1
- package/lib/e2e/speculos.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/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/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/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/useRightBalanceAsset.d.ts +4 -3
- package/lib/modularDrawer/hooks/useRightBalanceAsset.d.ts.map +1 -1
- package/lib/modularDrawer/hooks/useRightBalanceAsset.js +13 -47
- package/lib/modularDrawer/hooks/useRightBalanceAsset.js.map +1 -1
- package/lib/modularDrawer/hooks/useRightBalanceNetwork.d.ts +1 -5
- package/lib/modularDrawer/hooks/useRightBalanceNetwork.d.ts.map +1 -1
- package/lib/modularDrawer/hooks/useRightBalanceNetwork.js +15 -55
- 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 +1 -3
- package/lib/modularDrawer/modules/createNetworkConfiguration.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/index.d.ts +3 -6
- package/lib/modularDrawer/utils/index.d.ts.map +1 -1
- package/lib/modularDrawer/utils/index.js +3 -12
- 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/type.d.ts +0 -6
- 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/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/getAccountShape.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/getAccountShape.js +4 -6
- package/lib-es/bridge/generic-alpaca/getAccountShape.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/e2e/enum/Account.d.ts +6 -0
- package/lib-es/e2e/enum/Account.d.ts.map +1 -1
- package/lib-es/e2e/enum/Account.js +8 -0
- package/lib-es/e2e/enum/Account.js.map +1 -1
- package/lib-es/e2e/enum/AppInfos.d.ts +2 -0
- package/lib-es/e2e/enum/AppInfos.d.ts.map +1 -1
- package/lib-es/e2e/enum/AppInfos.js +2 -0
- package/lib-es/e2e/enum/AppInfos.js.map +1 -1
- package/lib-es/e2e/enum/Currency.d.ts +4 -0
- package/lib-es/e2e/enum/Currency.d.ts.map +1 -1
- package/lib-es/e2e/enum/Currency.js +6 -0
- package/lib-es/e2e/enum/Currency.js.map +1 -1
- package/lib-es/e2e/enum/Network.d.ts +3 -1
- package/lib-es/e2e/enum/Network.d.ts.map +1 -1
- package/lib-es/e2e/enum/Network.js +2 -0
- package/lib-es/e2e/enum/Network.js.map +1 -1
- package/lib-es/e2e/enum/TokenType.d.ts +2 -1
- package/lib-es/e2e/enum/TokenType.d.ts.map +1 -1
- package/lib-es/e2e/enum/TokenType.js +1 -0
- package/lib-es/e2e/enum/TokenType.js.map +1 -1
- package/lib-es/e2e/enum/TransactionStatus.d.ts +4 -1
- package/lib-es/e2e/enum/TransactionStatus.d.ts.map +1 -1
- package/lib-es/e2e/enum/TransactionStatus.js +3 -0
- package/lib-es/e2e/enum/TransactionStatus.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/families/sui.d.ts +2 -0
- package/lib-es/e2e/families/sui.d.ts.map +1 -0
- package/lib-es/e2e/families/sui.js +7 -0
- package/lib-es/e2e/families/sui.js.map +1 -0
- package/lib-es/e2e/speculos.d.ts +1 -0
- package/lib-es/e2e/speculos.d.ts.map +1 -1
- package/lib-es/e2e/speculos.js +33 -0
- package/lib-es/e2e/speculos.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/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/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/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/useRightBalanceAsset.d.ts +4 -3
- package/lib-es/modularDrawer/hooks/useRightBalanceAsset.d.ts.map +1 -1
- package/lib-es/modularDrawer/hooks/useRightBalanceAsset.js +13 -47
- package/lib-es/modularDrawer/hooks/useRightBalanceAsset.js.map +1 -1
- package/lib-es/modularDrawer/hooks/useRightBalanceNetwork.d.ts +1 -5
- package/lib-es/modularDrawer/hooks/useRightBalanceNetwork.d.ts.map +1 -1
- package/lib-es/modularDrawer/hooks/useRightBalanceNetwork.js +15 -55
- 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 +1 -3
- 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/currencyUtils.d.ts.map +1 -1
- package/lib-es/modularDrawer/utils/currencyUtils.js.map +1 -1
- package/lib-es/modularDrawer/utils/index.d.ts +3 -6
- package/lib-es/modularDrawer/utils/index.d.ts.map +1 -1
- package/lib-es/modularDrawer/utils/index.js +3 -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/type.d.ts +0 -6
- 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 +45 -43
- package/src/bridge/generic-alpaca/buildSubAccounts.ts +28 -28
- package/src/bridge/generic-alpaca/getAccountShape.ts +9 -12
- package/src/bridge/generic-alpaca/tests/getAccountShape.test.ts +5 -3
- package/src/e2e/enum/Account.ts +41 -0
- package/src/e2e/enum/AppInfos.ts +4 -0
- package/src/e2e/enum/Currency.ts +21 -0
- package/src/e2e/enum/Network.ts +2 -0
- package/src/e2e/enum/TokenType.ts +1 -0
- package/src/e2e/enum/TransactionStatus.ts +3 -0
- package/src/e2e/families/hedera.ts +7 -0
- package/src/e2e/families/sui.ts +7 -0
- package/src/e2e/speculos.ts +34 -0
- 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/families/hedera/exchange.ts +48 -0
- package/src/hw/actions/completeExchange.ts +3 -0
- package/src/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.ts +231 -0
- package/src/modularDrawer/hooks/useRightBalanceAsset.tsx +16 -76
- package/src/modularDrawer/hooks/useRightBalanceNetwork.tsx +25 -95
- package/src/modularDrawer/modules/createAssetConfiguration.ts +3 -11
- package/src/modularDrawer/modules/createNetworkConfiguration.ts +1 -8
- package/src/modularDrawer/utils/__tests__/currencyUtils.test.ts +1 -1
- package/src/modularDrawer/utils/currencyUtils.ts +0 -1
- package/src/modularDrawer/utils/index.test.ts +1 -32
- package/src/modularDrawer/utils/index.ts +4 -23
- package/src/modularDrawer/utils/type.ts +0 -6
- 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/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-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/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/src/modularDrawer/utils/__tests__/haveOneCommonProvider.test.ts +0 -34
- package/src/modularDrawer/utils/buildProviderCurrenciesMap.tsx +0 -25
- package/src/modularDrawer/utils/getProviderCurrency.ts +0 -13
- package/src/modularDrawer/utils/haveOneCommonProvider.ts +0 -31
package/src/e2e/enum/Account.ts
CHANGED
@@ -110,6 +110,12 @@ 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
|
+
);
|
113
119
|
static readonly BSC_SHIBA = new Account(
|
114
120
|
Currency.BSC_SHIBA,
|
115
121
|
"BNB Chain 1",
|
@@ -242,6 +248,8 @@ export class Account {
|
|
242
248
|
undefined,
|
243
249
|
[Nft.ANTITUS, Nft.PODIUM, Nft.NY_LA_MUSE],
|
244
250
|
);
|
251
|
+
// don't use this account as a recipient, it's balance
|
252
|
+
// should stay close to null to allow for error message testing
|
245
253
|
static readonly ETH_2 = new Account(
|
246
254
|
Currency.ETH,
|
247
255
|
"Ethereum 2",
|
@@ -276,6 +284,8 @@ export class Account {
|
|
276
284
|
0,
|
277
285
|
);
|
278
286
|
|
287
|
+
static readonly HEDERA_1 = new Account(Currency.HBAR, "Hedera 1", "0.0.9374930", 0);
|
288
|
+
|
279
289
|
static readonly INJ_1 = new Account(
|
280
290
|
Currency.INJ,
|
281
291
|
"Injective 1",
|
@@ -516,6 +526,19 @@ export class Account {
|
|
516
526
|
1,
|
517
527
|
);
|
518
528
|
|
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
|
+
|
519
542
|
static readonly EMPTY = new Account(Currency.BTC, "Empty", "", 0);
|
520
543
|
}
|
521
544
|
|
@@ -630,6 +653,24 @@ export class TokenAccount extends Account {
|
|
630
653
|
TokenType.TRC20,
|
631
654
|
Account.TRX_1,
|
632
655
|
);
|
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
|
+
);
|
633
674
|
}
|
634
675
|
|
635
676
|
export type AccountType = Account | TokenAccount;
|
package/src/e2e/enum/AppInfos.ts
CHANGED
@@ -33,6 +33,8 @@ export class AppInfos {
|
|
33
33
|
|
34
34
|
static readonly STELLAR = new AppInfos("Stellar");
|
35
35
|
|
36
|
+
static readonly SUI = new AppInfos("Sui");
|
37
|
+
|
36
38
|
static readonly BITCOIN_CASH = new AppInfos("Bitcoin Cash");
|
37
39
|
|
38
40
|
static readonly ALGORAND = new AppInfos("Algorand");
|
@@ -62,4 +64,6 @@ export class AppInfos {
|
|
62
64
|
static readonly LTC = new AppInfos("Litecoin");
|
63
65
|
|
64
66
|
static readonly KASPA = new AppInfos("Kaspa");
|
67
|
+
|
68
|
+
static readonly HEDERA = new AppInfos("Hedera");
|
65
69
|
}
|
package/src/e2e/enum/Currency.ts
CHANGED
@@ -27,6 +27,10 @@ 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
|
+
|
30
34
|
static readonly tBTC = new Currency(
|
31
35
|
"Bitcoin Testnet",
|
32
36
|
"𝚝BTC",
|
@@ -79,6 +83,7 @@ export class Currency {
|
|
79
83
|
static readonly XLM = new Currency("Stellar", "XLM", "stellar", AppInfos.STELLAR, [
|
80
84
|
Network.STELLAR,
|
81
85
|
]);
|
86
|
+
static readonly SUI = new Currency("Sui", "SUI", "sui", AppInfos.SUI, [Network.SUI]);
|
82
87
|
static readonly BCH = new Currency("Bitcoin Cash", "BCH", "bitcoin_cash", AppInfos.BITCOIN_CASH, [
|
83
88
|
Network.BITCOIN_CASH,
|
84
89
|
]);
|
@@ -152,6 +157,13 @@ export class Currency {
|
|
152
157
|
AppInfos.BNB_CHAIN,
|
153
158
|
[Network.BNB_CHAIN, Network.POLYGON],
|
154
159
|
);
|
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
|
+
);
|
155
167
|
static readonly BSC_SHIBA = new Currency("Shiba Inu", "SHIB", "bsc", AppInfos.BNB_CHAIN, [
|
156
168
|
Network.BNB_CHAIN,
|
157
169
|
Network.ETHEREUM,
|
@@ -196,4 +208,13 @@ export class Currency {
|
|
196
208
|
static readonly OP = new Currency("OP Mainnet", "OP", "optimism", AppInfos.ETHEREUM, [
|
197
209
|
Network.OPTIMISM,
|
198
210
|
]);
|
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
|
+
);
|
199
220
|
}
|
package/src/e2e/enum/Network.ts
CHANGED
@@ -16,6 +16,7 @@ export enum Network {
|
|
16
16
|
XRP = "XRP",
|
17
17
|
CARDANO = "Cardano",
|
18
18
|
STELLAR = "Stellar",
|
19
|
+
SUI = "Sui",
|
19
20
|
BITCOIN_CASH = "Bitcoin Cash",
|
20
21
|
ALGORAND = "Algorand",
|
21
22
|
COSMOS = "Cosmos",
|
@@ -32,4 +33,5 @@ export enum Network {
|
|
32
33
|
MULTIVERS_X = "MultiversX",
|
33
34
|
LITECOIN = "Litecoin",
|
34
35
|
KASPA = "Kaspa",
|
36
|
+
HEDERA = "Hedera",
|
35
37
|
}
|
@@ -2,8 +2,11 @@ export enum TransactionStatus {
|
|
2
2
|
RECEIVED = "Received",
|
3
3
|
DELEGATED = "Delegated",
|
4
4
|
NFT_RECEIVED = "NFT Received",
|
5
|
+
SEND = "Send",
|
5
6
|
SENT = "Sent",
|
6
7
|
FEES = "Fees",
|
7
8
|
STAKED = "Staked",
|
8
9
|
SENDING = "Sending",
|
10
|
+
TRANSACTION_SENT = "Transaction sent",
|
11
|
+
CONFIRMED = "Confirmed",
|
9
12
|
}
|
package/src/e2e/speculos.ts
CHANGED
@@ -28,6 +28,7 @@ import { sendStellar } from "./families/stellar";
|
|
28
28
|
import { delegateCardano, sendCardano } from "./families/cardano";
|
29
29
|
import { sendXRP } from "./families/xrp";
|
30
30
|
import { delegateAptos, sendAptos } from "./families/aptos";
|
31
|
+
import { sendHedera } from "./families/hedera";
|
31
32
|
import { delegateNear } from "./families/near";
|
32
33
|
import { delegateCosmos, sendCosmos } from "./families/cosmos";
|
33
34
|
import { sendKaspa } from "./families/kaspa";
|
@@ -41,6 +42,7 @@ import { Swap } from "./models/Swap";
|
|
41
42
|
import { delegateOsmosis } from "./families/osmosis";
|
42
43
|
import { AppInfos } from "./enum/AppInfos";
|
43
44
|
import { DEVICE_LABELS_CONFIG } from "./data/deviceLabelsData";
|
45
|
+
import { sendSui } from "./families/sui";
|
44
46
|
|
45
47
|
const isSpeculosRemote = process.env.REMOTE_SPECULOS === "true";
|
46
48
|
|
@@ -222,6 +224,14 @@ export const specs: Specs = {
|
|
222
224
|
},
|
223
225
|
dependency: "",
|
224
226
|
},
|
227
|
+
Sui: {
|
228
|
+
currency: getCryptoCurrencyById("sui"),
|
229
|
+
appQuery: {
|
230
|
+
model: getSpeculosModel(),
|
231
|
+
appName: "Sui",
|
232
|
+
},
|
233
|
+
dependency: "",
|
234
|
+
},
|
225
235
|
Bitcoin_Cash: {
|
226
236
|
currency: getCryptoCurrencyById("bitcoin_cash"),
|
227
237
|
appQuery: {
|
@@ -335,6 +345,14 @@ export const specs: Specs = {
|
|
335
345
|
},
|
336
346
|
dependency: "",
|
337
347
|
},
|
348
|
+
Hedera: {
|
349
|
+
currency: getCryptoCurrencyById("hedera"),
|
350
|
+
appQuery: {
|
351
|
+
model: getSpeculosModel(),
|
352
|
+
appName: "Hedera",
|
353
|
+
},
|
354
|
+
dependency: "",
|
355
|
+
},
|
338
356
|
};
|
339
357
|
|
340
358
|
export async function startSpeculos(
|
@@ -623,6 +641,10 @@ export async function goToSettings() {
|
|
623
641
|
await pressBoth();
|
624
642
|
}
|
625
643
|
|
644
|
+
export async function providePublicKey() {
|
645
|
+
await pressRightButton();
|
646
|
+
}
|
647
|
+
|
626
648
|
type DeviceLabelsReturn = {
|
627
649
|
delegateConfirmLabel: string;
|
628
650
|
delegateVerifyLabel: string;
|
@@ -651,6 +673,9 @@ export function getDeviceLabels(appInfo: AppInfos): DeviceLabelsReturn {
|
|
651
673
|
}
|
652
674
|
|
653
675
|
export async function expectValidAddressDevice(account: Account, addressDisplayed: string) {
|
676
|
+
if (account.currency === Currency.SUI_USDC) {
|
677
|
+
providePublicKey();
|
678
|
+
}
|
654
679
|
const { receiveVerifyLabel, receiveConfirmLabel } = getDeviceLabels(account.currency.speculosApp);
|
655
680
|
|
656
681
|
await waitFor(receiveVerifyLabel);
|
@@ -709,6 +734,15 @@ export async function signSendTransaction(tx: Transaction) {
|
|
709
734
|
case Currency.KAS:
|
710
735
|
await sendKaspa();
|
711
736
|
break;
|
737
|
+
case Currency.HBAR:
|
738
|
+
await sendHedera();
|
739
|
+
break;
|
740
|
+
case Currency.SUI:
|
741
|
+
await sendSui();
|
742
|
+
break;
|
743
|
+
case Currency.SUI_USDC:
|
744
|
+
await sendSui();
|
745
|
+
break;
|
712
746
|
default:
|
713
747
|
throw new Error(`Unsupported currency: ${currencyName.ticker}`);
|
714
748
|
}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import type { DeviceModelId } from "@ledgerhq/devices";
|
1
2
|
import { CryptoOrTokenCurrency } from "@ledgerhq/types-cryptoassets";
|
2
3
|
import type { Account, AccountLike, AccountRaw, AccountRawLike } from "@ledgerhq/types-live";
|
3
4
|
import type { ExchangeTypes, RateTypes } from "@ledgerhq/hw-app-exchange";
|
@@ -42,6 +43,7 @@ export type StartExchangeInput = {
|
|
42
43
|
|
43
44
|
interface CompleteExchangeInputCommon {
|
44
45
|
rateType?: RateTypes;
|
46
|
+
deviceModelId?: DeviceModelId;
|
45
47
|
deviceId?: string;
|
46
48
|
provider: string;
|
47
49
|
binaryPayload: string;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import type { Account } from "@ledgerhq/types-live";
|
1
2
|
import {
|
2
3
|
DisconnectedDeviceDuringOperation,
|
3
4
|
TransportStatusError,
|
@@ -13,12 +14,14 @@ import {
|
|
13
14
|
import { getDefaultAccountName } from "@ledgerhq/live-wallet/accountName";
|
14
15
|
import { log } from "@ledgerhq/logs";
|
15
16
|
import BigNumber from "bignumber.js";
|
17
|
+
import invariant from "invariant";
|
16
18
|
import { Observable } from "rxjs";
|
17
19
|
import { secp256k1 } from "@noble/curves/secp256k1";
|
18
20
|
import { getCurrencyExchangeConfig } from "../";
|
19
21
|
import { getAccountCurrency, getMainAccount } from "../../account";
|
20
22
|
import { getAccountBridge } from "../../bridge";
|
21
23
|
import { TransactionRefusedOnDevice } from "../../errors";
|
24
|
+
import { handleHederaTrustedFlow } from "../../families/hedera/exchange";
|
22
25
|
import { withDevicePromise } from "../../hw/deviceAccess";
|
23
26
|
import { delay } from "../../promise";
|
24
27
|
import { CompleteExchangeStep, convertTransportError } from "../error";
|
@@ -27,6 +30,7 @@ import { convertToAppExchangePartnerKey, getSwapProvider } from "../providers";
|
|
27
30
|
import { CEXProviderConfig } from "../providers/swap";
|
28
31
|
import { isAddressSanctioned } from "@ledgerhq/coin-framework/sanction/index";
|
29
32
|
import { AddressesSanctionedError } from "@ledgerhq/coin-framework/sanction/errors";
|
33
|
+
import { getCryptoCurrencyById } from "../../currencies";
|
30
34
|
|
31
35
|
const COMPLETE_EXCHANGE_LOG = "SWAP-CompleteExchange";
|
32
36
|
|
@@ -34,8 +38,16 @@ const completeExchange = (
|
|
34
38
|
input: CompleteExchangeInputSwap,
|
35
39
|
): Observable<CompleteExchangeRequestEvent> => {
|
36
40
|
let { transaction } = input; // TODO build a tx from the data
|
37
|
-
|
38
|
-
|
41
|
+
const {
|
42
|
+
deviceId,
|
43
|
+
deviceModelId,
|
44
|
+
exchange,
|
45
|
+
provider,
|
46
|
+
binaryPayload,
|
47
|
+
signature,
|
48
|
+
rateType,
|
49
|
+
exchangeType,
|
50
|
+
} = input;
|
39
51
|
|
40
52
|
const { fromAccount, fromParentAccount } = exchange;
|
41
53
|
const { toAccount, toParentAccount } = exchange;
|
@@ -152,6 +164,24 @@ const completeExchange = (
|
|
152
164
|
await exchange.checkTransactionSignature(goodSign);
|
153
165
|
if (unsubscribed) return;
|
154
166
|
|
167
|
+
// Hedera swap payload is filled with user account address,
|
168
|
+
// but the device app requires the related public key for verification.
|
169
|
+
// Since this key is stored on-chain, we use the TrustedService
|
170
|
+
// to fetch a signed descriptor linking the address to its public key.
|
171
|
+
const hederaCurrency = getCryptoCurrencyById("hedera");
|
172
|
+
let hederaAccount: Account | null = null;
|
173
|
+
if (payoutAccount.currency.family === hederaCurrency.family) {
|
174
|
+
hederaAccount = payoutAccount;
|
175
|
+
} else if (refundAccount.currency.family === hederaCurrency.family) {
|
176
|
+
hederaAccount = refundAccount;
|
177
|
+
}
|
178
|
+
|
179
|
+
if (hederaAccount) {
|
180
|
+
invariant(deviceModelId, "hedera: deviceModelId is not available");
|
181
|
+
await handleHederaTrustedFlow({ exchange, hederaAccount, deviceModelId });
|
182
|
+
if (unsubscribed) return;
|
183
|
+
}
|
184
|
+
|
155
185
|
const payoutAddressParameters = payoutAccountBridge.getSerializedAddressParameters(
|
156
186
|
payoutAccount,
|
157
187
|
mainPayoutCurrency.id,
|
@@ -59,6 +59,10 @@ const INCOMPATIBLE_NANO_S_CURRENCY_KEYS: Keys = {
|
|
59
59
|
title: "swap.incompatibility.cosmos_title",
|
60
60
|
description: "swap.incompatibility.cosmos_description",
|
61
61
|
},
|
62
|
+
hedera: {
|
63
|
+
title: "swap.incompatibility.hedera_title",
|
64
|
+
description: "swap.incompatibility.hedera_description",
|
65
|
+
},
|
62
66
|
osmo: {
|
63
67
|
title: "swap.incompatibility.osmo_title",
|
64
68
|
description: "swap.incompatibility.osmo_description",
|
@@ -71,6 +75,10 @@ const INCOMPATIBLE_NANO_S_CURRENCY_KEYS: Keys = {
|
|
71
75
|
title: "swap.incompatibility.sui_title",
|
72
76
|
description: "swap.incompatibility.sui_description",
|
73
77
|
},
|
78
|
+
kaspa: {
|
79
|
+
title: "swap.incompatibility.kaspa_title",
|
80
|
+
description: "swap.incompatibility.kaspa_description",
|
81
|
+
},
|
74
82
|
};
|
75
83
|
|
76
84
|
export const getIncompatibleCurrencyKeys = (exchange: ExchangeSwap) => {
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import { LatestFirmwareVersionRequired, TransportStatusError } from "@ledgerhq/errors";
|
2
|
+
import Exchange from "@ledgerhq/hw-app-exchange";
|
3
|
+
import { loadPKI } from "@ledgerhq/hw-bolos";
|
4
|
+
import calService from "@ledgerhq/ledger-cal-service";
|
5
|
+
import trustService from "@ledgerhq/ledger-trust-service";
|
6
|
+
import { getEnv } from "@ledgerhq/live-env";
|
7
|
+
import { DeviceModelId } from "@ledgerhq/types-devices";
|
8
|
+
import { Account } from "@ledgerhq/types-live";
|
9
|
+
|
10
|
+
function isPKIUnsupportedError(err: unknown): err is TransportStatusError {
|
11
|
+
return err instanceof TransportStatusError && err.message.includes("0x6a81");
|
12
|
+
}
|
13
|
+
|
14
|
+
export async function handleHederaTrustedFlow({
|
15
|
+
exchange,
|
16
|
+
hederaAccount,
|
17
|
+
deviceModelId,
|
18
|
+
}: {
|
19
|
+
exchange: Exchange;
|
20
|
+
hederaAccount: Account;
|
21
|
+
deviceModelId: DeviceModelId;
|
22
|
+
}) {
|
23
|
+
const serviceEnv = getEnv("MOCK_EXCHANGE_TEST_CONFIG") ? "test" : "prod";
|
24
|
+
|
25
|
+
const cert = await calService.getCertificate(deviceModelId, "trusted_name", "latest", {
|
26
|
+
env: serviceEnv,
|
27
|
+
signatureKind: serviceEnv,
|
28
|
+
});
|
29
|
+
|
30
|
+
try {
|
31
|
+
await loadPKI(exchange.transport, "TRUSTED_NAME", cert.descriptor, cert.signature);
|
32
|
+
} catch (err) {
|
33
|
+
if (isPKIUnsupportedError(err)) {
|
34
|
+
throw new LatestFirmwareVersionRequired("LatestFirmwareVersionRequired");
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
const challenge = await exchange.getChallenge();
|
39
|
+
const hexChallenge = challenge.toString(16);
|
40
|
+
|
41
|
+
const trustServiceResult = await trustService.hedera.getPublicKey(
|
42
|
+
hederaAccount.freshAddress,
|
43
|
+
hexChallenge,
|
44
|
+
);
|
45
|
+
const signedDescriptorBuffer = Buffer.from(trustServiceResult.signedDescriptor, "hex");
|
46
|
+
|
47
|
+
await exchange.sendTrustedDescriptor(signedDescriptorBuffer);
|
48
|
+
}
|
@@ -3,6 +3,7 @@ import { scan, tap } from "rxjs/operators";
|
|
3
3
|
import { useEffect, useState } from "react";
|
4
4
|
import type { Action, Device } from "./types";
|
5
5
|
import type { AppState } from "./app";
|
6
|
+
import type { DeviceModelId } from "@ledgerhq/devices";
|
6
7
|
import { log } from "@ledgerhq/logs";
|
7
8
|
import { Exchange } from "../../exchange/types";
|
8
9
|
import { Transaction } from "../../generated/types";
|
@@ -18,6 +19,7 @@ type State = {
|
|
18
19
|
|
19
20
|
type CompleteExchangeState = AppState & State;
|
20
21
|
type CompleteExchangeRequest = {
|
22
|
+
deviceModelId?: DeviceModelId;
|
21
23
|
deviceId?: string;
|
22
24
|
provider: string;
|
23
25
|
transaction: Transaction;
|
@@ -130,6 +132,7 @@ export const createAction = (
|
|
130
132
|
}),
|
131
133
|
completeExchangeExec({
|
132
134
|
deviceId: reduxDeviceFrozen?.deviceId,
|
135
|
+
deviceModelId: reduxDeviceFrozen?.modelId,
|
133
136
|
provider,
|
134
137
|
transaction,
|
135
138
|
binaryPayload,
|
@@ -0,0 +1,231 @@
|
|
1
|
+
import { useMemo } from "react";
|
2
|
+
import { CryptoCurrencyId } from "@ledgerhq/types-cryptoassets";
|
3
|
+
import { Feature } from "@ledgerhq/types-live";
|
4
|
+
import { useFeature } from "../../featureFlags";
|
5
|
+
import useEnv from "../../hooks/useEnv";
|
6
|
+
|
7
|
+
export function useCurrenciesUnderFeatureFlag() {
|
8
|
+
const mock = useEnv("MOCK");
|
9
|
+
|
10
|
+
const aptos = useFeature("currencyAptos");
|
11
|
+
const aptosTestnet = useFeature("currencyAptosTestnet");
|
12
|
+
const axelar = useFeature("currencyAxelar");
|
13
|
+
const stargaze = useFeature("currencyStargaze");
|
14
|
+
const secretNetwork = useFeature("currencySecretNetwork");
|
15
|
+
const umee = useFeature("currencyUmee");
|
16
|
+
const desmos = useFeature("currencyDesmos");
|
17
|
+
const dydx = useFeature("currencyDydx");
|
18
|
+
const onomy = useFeature("currencyOnomy");
|
19
|
+
const seiNetwork = useFeature("currencySeiNetwork");
|
20
|
+
const quicksilver = useFeature("currencyQuicksilver");
|
21
|
+
const persistence = useFeature("currencyPersistence");
|
22
|
+
const avaxCChain = useFeature("currencyAvalancheCChain");
|
23
|
+
const stacks = useFeature("currencyStacks");
|
24
|
+
const optimism = useFeature("currencyOptimism");
|
25
|
+
const optimismSepolia = useFeature("currencyOptimismSepolia");
|
26
|
+
const arbitrum = useFeature("currencyArbitrum");
|
27
|
+
const arbitrumSepolia = useFeature("currencyArbitrumSepolia");
|
28
|
+
const rsk = useFeature("currencyRsk");
|
29
|
+
const bittorrent = useFeature("currencyBittorrent");
|
30
|
+
const energyWeb = useFeature("currencyEnergyWeb");
|
31
|
+
const astar = useFeature("currencyAstar");
|
32
|
+
const metis = useFeature("currencyMetis");
|
33
|
+
const boba = useFeature("currencyBoba");
|
34
|
+
const moonriver = useFeature("currencyMoonriver");
|
35
|
+
const velasEvm = useFeature("currencyVelasEvm");
|
36
|
+
const syscoin = useFeature("currencySyscoin");
|
37
|
+
const internetComputer = useFeature("currencyInternetComputer");
|
38
|
+
const telosEvm = useFeature("currencyTelosEvm");
|
39
|
+
const coreum = useFeature("currencyCoreum");
|
40
|
+
const polygonZkEvm = useFeature("currencyPolygonZkEvm");
|
41
|
+
const polygonZkEvmTestnet = useFeature("currencyPolygonZkEvmTestnet");
|
42
|
+
const base = useFeature("currencyBase");
|
43
|
+
const baseSepolia = useFeature("currencyBaseSepolia");
|
44
|
+
const klaytn = useFeature("currencyKlaytn");
|
45
|
+
const injective = useFeature("currencyInjective");
|
46
|
+
const vechain = useFeature("currencyVechain");
|
47
|
+
const casper = useFeature("currencyCasper");
|
48
|
+
const neonEvm = useFeature("currencyNeonEvm");
|
49
|
+
const lukso = useFeature("currencyLukso");
|
50
|
+
const linea = useFeature("currencyLinea");
|
51
|
+
const lineaSepolia = useFeature("currencyLineaSepolia");
|
52
|
+
const blast = useFeature("currencyBlast");
|
53
|
+
const blastSepolia = useFeature("currencyBlastSepolia");
|
54
|
+
const scroll = useFeature("currencyScroll");
|
55
|
+
const scrollSepolia = useFeature("currencyScrollSepolia");
|
56
|
+
const icon = useFeature("currencyIcon");
|
57
|
+
const ton = useFeature("currencyTon");
|
58
|
+
const etherlink = useFeature("currencyEtherlink");
|
59
|
+
const zksync = useFeature("currencyZkSync");
|
60
|
+
const zksyncSepolia = useFeature("currencyZkSyncSepolia");
|
61
|
+
const mantra = useFeature("currencyMantra");
|
62
|
+
const xion = useFeature("currencyXion");
|
63
|
+
const zenrock = useFeature("currencyZenrock");
|
64
|
+
const sonic = useFeature("currencySonic");
|
65
|
+
const sonicBlaze = useFeature("currencySonicBlaze");
|
66
|
+
const sui = useFeature("currencySui");
|
67
|
+
const mina = useFeature("currencyMina");
|
68
|
+
const babylon = useFeature("currencyBabylon");
|
69
|
+
const seiNetworkEvm = useFeature("currencySeiNetworkEvm");
|
70
|
+
const berachain = useFeature("currencyBerachain");
|
71
|
+
const hyperevm = useFeature("currencyHyperevm");
|
72
|
+
const canton = useFeature("currencyCantonNetwork");
|
73
|
+
const kaspa = useFeature("currencyKaspa");
|
74
|
+
const core = useFeature("currencyCore");
|
75
|
+
const ethereumHoodi = useFeature("currencyEthereumHoodi");
|
76
|
+
|
77
|
+
const featureFlaggedCurrencies = useMemo(
|
78
|
+
(): Partial<Record<CryptoCurrencyId, Feature<unknown> | null>> => ({
|
79
|
+
aptos,
|
80
|
+
aptos_testnet: aptosTestnet,
|
81
|
+
axelar,
|
82
|
+
stargaze,
|
83
|
+
secret_network: secretNetwork,
|
84
|
+
umee,
|
85
|
+
desmos,
|
86
|
+
dydx,
|
87
|
+
onomy,
|
88
|
+
sei_network: seiNetwork,
|
89
|
+
quicksilver,
|
90
|
+
persistence,
|
91
|
+
avalanche_c_chain: avaxCChain,
|
92
|
+
stacks,
|
93
|
+
optimism,
|
94
|
+
optimism_sepolia: optimismSepolia,
|
95
|
+
arbitrum,
|
96
|
+
arbitrum_sepolia: arbitrumSepolia,
|
97
|
+
rsk,
|
98
|
+
bittorrent,
|
99
|
+
energy_web: energyWeb,
|
100
|
+
astar,
|
101
|
+
metis,
|
102
|
+
boba,
|
103
|
+
moonriver,
|
104
|
+
velas_evm: velasEvm,
|
105
|
+
syscoin,
|
106
|
+
internet_computer: internetComputer,
|
107
|
+
telos_evm: telosEvm,
|
108
|
+
sei_network_evm: seiNetworkEvm,
|
109
|
+
berachain: berachain,
|
110
|
+
hyperevm: hyperevm,
|
111
|
+
coreum,
|
112
|
+
polygon_zk_evm: polygonZkEvm,
|
113
|
+
polygon_zk_evm_testnet: polygonZkEvmTestnet,
|
114
|
+
base,
|
115
|
+
base_sepolia: baseSepolia,
|
116
|
+
klaytn,
|
117
|
+
injective,
|
118
|
+
vechain,
|
119
|
+
casper,
|
120
|
+
neon_evm: neonEvm,
|
121
|
+
lukso,
|
122
|
+
linea,
|
123
|
+
ton,
|
124
|
+
linea_sepolia: lineaSepolia,
|
125
|
+
blast,
|
126
|
+
blast_sepolia: blastSepolia,
|
127
|
+
scroll,
|
128
|
+
scroll_sepolia: scrollSepolia,
|
129
|
+
icon,
|
130
|
+
etherlink,
|
131
|
+
zksync,
|
132
|
+
zksync_sepolia: zksyncSepolia,
|
133
|
+
mantra,
|
134
|
+
xion,
|
135
|
+
zenrock,
|
136
|
+
sonic,
|
137
|
+
sonic_blaze: sonicBlaze,
|
138
|
+
sui,
|
139
|
+
mina,
|
140
|
+
babylon,
|
141
|
+
canton_network: canton,
|
142
|
+
kaspa,
|
143
|
+
core,
|
144
|
+
ethereum_hoodi: ethereumHoodi,
|
145
|
+
}),
|
146
|
+
[
|
147
|
+
aptos,
|
148
|
+
aptosTestnet,
|
149
|
+
axelar,
|
150
|
+
stargaze,
|
151
|
+
secretNetwork,
|
152
|
+
umee,
|
153
|
+
desmos,
|
154
|
+
dydx,
|
155
|
+
onomy,
|
156
|
+
seiNetwork,
|
157
|
+
quicksilver,
|
158
|
+
persistence,
|
159
|
+
avaxCChain,
|
160
|
+
stacks,
|
161
|
+
optimism,
|
162
|
+
optimismSepolia,
|
163
|
+
arbitrum,
|
164
|
+
arbitrumSepolia,
|
165
|
+
rsk,
|
166
|
+
bittorrent,
|
167
|
+
energyWeb,
|
168
|
+
astar,
|
169
|
+
metis,
|
170
|
+
boba,
|
171
|
+
moonriver,
|
172
|
+
velasEvm,
|
173
|
+
syscoin,
|
174
|
+
internetComputer,
|
175
|
+
telosEvm,
|
176
|
+
seiNetworkEvm,
|
177
|
+
berachain,
|
178
|
+
hyperevm,
|
179
|
+
coreum,
|
180
|
+
polygonZkEvm,
|
181
|
+
polygonZkEvmTestnet,
|
182
|
+
base,
|
183
|
+
baseSepolia,
|
184
|
+
klaytn,
|
185
|
+
injective,
|
186
|
+
vechain,
|
187
|
+
casper,
|
188
|
+
neonEvm,
|
189
|
+
lukso,
|
190
|
+
linea,
|
191
|
+
ton,
|
192
|
+
lineaSepolia,
|
193
|
+
blast,
|
194
|
+
blastSepolia,
|
195
|
+
scroll,
|
196
|
+
scrollSepolia,
|
197
|
+
icon,
|
198
|
+
etherlink,
|
199
|
+
zksync,
|
200
|
+
zksyncSepolia,
|
201
|
+
mantra,
|
202
|
+
xion,
|
203
|
+
zenrock,
|
204
|
+
sonic,
|
205
|
+
sonicBlaze,
|
206
|
+
sui,
|
207
|
+
mina,
|
208
|
+
babylon,
|
209
|
+
canton,
|
210
|
+
kaspa,
|
211
|
+
core,
|
212
|
+
ethereumHoodi,
|
213
|
+
],
|
214
|
+
);
|
215
|
+
|
216
|
+
const deactivatedCurrencyIds = useMemo(
|
217
|
+
() =>
|
218
|
+
new Set(
|
219
|
+
mock
|
220
|
+
? [] // mock mode: all currencies are available for playwrigth tests
|
221
|
+
: Object.entries(featureFlaggedCurrencies)
|
222
|
+
.filter(([, feature]) => !feature?.enabled)
|
223
|
+
.map(([id]) => id),
|
224
|
+
),
|
225
|
+
[mock, featureFlaggedCurrencies],
|
226
|
+
);
|
227
|
+
return {
|
228
|
+
featureFlaggedCurrencies,
|
229
|
+
deactivatedCurrencyIds,
|
230
|
+
};
|
231
|
+
}
|