Skip to content

Commit 4d87d74

Browse files
authored
Merge pull request #7253 from BitGo/COIN-5480
feat(statics): gating assets for Dubai
2 parents ff9a469 + 493424b commit 4d87d74

File tree

8 files changed

+285
-90
lines changed

8 files changed

+285
-90
lines changed

modules/statics/src/allCoinsAndTokens.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ import {
132132
ZKETH_FEATURES,
133133
ACCOUNT_COIN_DEFAULT_FEATURES_EXCLUDE_SINGAPORE_AND_MENA_FZE,
134134
WFLR_FEATURES,
135+
ACCOUNT_COIN_DEFAULT_FEATURES_EXCLUDE_MENA_FZE,
135136
} from './coinFeatures';
136137
import { botTokens } from './coins/botTokens';
137138
import { adaTokens } from './coins/adaTokens';
@@ -483,7 +484,7 @@ export const allCoinsAndTokens = [
483484
18,
484485
UnderlyingAsset.RBTC,
485486
BaseUnit.ETH,
486-
RBTC_FEATURES
487+
AccountCoin.getFeaturesByTypeExcluding([CoinFeature.CUSTODY_BITGO_MENA_FZE], RBTC_FEATURES)
487488
),
488489
account(
489490
'9cf6d137-6c6b-4fc0-acc0-8e78a1599c15',
@@ -2620,7 +2621,7 @@ export const allCoinsAndTokens = [
26202621
7,
26212622
UnderlyingAsset['xlm:SLT-GCKA6K5PCQ6PNF5RQBF7PQDJWRHO6UOGFMRLK3DYHDOI244V47XKQ4GP'],
26222623
'smartlands.io',
2623-
AccountCoin.DEFAULT_FEATURES,
2624+
ACCOUNT_COIN_DEFAULT_FEATURES_EXCLUDE_MENA_FZE,
26242625
'',
26252626
'SLT'
26262627
),

modules/statics/src/base.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3498,4 +3498,20 @@ export abstract class BaseCoin {
34983498
this.network = options.network;
34993499
this.primaryKeyCurve = options.primaryKeyCurve;
35003500
}
3501+
3502+
/**
3503+
* Returns features from a base feature set, excluding specified features
3504+
* @param excludedFeatures Array of features to exclude
3505+
* @param baseFeatures Base feature array to filter from (optional)
3506+
* @returns Filtered array of features
3507+
*/
3508+
public static getFeaturesByTypeExcluding(
3509+
excludedFeatures: CoinFeature[],
3510+
baseFeatures?: CoinFeature[]
3511+
): CoinFeature[] {
3512+
if (!baseFeatures) {
3513+
return [];
3514+
}
3515+
return baseFeatures.filter((feature) => !excludedFeatures.includes(feature));
3516+
}
35013517
}

modules/statics/src/coins/avaxTokens.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { AccountCoin, avaxErc20, tavaxErc20 } from '../account';
22
import { CoinFeature, UnderlyingAsset } from '../base';
3+
import { ACCOUNT_COIN_DEFAULT_FEATURES_EXCLUDE_MENA_FZE } from '../coinFeatures';
34

45
export const avaxTokens = [
56
avaxErc20(
@@ -568,7 +569,8 @@ export const avaxTokens = [
568569
'Betswap.gg',
569570
18,
570571
'0x49f519002eeced6902f24c0be72b6d898e4d27fc',
571-
UnderlyingAsset['avaxc:bsgg']
572+
UnderlyingAsset['avaxc:bsgg'],
573+
ACCOUNT_COIN_DEFAULT_FEATURES_EXCLUDE_MENA_FZE
572574
),
573575
avaxErc20(
574576
'e6bd6935-daac-4edc-8cfb-f8305ebbdb11',

modules/statics/src/coins/bscTokens.ts

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { bscToken, tbscToken, AccountCoin } from '../account';
2-
import { UnderlyingAsset, CoinFeature } from '../base';
1+
import { AccountCoin, bscToken, tbscToken } from '../account';
2+
import { CoinFeature, UnderlyingAsset } from '../base';
33
import {
44
BSC_TOKEN_FEATURES,
5-
BSC_TOKEN_FEATURES_EXCLUDE_SINGAPORE,
65
BSC_TOKEN_FEATURES_EXCLUDE_MENA_FZE,
6+
BSC_TOKEN_FEATURES_EXCLUDE_SINGAPORE,
77
} from '../coinFeatures';
88

99
export const bscTokens = [
@@ -150,7 +150,12 @@ export const bscTokens = [
150150
'0xcebef3df1f3c5bfd90fde603e71f31a53b11944d',
151151
UnderlyingAsset['bsc:litt'],
152152
AccountCoin.getFeaturesByTypeExcluding(
153-
[CoinFeature.CUSTODY_BITGO_GERMANY, CoinFeature.CUSTODY_BITGO_EUROPE_APS, CoinFeature.CUSTODY_BITGO_FRANKFURT],
153+
[
154+
CoinFeature.CUSTODY_BITGO_GERMANY,
155+
CoinFeature.CUSTODY_BITGO_EUROPE_APS,
156+
CoinFeature.CUSTODY_BITGO_FRANKFURT,
157+
CoinFeature.CUSTODY_BITGO_MENA_FZE,
158+
],
154159
BSC_TOKEN_FEATURES
155160
)
156161
),
@@ -197,7 +202,7 @@ export const bscTokens = [
197202
6,
198203
'0x71b3a0566f4bf80331d115d8026a7022bf670cce',
199204
UnderlyingAsset['bsc:dd'],
200-
BSC_TOKEN_FEATURES
205+
AccountCoin.getFeaturesByTypeExcluding([CoinFeature.CUSTODY_BITGO_MENA_FZE], BSC_TOKEN_FEATURES)
201206
),
202207
bscToken(
203208
'ebfcdf18-bdad-41da-bbda-2b3a71338c1c',
@@ -317,7 +322,7 @@ export const bscTokens = [
317322
18,
318323
'0x9b4bdddaeb68d85b0848bab7774e6855439fd94e',
319324
UnderlyingAsset['bsc:tking'],
320-
BSC_TOKEN_FEATURES
325+
AccountCoin.getFeaturesByTypeExcluding([CoinFeature.CUSTODY_BITGO_MENA_FZE], BSC_TOKEN_FEATURES)
321326
),
322327
bscToken(
323328
'd24030d5-e0a1-4216-9b80-9582ce5e4de1',
@@ -1019,7 +1024,7 @@ export const bscTokens = [
10191024
18,
10201025
'0x2003f7ba57ea956b05b85c60b4b2ceea9b111256',
10211026
UnderlyingAsset['bsc:kmd'],
1022-
BSC_TOKEN_FEATURES
1027+
AccountCoin.getFeaturesByTypeExcluding([CoinFeature.CUSTODY_BITGO_MENA_FZE], BSC_TOKEN_FEATURES)
10231028
),
10241029
bscToken(
10251030
'a4cda030-4c22-4ece-93b4-840da127781c',
@@ -1180,7 +1185,7 @@ export const bscTokens = [
11801185
18,
11811186
'0xad29abb318791d579433d831ed122afeaf29dcfe',
11821187
UnderlyingAsset['bsc:ftm'],
1183-
BSC_TOKEN_FEATURES
1188+
AccountCoin.getFeaturesByTypeExcluding([CoinFeature.CUSTODY_BITGO_MENA_FZE], BSC_TOKEN_FEATURES)
11841189
),
11851190
bscToken(
11861191
'2a1d251c-388d-48cb-9f91-53d41d7e0e91',

0 commit comments

Comments
 (0)