@subwallet/extension-base 1.2.29-0 → 1.2.31-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.
Files changed (33) hide show
  1. package/background/KoniTypes.d.ts +2 -2
  2. package/cjs/constants/blocked-actions-list.js +15 -0
  3. package/cjs/constants/index.js +12 -0
  4. package/cjs/core/logic-validation/transfer.js +166 -0
  5. package/cjs/koni/background/handlers/Extension.js +34 -10
  6. package/cjs/packageInfo.js +1 -1
  7. package/cjs/services/balance-service/helpers/subscribe/index.js +2 -2
  8. package/cjs/services/balance-service/helpers/subscribe/substrate/gear.js +6 -4
  9. package/cjs/services/earning-service/handlers/liquid-staking/stella-swap.js +6 -6
  10. package/cjs/services/swap-service/handler/chainflip-handler.js +47 -19
  11. package/cjs/services/swap-service/utils.js +34 -3
  12. package/cjs/services/transaction-service/index.js +7 -1
  13. package/cjs/utils/staticData/index.js +7 -2
  14. package/constants/blocked-actions-list.d.ts +7 -0
  15. package/constants/blocked-actions-list.js +8 -0
  16. package/constants/index.d.ts +1 -0
  17. package/constants/index.js +2 -1
  18. package/core/logic-validation/transfer.d.ts +2 -0
  19. package/core/logic-validation/transfer.js +164 -0
  20. package/koni/background/handlers/Extension.js +35 -11
  21. package/package.json +16 -10
  22. package/packageInfo.js +1 -1
  23. package/services/balance-service/helpers/subscribe/index.js +2 -2
  24. package/services/balance-service/helpers/subscribe/substrate/gear.js +6 -4
  25. package/services/earning-service/handlers/liquid-staking/stella-swap.js +6 -6
  26. package/services/swap-service/handler/chainflip-handler.d.ts +4 -2
  27. package/services/swap-service/handler/chainflip-handler.js +47 -20
  28. package/services/swap-service/utils.d.ts +12 -0
  29. package/services/swap-service/utils.js +32 -3
  30. package/services/transaction-service/index.js +9 -3
  31. package/utils/staticData/blockedActionsFeatures.json +39 -0
  32. package/utils/staticData/index.d.ts +4 -1
  33. package/utils/staticData/index.js +5 -1
@@ -9,9 +9,9 @@ import { BasicTxErrorType, ChainType, ExtrinsicType } from '@subwallet/extension
9
9
  import { _getChainflipEarlyValidationError } from '@subwallet/extension-base/core/logic-validation/swap';
10
10
  import { getERC20TransactionObject, getEVMTransactionObject } from '@subwallet/extension-base/services/balance-service/transfer/smart-contract';
11
11
  import { createTransferExtrinsic } from '@subwallet/extension-base/services/balance-service/transfer/token';
12
- import { _getAssetDecimals, _getChainNativeTokenSlug, _getContractAddressOfToken, _isNativeToken, _isSubstrateChain } from '@subwallet/extension-base/services/chain-service/utils';
12
+ import { _getAssetDecimals, _getAssetSymbol, _getChainNativeTokenSlug, _getContractAddressOfToken, _isNativeToken, _isSmartContractToken, _isSubstrateChain } from '@subwallet/extension-base/services/chain-service/utils';
13
13
  import { SwapBaseHandler } from '@subwallet/extension-base/services/swap-service/handler/base-handler';
