diff --git a/CODEOWNERS b/CODEOWNERS index b7a9f2e74b..9372ab43f2 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -123,7 +123,7 @@ /modules/sdk-rpc-wrapper @BitGo/ethalt-team /modules/sdk-test/ @BitGo/web-experience @BitGo/wallet-platform /modules/sjcl/ @BitGo/coins @BitGo/web-experience @BitGo/wallet-platform -/modules/statics/ @BitGo/web-experience @BitGo/wallet-platform @BitGo/ethalt-team +/modules/statics/ @BitGo/web-experience @BitGo/ethalt-team /modules/statics/src/utxo.ts @BitGo/btc-team /modules/web-demo/ @BitGo/coins @BitGo/web-experience @BitGo/wallet-platform /scripts/ @BitGo/coins @BitGo/web-experience @BitGo/wallet-platform diff --git a/modules/statics/src/coins/avaxTokens.ts b/modules/statics/src/coins/avaxTokens.ts index 20d6c26cb7..37e117e869 100644 --- a/modules/statics/src/coins/avaxTokens.ts +++ b/modules/statics/src/coins/avaxTokens.ts @@ -273,7 +273,8 @@ export const avaxTokens = [ 'Staked AVAX', 18, '0x2b2c81e08f1af8835a78bb2a90ae924ace0ea4be', - UnderlyingAsset['avaxc:savax'] + UnderlyingAsset['avaxc:savax'], + AccountCoin.DEFAULT_FEATURES_EXCLUDE_SINGAPORE ), avaxErc20( '772a2498-2bef-4da8-9bce-f1a89e6f4536', diff --git a/modules/statics/src/coins/bscTokens.ts b/modules/statics/src/coins/bscTokens.ts index 33082bcd33..eaeb2d0446 100644 --- a/modules/statics/src/coins/bscTokens.ts +++ b/modules/statics/src/coins/bscTokens.ts @@ -1,5 +1,5 @@ -import { bscToken, tbscToken } from '../account'; -import { UnderlyingAsset } from '../base'; +import { bscToken, tbscToken, AccountCoin } from '../account'; +import { UnderlyingAsset, CoinFeature } from '../base'; import { BSC_TOKEN_FEATURES, BSC_TOKEN_FEATURES_EXCLUDE_SINGAPORE } from '../coinFeatures'; export const bscTokens = [ @@ -343,7 +343,11 @@ export const bscTokens = [ 18, '0x2a459dd33f05ed8ea9584505cf04698be5654e6d', UnderlyingAsset['bsc:wrx'], - BSC_TOKEN_FEATURES + AccountCoin.getFeaturesExcluding([ + CoinFeature.CUSTODY_BITGO_SINGAPORE, + CoinFeature.CUSTODY_BITGO_CUSTODY_MENA_FZE, + CoinFeature.CUSTODY_BITGO_MENA_FZE, + ]) ), bscToken( '1a26f668-9cde-4768-be8c-1fdcdf8e39e9', @@ -622,7 +626,7 @@ export const bscTokens = [ 18, '0x5d5c5c1d14faf8ff704295b2f502daa9d06799a0', UnderlyingAsset['bsc:nnn'], - BSC_TOKEN_FEATURES + BSC_TOKEN_FEATURES_EXCLUDE_SINGAPORE ), bscToken( '9b2925ed-7e66-4f60-b1bb-edae3931e9cd', @@ -1116,7 +1120,11 @@ export const bscTokens = [ 18, '0x9fb9a33956351cf4fa040f65a13b835a3c8764e3', UnderlyingAsset['bsc:multi'], - BSC_TOKEN_FEATURES + AccountCoin.getFeaturesExcluding([ + CoinFeature.CUSTODY_BITGO_SINGAPORE, + CoinFeature.CUSTODY_BITGO_CUSTODY_MENA_FZE, + CoinFeature.CUSTODY_BITGO_MENA_FZE, + ]) ), bscToken( 'ec186a0f-8e7c-4844-92b0-630d4bce7eef', diff --git a/modules/statics/src/coins/erc20Coins.ts b/modules/statics/src/coins/erc20Coins.ts index efbded027f..12805b2cc3 100644 --- a/modules/statics/src/coins/erc20Coins.ts +++ b/modules/statics/src/coins/erc20Coins.ts @@ -769,7 +769,12 @@ export const erc20Coins = [ 'Beam', 18, '0x62d0a8458ed7719fdaf978fe5929c6d342b0bfce', - UnderlyingAsset.BEAM + UnderlyingAsset.BEAM, + AccountCoin.getFeaturesExcluding([ + CoinFeature.CUSTODY_BITGO_SINGAPORE, + CoinFeature.CUSTODY_BITGO_CUSTODY_MENA_FZE, + CoinFeature.CUSTODY_BITGO_MENA_FZE, + ]) ), erc20( '04c44584-c417-4fce-883f-8f316854c63e', @@ -1110,7 +1115,8 @@ export const erc20Coins = [ 'Backed NVIDIA Corp', 18, '0xa34c5e0abe843e10461e2c9586ea03e55dbcc495', - UnderlyingAsset.BNVDA + UnderlyingAsset.BNVDA, + AccountCoin.DEFAULT_FEATURES_EXCLUDE_SINGAPORE ), erc20( '44fefbae-d835-4fb2-931a-22167f9f4894', @@ -3292,7 +3298,8 @@ export const erc20Coins = [ 'Kroma', 18, '0x25500000d700bbe27104577cccce8eabcc96c8ad', - UnderlyingAsset.KRO + UnderlyingAsset.KRO, + AccountCoin.DEFAULT_FEATURES_EXCLUDE_SINGAPORE ), erc20( 'cbcebae0-e2a8-4ebe-8da7-89983f04f917', @@ -5318,7 +5325,12 @@ export const erc20Coins = [ 'Serum', 6, '0x476c5e26a75bd202a9683ffd34359c0cc15be0ff', - UnderlyingAsset.SRM + UnderlyingAsset.SRM, + AccountCoin.getFeaturesExcluding([ + CoinFeature.CUSTODY_BITGO_SINGAPORE, + CoinFeature.CUSTODY_BITGO_CUSTODY_MENA_FZE, + CoinFeature.CUSTODY_BITGO_MENA_FZE, + ]) ), erc20( '7c786a41-3527-4e87-8b7a-addfe4f4e02a', @@ -9862,7 +9874,8 @@ export const erc20Coins = [ 'USCC', 8, '0x7b13abb88eb01aa0cd9739b91d4d4f273262eacf', - UnderlyingAsset.USCC + UnderlyingAsset.USCC, + AccountCoin.DEFAULT_FEATURES_EXCLUDE_SINGAPORE ), erc20( 'efae2e71-10b8-4461-8e84-51390f6e77df', diff --git a/modules/statics/src/coins/polygonTokens.ts b/modules/statics/src/coins/polygonTokens.ts index c3d8995dcc..c50461673a 100644 --- a/modules/statics/src/coins/polygonTokens.ts +++ b/modules/statics/src/coins/polygonTokens.ts @@ -1,5 +1,5 @@ import { polygonErc20, tpolygonErc20 } from '../account'; -import { UnderlyingAsset } from '../base'; +import { UnderlyingAsset, CoinFeature } from '../base'; import { POLYGON_TOKEN_FEATURES, POLYGON_TOKEN_FEATURES_WITH_FRANKFURT } from '../coinFeatures'; export const polygonTokens = [ @@ -874,7 +874,14 @@ export const polygonTokens = [ 8, '0x72d6066f486bd0052eefb9114b66ae40e0a6031a', UnderlyingAsset['polygon:wrx'], - POLYGON_TOKEN_FEATURES + POLYGON_TOKEN_FEATURES.filter( + (feature) => + ![ + CoinFeature.CUSTODY_BITGO_SINGAPORE, + CoinFeature.CUSTODY_BITGO_CUSTODY_MENA_FZE, + CoinFeature.CUSTODY_BITGO_MENA_FZE, + ].includes(feature) + ) ), polygonErc20( '8c61bb88-f103-4d42-bf5e-26826d4b7712', diff --git a/modules/statics/test/unit/coins.ts b/modules/statics/test/unit/coins.ts index 25ec8a32da..9a00de68a7 100644 --- a/modules/statics/test/unit/coins.ts +++ b/modules/statics/test/unit/coins.ts @@ -599,6 +599,32 @@ const coinsWithExcludedFeatures: Record = { CoinFeature.CUSTODY_BITGO_FRANKFURT, ], }, + beam: { + features: [ + CoinFeature.ACCOUNT_MODEL, + CoinFeature.REQUIRES_BIG_NUMBER, + CoinFeature.VALUELESS_TRANSFER, + CoinFeature.TRANSACTION_DATA, + CoinFeature.CUSTODY_BITGO_TRUST, + CoinFeature.CUSTODY_BITGO_KOREA, + CoinFeature.CUSTODY_BITGO_EUROPE_APS, + CoinFeature.CUSTODY_BITGO_FRANKFURT, + CoinFeature.CUSTODY, + ], + }, + srm: { + features: [ + CoinFeature.ACCOUNT_MODEL, + CoinFeature.REQUIRES_BIG_NUMBER, + CoinFeature.VALUELESS_TRANSFER, + CoinFeature.TRANSACTION_DATA, + CoinFeature.CUSTODY_BITGO_TRUST, + CoinFeature.CUSTODY_BITGO_KOREA, + CoinFeature.CUSTODY_BITGO_EUROPE_APS, + CoinFeature.CUSTODY_BITGO_FRANKFURT, + CoinFeature.CUSTODY, + ], + }, 'eth:usdf': { features: [ CoinFeature.ACCOUNT_MODEL, @@ -653,6 +679,45 @@ const coinsWithExcludedFeatures: Record = { CoinFeature.CUSTODY_BITGO_FRANKFURT, ], }, + 'polygon:wrx': { + features: [ + CoinFeature.ACCOUNT_MODEL, + CoinFeature.REQUIRES_BIG_NUMBER, + CoinFeature.VALUELESS_TRANSFER, + CoinFeature.TRANSACTION_DATA, + CoinFeature.CUSTODY, + CoinFeature.CUSTODY_BITGO_TRUST, + CoinFeature.CUSTODY_BITGO_KOREA, + CoinFeature.CUSTODY_BITGO_EUROPE_APS, + CoinFeature.CUSTODY_BITGO_FRANKFURT, + ], + }, + 'bsc:wrx': { + features: [ + CoinFeature.ACCOUNT_MODEL, + CoinFeature.REQUIRES_BIG_NUMBER, + CoinFeature.VALUELESS_TRANSFER, + CoinFeature.TRANSACTION_DATA, + CoinFeature.CUSTODY_BITGO_TRUST, + CoinFeature.CUSTODY, + CoinFeature.CUSTODY_BITGO_KOREA, + CoinFeature.CUSTODY_BITGO_EUROPE_APS, + CoinFeature.CUSTODY_BITGO_FRANKFURT, + ], + }, + 'bsc:multi': { + features: [ + CoinFeature.ACCOUNT_MODEL, + CoinFeature.REQUIRES_BIG_NUMBER, + CoinFeature.VALUELESS_TRANSFER, + CoinFeature.TRANSACTION_DATA, + CoinFeature.CUSTODY, + CoinFeature.CUSTODY_BITGO_TRUST, + CoinFeature.CUSTODY_BITGO_KOREA, + CoinFeature.CUSTODY_BITGO_EUROPE_APS, + CoinFeature.CUSTODY_BITGO_FRANKFURT, + ], + }, }; describe('CoinMap', function () {