Skip to content

Commit b99fe3f

Browse files
Merge pull request #5014 from BitGo/COIN-1900-except-arbeth
feat(statics): add token and coin ungating for trusts
2 parents f2887c1 + 04ea06c commit b99fe3f

File tree

3 files changed

+36
-8
lines changed

3 files changed

+36
-8
lines changed

modules/statics/src/coins.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ const SOL_FEATURES = [
205205
CoinFeature.CUSTODY_BITGO_GERMANY,
206206
CoinFeature.CUSTODY_BITGO_FRANKFURT,
207207
];
208+
const TSOL_FEATURES = [...SOL_FEATURES, CoinFeature.CUSTODY_BITGO_SINGAPORE];
208209
const SOL_TOKEN_FEATURES = [...AccountCoin.DEFAULT_FEATURES, CoinFeature.TSS, CoinFeature.TSS_COLD];
209210
const STX_FEATURES = [
210211
...AccountCoin.DEFAULT_FEATURES,
@@ -313,6 +314,7 @@ const TON_FEATURES = [
313314
CoinFeature.TSS_COLD,
314315
CoinFeature.STAKING,
315316
CoinFeature.REBUILD_ON_CUSTODY_SIGNING,
317+
CoinFeature.CUSTODY_BITGO_FRANKFURT,
316318
];
317319
const ARBETH_FEATURES = [
318320
...ETH_FEATURES,
@@ -339,6 +341,7 @@ const BERA_FEATURES = [
339341
CoinFeature.USES_NON_PACKED_ENCODING_FOR_TXDATA,
340342
CoinFeature.BULK_TRANSACTION,
341343
];
344+
const ETH_FEATURES_WITH_FRANKFURT = [...ETH_FEATURES, CoinFeature.CUSTODY_BITGO_FRANKFURT];
342345
export const coins = CoinMap.fromCoins([
343346
...lightningCoins,
344347
...utxoCoins,
@@ -773,7 +776,7 @@ export const coins = CoinMap.fromCoins([
773776
9,
774777
UnderlyingAsset.SOL,
775778
BaseUnit.SOL,
776-
SOL_FEATURES,
779+
TSOL_FEATURES,
777780
KeyCurve.Ed25519
778781
),
779782
account(
@@ -4982,7 +4985,8 @@ export const coins = CoinMap.fromCoins([
49824985
'Decentraland',
49834986
18,
49844987
'0x0f5d2fb29fb7d3cfee444a200298f468908cc942',
4985-
UnderlyingAsset.MANA
4988+
UnderlyingAsset.MANA,
4989+
ETH_FEATURES_WITH_FRANKFURT
49864990
),
49874991
erc20(
49884992
'8b9991bf-e8f2-4e9a-a07f-8243529b6d25',
@@ -5256,7 +5260,8 @@ export const coins = CoinMap.fromCoins([
52565260
'Moca',
52575261
18,
52585262
'0xf944e35f95e819e752f3ccb5faf40957d311e8c5',
5259-
UnderlyingAsset.MOCA
5263+
UnderlyingAsset.MOCA,
5264+
ETH_FEATURES_WITH_FRANKFURT
52605265
),
52615266
erc20(
52625267
'f1654a22-81cc-4798-b815-c9faa5ad5cd0',
@@ -7042,7 +7047,8 @@ export const coins = CoinMap.fromCoins([
70427047
'Tokenize',
70437048
8,
70447049
'0x667102bd3413bfeaa3dffb48fa8288819e480a88',
7045-
UnderlyingAsset.TKX
7050+
UnderlyingAsset.TKX,
7051+
ETH_FEATURES_WITH_FRANKFURT
70467052
),
70477053
erc20(
70487054
'ed5b27a1-eaab-4a02-a1d1-a07ad736c5fd',
@@ -7636,7 +7642,8 @@ export const coins = CoinMap.fromCoins([
76367642
'Wrapped Bitcoin',
76377643
8,
76387644
'0x2260fac5e5542a773aa44fbcfedf7c193bc2c599',
7639-
UnderlyingAsset.WBTC
7645+
UnderlyingAsset.WBTC,
7646+
ETH_FEATURES_WITH_FRANKFURT
76407647
),
76417648
erc20(
76427649
'f8a56e2b-55ae-4dc2-9fbc-2b1b162536a2',

modules/statics/src/utxo.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ const DOGE_FEATURES = [
131131
CoinFeature.CUSTODY_BITGO_SINGAPORE,
132132
CoinFeature.CUSTODY_BITGO_NEW_YORK,
133133
];
134-
134+
const DASH_FEATURES = [...UtxoCoin.DEFAULT_FEATURES, CoinFeature.CUSTODY_BITGO_FRANKFURT];
135135
export const utxoCoins: Readonly<BaseCoin>[] = [
136136
utxo(
137137
'8d6e08d5-399f-414f-8430-6ceca1798cbf',
@@ -266,7 +266,15 @@ export const utxoCoins: Readonly<BaseCoin>[] = [
266266
BaseUnit.LTC,
267267
LTC_FEATURES
268268
),
269-
utxo('0739be6a-c72e-468d-9464-ca5601965708', 'dash', 'Dash', Networks.main.dash, UnderlyingAsset.DASH, BaseUnit.DASH),
269+
utxo(
270+
'0739be6a-c72e-468d-9464-ca5601965708',
271+
'dash',
272+
'Dash',
273+
Networks.main.dash,
274+
UnderlyingAsset.DASH,
275+
BaseUnit.DASH,
276+
DASH_FEATURES
277+
),
270278
utxo(
271279
'5950d78f-e8dd-457a-ab5d-310e6b476bb1',
272280
'tdash',

modules/statics/test/unit/coins.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ const custodyFeatures: Record<string, { features: CoinFeature[] }> = {
100100
CoinFeature.CUSTODY_BITGO_SINGAPORE,
101101
],
102102
},
103+
dash: { features: [CoinFeature.CUSTODY_BITGO_FRANKFURT] },
103104
matic: { features: [CoinFeature.CUSTODY_BITGO_SWITZERLAND] },
104105
weth: { features: [CoinFeature.CUSTODY_BITGO_SWITZERLAND] },
105106
eigen: { features: [CoinFeature.CUSTODY_BITGO_SWITZERLAND] },
@@ -130,6 +131,7 @@ const custodyFeatures: Record<string, { features: CoinFeature[] }> = {
130131
rbtc: { features: [CoinFeature.CUSTODY_BITGO_GERMANY, CoinFeature.CUSTODY_BITGO_FRANKFURT] },
131132
sol: { features: [CoinFeature.CUSTODY_BITGO_GERMANY, CoinFeature.CUSTODY_BITGO_FRANKFURT] },
132133
stx: { features: [CoinFeature.CUSTODY_BITGO_GERMANY, CoinFeature.CUSTODY_BITGO_FRANKFURT] },
134+
ton: { features: [CoinFeature.CUSTODY_BITGO_FRANKFURT] },
133135
xlm: {
134136
features: [
135137
CoinFeature.CUSTODY_BITGO_GERMANY,
@@ -142,6 +144,10 @@ const custodyFeatures: Record<string, { features: CoinFeature[] }> = {
142144
usdc: { features: [CoinFeature.CUSTODY_BITGO_SWITZERLAND, CoinFeature.CUSTODY_BITGO_NEW_YORK] },
143145
shib: { features: [CoinFeature.CUSTODY_BITGO_NEW_YORK] },
144146
injv2: { features: [CoinFeature.CUSTODY_BITGO_SWITZERLAND] },
147+
moca: { features: [CoinFeature.CUSTODY_BITGO_FRANKFURT] },
148+
wbtc: { features: [CoinFeature.CUSTODY_BITGO_FRANKFURT] },
149+
tkx: { features: [CoinFeature.CUSTODY_BITGO_FRANKFURT] },
150+
mana: { features: [CoinFeature.CUSTODY_BITGO_FRANKFURT] },
145151
// Test Coins
146152
talgo: {
147153
features: [
@@ -275,7 +281,13 @@ const custodyFeatures: Record<string, { features: CoinFeature[] }> = {
275281
],
276282
},
277283
trbtc: { features: [CoinFeature.CUSTODY_BITGO_GERMANY, CoinFeature.CUSTODY_BITGO_FRANKFURT] },
278-
tsol: { features: [CoinFeature.CUSTODY_BITGO_GERMANY, CoinFeature.CUSTODY_BITGO_FRANKFURT] },
284+
tsol: {
285+
features: [
286+
CoinFeature.CUSTODY_BITGO_GERMANY,
287+
CoinFeature.CUSTODY_BITGO_FRANKFURT,
288+
CoinFeature.CUSTODY_BITGO_SINGAPORE,
289+
],
290+
},
279291
tstx: { features: [CoinFeature.CUSTODY_BITGO_GERMANY, CoinFeature.CUSTODY_BITGO_FRANKFURT] },
280292
txlm: {
281293
features: [
@@ -287,6 +299,7 @@ const custodyFeatures: Record<string, { features: CoinFeature[] }> = {
287299
ttrx: { features: [CoinFeature.CUSTODY_BITGO_GERMANY, CoinFeature.CUSTODY_BITGO_FRANKFURT] },
288300
tia: { features: [CoinFeature.CUSTODY_BITGO_SWITZERLAND] },
289301
ttia: { features: [CoinFeature.CUSTODY_BITGO_SWITZERLAND] },
302+
tton: { features: [CoinFeature.CUSTODY_BITGO_FRANKFURT] },
290303
};
291304

292305
describe('CoinMap', function () {

0 commit comments

Comments
 (0)