14
- import { calculateSwapRate, CHAIN_FLIP_SUPPORTED_MAINNET_ASSET_MAPPING, CHAIN_FLIP_SUPPORTED_MAINNET_MAPPING, CHAIN_FLIP_SUPPORTED_TESTNET_ASSET_MAPPING, CHAIN_FLIP_SUPPORTED_TESTNET_MAPPING, SWAP_QUOTE_TIMEOUT_MAP } from '@subwallet/extension-base/services/swap-service/utils';
14
+ import { calculateSwapRate, CHAIN_FLIP_SUPPORTED_MAINNET_ASSET_MAPPING, CHAIN_FLIP_SUPPORTED_MAINNET_MAPPING, CHAIN_FLIP_SUPPORTED_TESTNET_ASSET_MAPPING, CHAIN_FLIP_SUPPORTED_TESTNET_MAPPING, getChainflipOptions, SWAP_QUOTE_TIMEOUT_MAP } from '@subwallet/extension-base/services/swap-service/utils';
15
15
  import { CommonStepType } from '@subwallet/extension-base/types/service-base';
16
16
  import { SwapErrorType, SwapFeeType, SwapProviderId, SwapStepType } from '@subwallet/extension-base/types/swap';
17
17
  import BigNumber from 'bignumber.js';
@@ -20,10 +20,12 @@ var ChainflipFeeType;
20
20
  ChainflipFeeType["INGRESS"] = "INGRESS";
21
21
  ChainflipFeeType["NETWORK"] = "NETWORK";
22
22
  ChainflipFeeType["EGRESS"] = "EGRESS";
23
- ChainflipFeeType["LIQUIDITY"] = "LIQUIDITY";
23
+ ChainflipFeeType["BOOST"] = "BOOST";
24
+ ChainflipFeeType["BROKER"] = "BROKER";
24
25
  })(ChainflipFeeType || (ChainflipFeeType = {}));
25
26
  const INTERMEDIARY_MAINNET_ASSET_SLUG = COMMON_ASSETS.USDC_ETHEREUM;
26
27
  const INTERMEDIARY_TESTNET_ASSET_SLUG = COMMON_ASSETS.USDC_SEPOLIA;
28
+ export const CHAINFLIP_BROKER_API = process.env.CHAINFLIP_BROKER_API || '';
27
29
  var CHAINFLIP_QUOTE_ERROR;
28
30
  (function (CHAINFLIP_QUOTE_ERROR) {
29
31
  CHAINFLIP_QUOTE_ERROR["InsufficientLiquidity"] = "InsufficientLiquidity";
@@ -40,9 +42,9 @@ export class ChainflipSwapHandler {
40
42
  });
41
43
  this.isTestnet = isTestnet;
42
44
  this.providerSlug = isTestnet ? SwapProviderId.CHAIN_FLIP_TESTNET : SwapProviderId.CHAIN_FLIP_MAINNET;
43
- this.swapSdk = new SwapSDK({
44
- network: isTestnet ? 'perseverance' : 'mainnet'
45
- });
45
+
46
+ // @ts-ignore
47
+ this.swapSdk = new SwapSDK(getChainflipOptions(isTestnet));
46
48
  }
