Skip to content

Commit 83c3d81

Browse files
chore: gate keep tokens for SINGAPORE and MENA trust
Ticket: WIN-5769 TICKET: WIN-5769
1 parent 9ea1939 commit 83c3d81

File tree

6 files changed

+108
-14
lines changed

6 files changed

+108
-14
lines changed

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
/modules/sdk-rpc-wrapper @BitGo/ethalt-team
124124
/modules/sdk-test/ @BitGo/web-experience @BitGo/wallet-platform
125125
/modules/sjcl/ @BitGo/coins @BitGo/web-experience @BitGo/wallet-platform
126-
/modules/statics/ @BitGo/web-experience @BitGo/wallet-platform @BitGo/ethalt-team
126+
/modules/statics/ @BitGo/web-experience @BitGo/ethalt-team
127127
/modules/statics/src/utxo.ts @BitGo/btc-team
128128
/modules/web-demo/ @BitGo/coins @BitGo/web-experience @BitGo/wallet-platform
129129
/scripts/ @BitGo/coins @BitGo/web-experience @BitGo/wallet-platform

modules/statics/src/coins/avaxTokens.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,8 @@ export const avaxTokens = [
273273
'Staked AVAX',
274274
18,
275275
'0x2b2c81e08f1af8835a78bb2a90ae924ace0ea4be',
276-
UnderlyingAsset['avaxc:savax']
276+
UnderlyingAsset['avaxc:savax'],
277+
AccountCoin.DEFAULT_FEATURES_EXCLUDE_SINGAPORE
277278
),
278279
avaxErc20(
279280
'772a2498-2bef-4da8-9bce-f1a89e6f4536',

modules/statics/src/coins/bscTokens.ts

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

55
export const bscTokens = [
@@ -343,7 +343,11 @@ export const bscTokens = [
343343
18,
344344
'0x2a459dd33f05ed8ea9584505cf04698be5654e6d',
345345
UnderlyingAsset['bsc:wrx'],
346-
BSC_TOKEN_FEATURES
346+
AccountCoin.getFeaturesExcluding([
347+
CoinFeature.CUSTODY_BITGO_SINGAPORE,
348+
CoinFeature.CUSTODY_BITGO_CUSTODY_MENA_FZE,
349+
CoinFeature.CUSTODY_BITGO_MENA_FZE,
350+
])
347351
),
348352
bscToken(
349353
'1a26f668-9cde-4768-be8c-1fdcdf8e39e9',
@@ -622,7 +626,7 @@ export const bscTokens = [
622626
18,
623627
'0x5d5c5c1d14faf8ff704295b2f502daa9d06799a0',
624628
UnderlyingAsset['bsc:nnn'],
625-
BSC_TOKEN_FEATURES
629+
BSC_TOKEN_FEATURES_EXCLUDE_SINGAPORE
626630
),
627631
bscToken(
628632
'9b2925ed-7e66-4f60-b1bb-edae3931e9cd',
@@ -1116,7 +1120,11 @@ export const bscTokens = [
11161120
18,
11171121
'0x9fb9a33956351cf4fa040f65a13b835a3c8764e3',
11181122
UnderlyingAsset['bsc:multi'],
1119-
BSC_TOKEN_FEATURES
1123+
AccountCoin.getFeaturesExcluding([
1124+
CoinFeature.CUSTODY_BITGO_SINGAPORE,
1125+
CoinFeature.CUSTODY_BITGO_CUSTODY_MENA_FZE,
1126+
CoinFeature.CUSTODY_BITGO_MENA_FZE,
1127+
])
11201128
),
11211129
bscToken(
11221130
'ec186a0f-8e7c-4844-92b0-630d4bce7eef',

modules/statics/src/coins/erc20Coins.ts

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,12 @@ export const erc20Coins = [
769769
'Beam',
770770
18,
771771
'0x62d0a8458ed7719fdaf978fe5929c6d342b0bfce',
772-
UnderlyingAsset.BEAM
772+
UnderlyingAsset.BEAM,
773+
AccountCoin.getFeaturesExcluding([
774+
CoinFeature.CUSTODY_BITGO_SINGAPORE,
775+
CoinFeature.CUSTODY_BITGO_CUSTODY_MENA_FZE,
776+
CoinFeature.CUSTODY_BITGO_MENA_FZE,
777+
])
773778
),
774779
erc20(
775780
'04c44584-c417-4fce-883f-8f316854c63e',
@@ -1110,7 +1115,8 @@ export const erc20Coins = [
11101115
'Backed NVIDIA Corp',
11111116
18,
11121117
'0xa34c5e0abe843e10461e2c9586ea03e55dbcc495',
1113-
UnderlyingAsset.BNVDA
1118+
UnderlyingAsset.BNVDA,
1119+
AccountCoin.DEFAULT_FEATURES_EXCLUDE_SINGAPORE
11141120
),
11151121
erc20(
11161122
'44fefbae-d835-4fb2-931a-22167f9f4894',
@@ -3292,7 +3298,8 @@ export const erc20Coins = [
32923298
'Kroma',
32933299
18,
32943300
'0x25500000d700bbe27104577cccce8eabcc96c8ad',
3295-
UnderlyingAsset.KRO
3301+
UnderlyingAsset.KRO,
3302+
AccountCoin.DEFAULT_FEATURES_EXCLUDE_SINGAPORE
32963303
),
32973304
erc20(
32983305
'cbcebae0-e2a8-4ebe-8da7-89983f04f917',
@@ -5318,7 +5325,12 @@ export const erc20Coins = [
53185325
'Serum',
53195326
6,
53205327
'0x476c5e26a75bd202a9683ffd34359c0cc15be0ff',
5321-
UnderlyingAsset.SRM
5328+
UnderlyingAsset.SRM,
5329+
AccountCoin.getFeaturesExcluding([
5330+
CoinFeature.CUSTODY_BITGO_SINGAPORE,
5331+
CoinFeature.CUSTODY_BITGO_CUSTODY_MENA_FZE,
5332+
CoinFeature.CUSTODY_BITGO_MENA_FZE,
5333+
])
53225334
),
53235335
erc20(
53245336
'7c786a41-3527-4e87-8b7a-addfe4f4e02a',
@@ -9862,7 +9874,8 @@ export const erc20Coins = [
98629874
'USCC',
98639875
8,
98649876
'0x7b13abb88eb01aa0cd9739b91d4d4f273262eacf',
9865-
UnderlyingAsset.USCC
9877+
UnderlyingAsset.USCC,
9878+
AccountCoin.DEFAULT_FEATURES_EXCLUDE_SINGAPORE
98669879
),
98679880
erc20(
98689881
'efae2e71-10b8-4461-8e84-51390f6e77df',

modules/statics/src/coins/polygonTokens.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { polygonErc20, tpolygonErc20 } from '../account';
2-
import { UnderlyingAsset } from '../base';
2+
import { UnderlyingAsset, CoinFeature } from '../base';
33
import { POLYGON_TOKEN_FEATURES, POLYGON_TOKEN_FEATURES_WITH_FRANKFURT } from '../coinFeatures';
44

55
export const polygonTokens = [
@@ -874,7 +874,14 @@ export const polygonTokens = [
874874
8,
875875
'0x72d6066f486bd0052eefb9114b66ae40e0a6031a',
876876
UnderlyingAsset['polygon:wrx'],
877-
POLYGON_TOKEN_FEATURES
877+
POLYGON_TOKEN_FEATURES.filter(
878+
(feature) =>
879+
![
880+
CoinFeature.CUSTODY_BITGO_SINGAPORE,
881+
CoinFeature.CUSTODY_BITGO_CUSTODY_MENA_FZE,
882+
CoinFeature.CUSTODY_BITGO_MENA_FZE,
883+
].includes(feature)
884+
)
878885
),
879886
polygonErc20(
880887
'8c61bb88-f103-4d42-bf5e-26826d4b7712',

modules/statics/test/unit/coins.ts

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,32 @@ const coinsWithExcludedFeatures: Record<string, { features: CoinFeature[] }> = {
599599
CoinFeature.CUSTODY_BITGO_FRANKFURT,
600600
],
601601
},
602+
beam: {
603+
features: [
604+
CoinFeature.ACCOUNT_MODEL,
605+
CoinFeature.REQUIRES_BIG_NUMBER,
606+
CoinFeature.VALUELESS_TRANSFER,
607+
CoinFeature.TRANSACTION_DATA,
608+
CoinFeature.CUSTODY_BITGO_TRUST,
609+
CoinFeature.CUSTODY_BITGO_KOREA,
610+
CoinFeature.CUSTODY_BITGO_EUROPE_APS,
611+
CoinFeature.CUSTODY_BITGO_FRANKFURT,
612+
CoinFeature.CUSTODY,
613+
],
614+
},
615+
srm: {
616+
features: [
617+
CoinFeature.ACCOUNT_MODEL,
618+
CoinFeature.REQUIRES_BIG_NUMBER,
619+
CoinFeature.VALUELESS_TRANSFER,
620+
CoinFeature.TRANSACTION_DATA,
621+
CoinFeature.CUSTODY_BITGO_TRUST,
622+
CoinFeature.CUSTODY_BITGO_KOREA,
623+
CoinFeature.CUSTODY_BITGO_EUROPE_APS,
624+
CoinFeature.CUSTODY_BITGO_FRANKFURT,
625+
CoinFeature.CUSTODY,
626+
],
627+
},
602628
'eth:usdf': {
603629
features: [
604630
CoinFeature.ACCOUNT_MODEL,
@@ -653,6 +679,45 @@ const coinsWithExcludedFeatures: Record<string, { features: CoinFeature[] }> = {
653679
CoinFeature.CUSTODY_BITGO_FRANKFURT,
654680
],
655681
},
682+
'polygon:wrx': {
683+
features: [
684+
CoinFeature.ACCOUNT_MODEL,
685+
CoinFeature.REQUIRES_BIG_NUMBER,
686+
CoinFeature.VALUELESS_TRANSFER,
687+
CoinFeature.TRANSACTION_DATA,
688+
CoinFeature.CUSTODY,
689+
CoinFeature.CUSTODY_BITGO_TRUST,
690+
CoinFeature.CUSTODY_BITGO_KOREA,
691+
CoinFeature.CUSTODY_BITGO_EUROPE_APS,
692+
CoinFeature.CUSTODY_BITGO_FRANKFURT,
693+
],
694+
},
695+
'bsc:wrx': {
696+
features: [
697+
CoinFeature.ACCOUNT_MODEL,
698+
CoinFeature.REQUIRES_BIG_NUMBER,
699+
CoinFeature.VALUELESS_TRANSFER,
700+
CoinFeature.TRANSACTION_DATA,
701+
CoinFeature.CUSTODY_BITGO_TRUST,
702+
CoinFeature.CUSTODY,
703+
CoinFeature.CUSTODY_BITGO_KOREA,
704+
CoinFeature.CUSTODY_BITGO_EUROPE_APS,
705+
CoinFeature.CUSTODY_BITGO_FRANKFURT,
706+
],
707+
},
708+
'bsc:multi': {
709+
features: [
710+
CoinFeature.ACCOUNT_MODEL,
711+
CoinFeature.REQUIRES_BIG_NUMBER,
712+
CoinFeature.VALUELESS_TRANSFER,
713+
CoinFeature.TRANSACTION_DATA,
714+
CoinFeature.CUSTODY,
715+
CoinFeature.CUSTODY_BITGO_TRUST,
716+
CoinFeature.CUSTODY_BITGO_KOREA,
717+
CoinFeature.CUSTODY_BITGO_EUROPE_APS,
718+
CoinFeature.CUSTODY_BITGO_FRANKFURT,
719+
],
720+
},
656721
};
657722

658723
describe('CoinMap', function () {

0 commit comments

Comments
 (0)