Skip to content

Commit

Permalink
Merge pull request #4205 from BitGo/COPS-902
Browse files Browse the repository at this point in the history
feat: add singapore trust as a new coinfeature
  • Loading branch information
yash-bitgo authored Jan 19, 2024
2 parents ed0f9d8 + 9ad006d commit 6152cd5
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/statics/src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ export enum CoinFeature {
* This coin supports custody in BitGo Switzerland entities
*/
CUSTODY_BITGO_FRANKFURT = 'custody-bitgo-frankfurt',
/*
* This coin supports custody in BitGo Singapore entities
*/
CUSTODY_BITGO_SINGAPORE = 'custody-bitgo-singapore',
/*
* This coin supports custody in BitGo Sister Trust 1 entities
*/
Expand Down
7 changes: 7 additions & 0 deletions modules/statics/src/coins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ const BCH_FEATURES = [
CoinFeature.CUSTODY_BITGO_GERMANY,
CoinFeature.CUSTODY_BITGO_NEW_YORK,
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.CUSTODY_BITGO_SINGAPORE,
];
const BTC_FEATURES = [
...UtxoCoin.DEFAULT_FEATURES,
Expand All @@ -71,6 +72,7 @@ const BTC_FEATURES = [
CoinFeature.CUSTODY_BITGO_SISTER_TRUST_ONE,
CoinFeature.BULK_TRANSACTION,
CoinFeature.DISTRIBUTED_CUSTODY,
CoinFeature.CUSTODY_BITGO_SINGAPORE,
];
const BTG_FEATURES = [
...UtxoCoin.DEFAULT_FEATURES,
Expand Down Expand Up @@ -107,6 +109,7 @@ const LTC_FEATURES = [
CoinFeature.CUSTODY_BITGO_GERMANY,
CoinFeature.CUSTODY_BITGO_NEW_YORK,
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.CUSTODY_BITGO_SINGAPORE,
];
const RBTC_FEATURES = [
...ETH_FEATURES,
Expand Down Expand Up @@ -134,6 +137,7 @@ const XRP_FEATURES = [
CoinFeature.CUSTODY_BITGO_GERMANY,
CoinFeature.CUSTODY_BITGO_NEW_YORK,
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.CUSTODY_BITGO_SINGAPORE,
CoinFeature.MULTISIG_COLD,
];
const CSPR_FEATURES = [
Expand Down Expand Up @@ -524,6 +528,7 @@ export const coins = CoinMap.fromCoins([
CoinFeature.CUSTODY_BITGO_NEW_YORK,
CoinFeature.CUSTODY_BITGO_SWITZERLAND,
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.CUSTODY_BITGO_SINGAPORE,
CoinFeature.BULK_TRANSACTION,
]
), // we should probably refactor this into a eth() method
Expand Down Expand Up @@ -555,6 +560,7 @@ export const coins = CoinMap.fromCoins([
CoinFeature.CUSTODY_BITGO_NEW_YORK,
CoinFeature.CUSTODY_BITGO_SWITZERLAND,
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.CUSTODY_BITGO_SINGAPORE,
]
),
account(
Expand All @@ -575,6 +581,7 @@ export const coins = CoinMap.fromCoins([
CoinFeature.CUSTODY_BITGO_NEW_YORK,
CoinFeature.CUSTODY_BITGO_SWITZERLAND,
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.CUSTODY_BITGO_SINGAPORE,
]
),
account(
Expand Down
11 changes: 11 additions & 0 deletions modules/statics/test/unit/coins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const custodyFeatures: Record<string, { features: CoinFeature[] }> = {
CoinFeature.CUSTODY_BITGO_GERMANY,
CoinFeature.CUSTODY_BITGO_NEW_YORK,
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.CUSTODY_BITGO_SINGAPORE,
CoinFeature.CUSTODY_BITGO_SISTER_TRUST_ONE,
],
},
Expand All @@ -44,6 +45,7 @@ const custodyFeatures: Record<string, { features: CoinFeature[] }> = {
CoinFeature.CUSTODY_BITGO_GERMANY,
CoinFeature.CUSTODY_BITGO_NEW_YORK,
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.CUSTODY_BITGO_SINGAPORE,
],
},
btg: { features: [CoinFeature.CUSTODY_BITGO_GERMANY, CoinFeature.CUSTODY_BITGO_FRANKFURT] },
Expand All @@ -63,6 +65,7 @@ const custodyFeatures: Record<string, { features: CoinFeature[] }> = {
CoinFeature.CUSTODY_BITGO_NEW_YORK,
CoinFeature.CUSTODY_BITGO_SWITZERLAND,
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.CUSTODY_BITGO_SINGAPORE,
],
},
etc: {
Expand All @@ -78,6 +81,7 @@ const custodyFeatures: Record<string, { features: CoinFeature[] }> = {
CoinFeature.CUSTODY_BITGO_GERMANY,
CoinFeature.CUSTODY_BITGO_NEW_YORK,
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.CUSTODY_BITGO_SINGAPORE,
],
},
matic: { features: [CoinFeature.CUSTODY_BITGO_SWITZERLAND] },
Expand All @@ -93,6 +97,7 @@ const custodyFeatures: Record<string, { features: CoinFeature[] }> = {
CoinFeature.CUSTODY_BITGO_GERMANY,
CoinFeature.CUSTODY_BITGO_NEW_YORK,
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.CUSTODY_BITGO_SINGAPORE,
],
},
rbtc: { features: [CoinFeature.CUSTODY_BITGO_GERMANY, CoinFeature.CUSTODY_BITGO_FRANKFURT] },
Expand Down Expand Up @@ -122,13 +127,15 @@ const custodyFeatures: Record<string, { features: CoinFeature[] }> = {
CoinFeature.CUSTODY_BITGO_NEW_YORK,
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.CUSTODY_BITGO_SISTER_TRUST_ONE,
CoinFeature.CUSTODY_BITGO_SINGAPORE,
],
},
tbch: {
features: [
CoinFeature.CUSTODY_BITGO_GERMANY,
CoinFeature.CUSTODY_BITGO_NEW_YORK,
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.CUSTODY_BITGO_SINGAPORE,
],
},
tbtg: { features: [CoinFeature.CUSTODY_BITGO_GERMANY, CoinFeature.CUSTODY_BITGO_FRANKFURT] },
Expand All @@ -148,6 +155,7 @@ const custodyFeatures: Record<string, { features: CoinFeature[] }> = {
CoinFeature.CUSTODY_BITGO_NEW_YORK,
CoinFeature.CUSTODY_BITGO_SWITZERLAND,
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.CUSTODY_BITGO_SINGAPORE,
],
},
hteth: {
Expand All @@ -156,6 +164,7 @@ const custodyFeatures: Record<string, { features: CoinFeature[] }> = {
CoinFeature.CUSTODY_BITGO_NEW_YORK,
CoinFeature.CUSTODY_BITGO_SWITZERLAND,
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.CUSTODY_BITGO_SINGAPORE,
],
},
tetc: {
Expand All @@ -171,6 +180,7 @@ const custodyFeatures: Record<string, { features: CoinFeature[] }> = {
CoinFeature.CUSTODY_BITGO_GERMANY,
CoinFeature.CUSTODY_BITGO_NEW_YORK,
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.CUSTODY_BITGO_SINGAPORE,
],
},
tmatic: { features: [CoinFeature.CUSTODY_BITGO_SWITZERLAND] },
Expand All @@ -186,6 +196,7 @@ const custodyFeatures: Record<string, { features: CoinFeature[] }> = {
CoinFeature.CUSTODY_BITGO_GERMANY,
CoinFeature.CUSTODY_BITGO_NEW_YORK,
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.CUSTODY_BITGO_SINGAPORE,
],
},
trbtc: { features: [CoinFeature.CUSTODY_BITGO_GERMANY, CoinFeature.CUSTODY_BITGO_FRANKFURT] },
Expand Down

0 comments on commit 6152cd5

Please sign in to comment.