47
49
  get chainService() {
48
50
  return this.swapBaseHandler.chainService;
@@ -88,11 +90,12 @@ export class ChainflipSwapHandler {
88
90
  const toAsset = this.chainService.getAssetBySlug(request.pair.to);
89
91
  const srcChain = fromAsset.originChain;
90
92
  const destChain = toAsset.originChain;
93
+ const isSwapCrossChain = srcChain !== destChain;
91
94
  const srcChainInfo = this.chainService.getChainInfoByKey(srcChain);
92
95
  const srcChainId = this.chainMapping[srcChain];
93
96
  const destChainId = this.chainMapping[destChain];
94
- const fromAssetId = this.assetMapping[fromAsset.slug];
95
- const toAssetId = this.assetMapping[toAsset.slug];
97
+ const fromAssetId = _getAssetSymbol(fromAsset);
98
+ const toAssetId = _getAssetSymbol(toAsset);
96
99
  if (!srcChainId || !destChainId || !fromAssetId || !toAssetId) {
97
100
  return {
98
101
  error: SwapErrorType.ASSET_NOT_SUPPORTED
@@ -100,9 +103,21 @@ export class ChainflipSwapHandler {
100
103
  }
101
104
  const [supportedDestChains, srcAssets, destAssets] = await Promise.all([this.swapSdk.getChains(srcChainId), this.swapSdk.getAssets(srcChainId), this.swapSdk.getAssets(destChainId)]);
102
105
  const supportedDestChainId = supportedDestChains.find(c => c.chain === destChainId);
103
- const srcAssetData = srcAssets.find(a => a.asset === fromAssetId);
104
- const destAssetData = destAssets.find(a => a.asset === toAssetId);
105
- if (!destAssetData || !srcAssetData || !supportedDestChainId) {
106
+ const srcAssetData = srcAssets.find(a => {
107
+ if (_isSmartContractToken(fromAsset)) {
108
+ var _a$contractAddress;
109
+ return (a === null || a === void 0 ? void 0 : (_a$contractAddress = a.contractAddress) === null || _a$contractAddress === void 0 ? void 0 : _a$contractAddress.toLowerCase()) === _getContractAddressOfToken(fromAsset).toLowerCase() && a.asset === fromAssetId;
110
+ }
111
+ return a.asset === fromAssetId;
112
+ });
113
+ const destAssetData = destAssets.find(a => {
114
+ if (_isSmartContractToken(toAsset)) {
115
+ var _a$contractAddress2;
116
+ return (a === null || a === void 0 ? void 0 : (_a$contractAddress2 = a.contractAddress) === null || _a$contractAddress2 === void 0 ? void 0 : _a$contractAddress2.toLowerCase()) === _getContractAddressOfToken(toAsset).toLowerCase() && a.asset === toAssetId;
117
+ }
118
+ return a.asset === toAssetId;
119
+ });
120
+ if (!destAssetData || !srcAssetData || isSwapCrossChain && !supportedDestChainId) {
106
121
  return {
107
122
  error: SwapErrorType.UNKNOWN
108
123
  };
@@ -198,8 +213,8 @@ export class ChainflipSwapHandler {
198
213
  }
199
214
  const srcChainId = this.chainMapping[fromAsset.originChain];
200
215
  const destChainId = this.chainMapping[toAsset.originChain];
201
- const fromAssetId = this.assetMapping[fromAsset.slug];
202
- const toAssetId = this.assetMapping[toAsset.slug];
216
+ const fromAssetId = _getAssetSymbol(fromAsset);
217
+ const toAssetId = _getAssetSymbol(toAsset);
203
218
  try {
204
219
  var _metadata$maxSwap;
205
220
  const quoteResponse = await this.swapSdk.getQuote({
@@ -213,13 +228,22 @@ export class ChainflipSwapHandler {
213
228
  quoteResponse.quote.includedFees.forEach(fee => {
214
229
  switch (fee.type) {
215
230
  case ChainflipFeeType.INGRESS:
231
+ {
232
+ console.log('ingress', fee);
233
+ feeComponent.push({
234
+ tokenSlug: fromAsset.slug,
235
+ amount: fee.amount,
236
+ feeType: SwapFeeType.NETWORK_FEE
237
+ });
238
+ break;
239
+ }
216
240
 
217
241
  // eslint-disable-next-line no-fallthrough
218
242
  case ChainflipFeeType.EGRESS:
219
243
  {
220
- const tokenSlug = Object.keys(this.assetMapping).find(assetSlug => this.assetMapping[assetSlug] === fee.asset);
244
+ console.log('egress', fee);
221
245
  feeComponent.push({
222
- tokenSlug,
246
+ tokenSlug: toAsset.slug,
223
247
  amount: fee.amount,
224
248
  feeType: SwapFeeType.NETWORK_FEE
225
249
  });
@@ -228,11 +252,14 @@ export class ChainflipSwapHandler {
228
252
  case ChainflipFeeType.NETWORK:
229
253
 
230
254
  // eslint-disable-next-line no-fallthrough
231
- case ChainflipFeeType.LIQUIDITY:
255
+ case ChainflipFeeType.BOOST:
256
+
257
+ // eslint-disable-next-line no-fallthrough
258
+ case ChainflipFeeType.BROKER:
232
259
  {
233
- const tokenSlug = Object.keys(this.assetMapping).find(assetSlug => this.assetMapping[assetSlug] === fee.asset);
260
+ console.log('broker fee', fee);
234
261
  feeComponent.push({
235
- tokenSlug,
262
+ tokenSlug: this.intermediaryAssetSlug,
236
263
  amount: fee.amount,
237
264
  feeType: SwapFeeType.PLATFORM_FEE
238
265
  });
@@ -317,8 +344,8 @@ export class ChainflipSwapHandler {
317
344
  const receiver = recipient !== null && recipient !== void 0 ? recipient : address;
318
345
  const srcChainId = this.chainMapping[fromAsset.originChain];
319
346
  const destChainId = this.chainMapping[toAsset.originChain];
320
- const fromAssetId = this.assetMapping[fromAsset.slug];
321
- const toAssetId = this.assetMapping[toAsset.slug];
347
+ const fromAssetId = _getAssetSymbol(fromAsset);
348
+ const toAssetId = _getAssetSymbol(toAsset);
322
349
  const depositAddressResponse = await this.swapSdk.requestDepositAddress({
323
350
  srcChain: srcChainId,
324
351
  destChain: destChainId,
@@ -13,3 +13,15 @@ export declare function getSwapAlternativeAsset(swapPair: SwapPair): string | un
13
13
  export declare function getSwapAltToken(chainAsset: _ChainAsset): string | undefined;
14
14
  export declare function calculateSwapRate(fromAmount: string, toAmount: string, fromAsset: _ChainAsset, toAsset: _ChainAsset): number;
15
15
  export declare function convertSwapRate(rate: string, fromAsset: _ChainAsset, toAsset: _ChainAsset): number;
16
+ export declare function getChainflipOptions(isTestnet: boolean): {
17
+ network: string;
18
+ broker?: undefined;
19
+ } | {
20
+ network: string;
21
+ broker: {
22
+ url: string;
23
+ };
24
+ };
25
+ export declare function getChainflipBroker(isTestnet: boolean): {
26
+ url: string;
27
+ };
@@ -4,13 +4,15 @@
4
4
  import { Assets, Chains } from '@chainflip/sdk/swap';
5
5
  import { COMMON_ASSETS, COMMON_CHAIN_SLUGS } from '@subwallet/chain-list';
6
6
  import { _getAssetDecimals } from '@subwallet/extension-base/services/chain-service/utils';
7
+ import { CHAINFLIP_BROKER_API } from '@subwallet/extension-base/services/swap-service/handler/chainflip-handler';
7
8
  import { SwapProviderId } from '@subwallet/extension-base/types/swap';
8
9
  import BigN from 'bignumber.js';
9
10
  export const CHAIN_FLIP_TESTNET_EXPLORER = 'https://blocks-perseverance.chainflip.io';
10
11
  export const CHAIN_FLIP_MAINNET_EXPLORER = 'https://scan.chainflip.io';
11
12
  export const CHAIN_FLIP_SUPPORTED_MAINNET_MAPPING = {
12
13
  [COMMON_CHAIN_SLUGS.POLKADOT]: Chains.Polkadot,
13
- [COMMON_CHAIN_SLUGS.ETHEREUM]: Chains.Ethereum
14
+ [COMMON_CHAIN_SLUGS.ETHEREUM]: Chains.Ethereum,
15
+ [COMMON_CHAIN_SLUGS.ARBITRUM]: Chains.Arbitrum
14
16
  };
15
17
  export const CHAIN_FLIP_SUPPORTED_TESTNET_MAPPING = {
16
18
  [COMMON_CHAIN_SLUGS.ETHEREUM_SEPOLIA]: Chains.Ethereum,
@@ -19,7 +21,8 @@ export const CHAIN_FLIP_SUPPORTED_TESTNET_MAPPING = {
19
21
  export const CHAIN_FLIP_SUPPORTED_MAINNET_ASSET_MAPPING = {
20
22
  [COMMON_ASSETS.DOT]: Assets.DOT,
21
23
  [COMMON_ASSETS.ETH]: Assets.ETH,
22
- [COMMON_ASSETS.USDC_ETHEREUM]: Assets.USDC
24
+ [COMMON_ASSETS.USDC_ETHEREUM]: Assets.USDC,
25
+ [COMMON_ASSETS.USDT_ETHEREUM]: Assets.USDT
23
26
  };
24
27
  export const CHAIN_FLIP_SUPPORTED_TESTNET_ASSET_MAPPING = {
25
28
  [COMMON_ASSETS.PDOT]: Assets.DOT,
@@ -35,7 +38,7 @@ export const SWAP_QUOTE_TIMEOUT_MAP = {
35
38
  export const _PROVIDER_TO_SUPPORTED_PAIR_MAP = {
36
39
  [SwapProviderId.HYDRADX_MAINNET]: [COMMON_CHAIN_SLUGS.HYDRADX],
37
40
  [SwapProviderId.HYDRADX_TESTNET]: [COMMON_CHAIN_SLUGS.HYDRADX_TESTNET],
38
- [SwapProviderId.CHAIN_FLIP_MAINNET]: [COMMON_CHAIN_SLUGS.POLKADOT, COMMON_CHAIN_SLUGS.ETHEREUM],
41
+ [SwapProviderId.CHAIN_FLIP_MAINNET]: [COMMON_CHAIN_SLUGS.POLKADOT, COMMON_CHAIN_SLUGS.ETHEREUM, COMMON_CHAIN_SLUGS.ARBITRUM],
39
42
  [SwapProviderId.CHAIN_FLIP_TESTNET]: [COMMON_CHAIN_SLUGS.CHAINFLIP_POLKADOT, COMMON_CHAIN_SLUGS.ETHEREUM_SEPOLIA],
40
43
  [SwapProviderId.POLKADOT_ASSET_HUB]: [COMMON_CHAIN_SLUGS.POLKADOT_ASSET_HUB],
41
44
  [SwapProviderId.KUSAMA_ASSET_HUB]: [COMMON_CHAIN_SLUGS.KUSAMA_ASSET_HUB],
@@ -60,4 +63,30 @@ export function convertSwapRate(rate, fromAsset, toAsset) {
60
63
  const decimalDiff = _getAssetDecimals(toAsset) - _getAssetDecimals(fromAsset);
61
64
  const bnRate = new BigN(rate);
62
65
  return bnRate.times(10 ** decimalDiff).pow(-1).toNumber();
66
+ }
67
+ export function getChainflipOptions(isTestnet) {
68
+ if (isTestnet) {
69
+ return {
70
+ network: getChainflipNetwork(isTestnet)
71
+ };
72
+ }
73
+ return {
74
+ network: getChainflipNetwork(isTestnet),
75
+ broker: getChainflipBroker(isTestnet)
76
+ };
77
+ }
78
+ function getChainflipNetwork(isTestnet) {
79
+ return isTestnet ? 'perseverance' : 'mainnet';
80
+ }
81
+ export function getChainflipBroker(isTestnet) {
82
+ // noted: currently not use testnet broker
83
+ if (isTestnet) {
84
+ return {
85
+ url: `https://perseverance.chainflip-broker.io/rpc/${CHAINFLIP_BROKER_API}`
86
+ };
87
+ } else {
88
+ return {
89
+ url: `https://chainflip-broker.io/rpc/${CHAINFLIP_BROKER_API}`
90
+ };
91
+ }
63
92
  }
@@ -4,8 +4,8 @@
4
4
  import { EvmProviderError } from '@subwallet/extension-base/background/errors/EvmProviderError';
5
5
  import { TransactionError } from '@subwallet/extension-base/background/errors/TransactionError';
6
6
  import { BasicTxErrorType, ChainType, EvmProviderErrorType, ExtrinsicStatus, ExtrinsicType, NotificationType, TransactionDirection } from '@subwallet/extension-base/background/KoniTypes';
7
- import { ALL_ACCOUNT_KEY } from '@subwallet/extension-base/constants';
8
- import { checkBalanceWithTransactionFee, checkSigningAccountForTransaction, checkSupportForTransaction, estimateFeeForTransaction } from '@subwallet/extension-base/core/logic-validation/transfer';
7
+ import { ALL_ACCOUNT_KEY, fetchLastestBlockedActionsAndFeatures } from '@subwallet/extension-base/constants';
8
+ import { checkBalanceWithTransactionFee, checkSigningAccountForTransaction, checkSupportForAction, checkSupportForFeature, checkSupportForTransaction, estimateFeeForTransaction } from '@subwallet/extension-base/core/logic-validation/transfer';
9
9
  import { _getAssetDecimals, _getAssetSymbol, _getChainNativeTokenBasicInfo, _getEvmChainId, _isChainEvmCompatible } from '@subwallet/extension-base/services/chain-service/utils';
10
10
  import { EXTENSION_REQUEST_URL } from '@subwallet/extension-base/services/request-service/constants';
11
11
  import { TRANSACTION_TIMEOUT } from '@subwallet/extension-base/services/transaction-service/constants';
@@ -68,6 +68,13 @@ export default class TransactionService {
68
68
  chain,
69
69
  extrinsicType
70
70
  } = validationResponse;
71
+ const chainInfo = this.state.chainService.getChainInfoByKey(chain);
72
+ const {
73
+ blockedActionsMap,
74
+ blockedFeaturesList
75
+ } = await fetchLastestBlockedActionsAndFeatures();
76
+ checkSupportForFeature(validationResponse, blockedFeaturesList, chainInfo);
77
+ checkSupportForAction(validationResponse, blockedActionsMap);
71
78
  const transaction = transactionInput.transaction;
72
79
 
73
80
  // Check duplicated transaction
@@ -75,7 +82,6 @@ export default class TransactionService {
75
82
 
76
83
  // Check support for transaction
77
84
  checkSupportForTransaction(validationResponse, transaction);
78
- const chainInfo = this.state.chainService.getChainInfoByKey(chain);
79
85
  if (!chainInfo) {
80
86
  validationResponse.errors.push(new TransactionError(BasicTxErrorType.INTERNAL_ERROR, t('Cannot find network')));
81
87
  }
@@ -0,0 +1,39 @@
1
+ {
2
+ "blockedFeaturesList": [],
3
+ "blockedActionsMap": {
4
+ "transfer.balance": [],
5
+ "transfer.token": [],
6
+ "transfer.xcm": [],
7
+ "send_nft": [],
8
+ "swap": [],
9
+ "staking.join_pool": [],
10
+ "staking.leave_pool": [],
11
+ "staking.bond": [],
12
+ "staking.unbond": [],
13
+ "staking.claim_reward": [],
14
+ "staking.withdraw": [],
15
+ "staking.compounding": [],
16
+ "staking.cancel_compounding": [],
17
+ "staking.cancel_unstake": [],
18
+ "earn.join_pool": [],
19
+ "earn.mint_vdot": [],
20
+ "earn.mint_ldot": [],
21
+ "earn.mint_sdot": [],
22
+ "earn.mint_qdot": [],
23
+ "earn.mint_stdot": [],
24
+ "earn.mint_vmanta": [],
25
+ "earn.redeem_qdot": [],
26
+ "earn.redeem_vdot": [],
27
+ "earn.redeem_ldot": [],
28
+ "earn.redeem_sdot": [],
29
+ "earn.redeem_stdot": [],
30
+ "earn.redeem_vmanta": [],
31
+ "earn.unstake_qdot": [],
32
+ "earn.unstake_vdot": [],
33
+ "earn.unstake_ldot": [],
34
+ "earn.unstake_sdot": [],
35
+ "earn.unstake_stdot": [],
36
+ "earn.unstake_vmanta": [],
37
+ "token.spending_approval": []
38
+ }
39
+ }
@@ -4,6 +4,7 @@ export declare const crowdloanFunds: Record<string, unknown>[];
4
4
  export declare const marketingCampaigns: Record<string, unknown>;
5
5
  export declare const termAndCondition: Record<string, unknown>;
6
6
  export declare const currencySymbol: Record<string, unknown>;
7
+ export declare const blockedActionsFeatures: Record<string, unknown>;
7
8
  export declare enum StaticKey {
8
9
  BUY_SERVICE_INFOS = "buy-service-infos",
9
10
  CHAINS = "chains",
@@ -11,7 +12,8 @@ export declare enum StaticKey {
11
12
  MARKETING_CAMPAINGS = "marketing-campaigns",
12
13
  CROWDLOAN_FUNDS = "crowdloan-funds",
13
14
  TERM_AND_CONDITION = "term-and-condition",
14
- BUY_TOKEN_CONFIGS = "buy-token-configs"
15
+ BUY_TOKEN_CONFIGS = "buy-token-configs",
16
+ BLOCKED_ACTIONS_FEATURES = "blocked-actions-features"
15
17
  }
16
18
  export declare const staticData: {
17
19
  chains: import("@subwallet/chain-list/types")._ChainInfo[];
@@ -21,4 +23,5 @@ export declare const staticData: {
21
23
  "marketing-campaigns": Record<string, unknown>;
22
24
  "term-and-condition": unknown;
23
25
  "buy-token-configs": Record<string, unknown>[];
26
+ "blocked-actions-features": Record<string, unknown>;
24
27
  };
@@ -16,6 +16,8 @@ export const marketingCampaigns = require("./marketingCampaigns.json");
16
16
  export const termAndCondition = require("./termAndCondition.json");
17
17
  // eslint-disable-next-line @typescript-eslint/no-var-requires,@typescript-eslint/no-unsafe-assignment
18
18
  export const currencySymbol = require("./currencySymbol.json");
19
+ // eslint-disable-next-line @typescript-eslint/no-var-requires,@typescript-eslint/no-unsafe-assignment
20
+ export const blockedActionsFeatures = require("./blockedActionsFeatures.json");
19
21
  export let StaticKey;
20
22
  (function (StaticKey) {
21
23
  StaticKey["BUY_SERVICE_INFOS"] = "buy-service-infos";
@@ -25,6 +27,7 @@ export let StaticKey;
25
27
  StaticKey["CROWDLOAN_FUNDS"] = "crowdloan-funds";
26
28
  StaticKey["TERM_AND_CONDITION"] = "term-and-condition";
27
29
  StaticKey["BUY_TOKEN_CONFIGS"] = "buy-token-configs";
30
+ StaticKey["BLOCKED_ACTIONS_FEATURES"] = "blocked-actions-features";
28
31
  })(StaticKey || (StaticKey = {}));
29
32
  export const staticData = {
30
33
  [StaticKey.CHAINS]: Object.values(ChainInfoMap),
@@ -33,5 +36,6 @@ export const staticData = {
33
36
  [StaticKey.CROWDLOAN_FUNDS]: crowdloanFunds,
34
37
  [StaticKey.MARKETING_CAMPAINGS]: marketingCampaigns,
35
38
  [StaticKey.TERM_AND_CONDITION]: termAndCondition.default,
36
- [StaticKey.BUY_TOKEN_CONFIGS]: buyTokenConfigs
39
+ [StaticKey.BUY_TOKEN_CONFIGS]: buyTokenConfigs,
40
+ [StaticKey.BLOCKED_ACTIONS_FEATURES]: blockedActionsFeatures
37
41
  };