Skip to content

Commit 84b3424

Browse files
Merge pull request #6536 from BitGo/CEN-1090
feat(statics): add BITGO INDIA entity
2 parents b800afa + a39ba30 commit 84b3424

File tree

8 files changed

+43
-1
lines changed

8 files changed

+43
-1
lines changed

modules/statics/src/ada.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export class Ada extends BaseCoin {
2424
CoinFeature.CUSTODY_BITGO_TRUST,
2525
CoinFeature.CUSTODY_BITGO_MENA_FZE,
2626
CoinFeature.CUSTODY_BITGO_CUSTODY_MENA_FZE,
27+
CoinFeature.CUSTODY_BITGO_INDIA,
2728
CoinFeature.STAKING,
2829
CoinFeature.BULK_TRANSACTION,
2930
];

modules/statics/src/avaxp.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export class AVAXPCoin extends BaseCoin {
1717
public static readonly DEFAULT_FEATURES = [
1818
CoinFeature.UNSPENT_MODEL,
1919
CoinFeature.CUSTODY_BITGO_TRUST,
20+
CoinFeature.CUSTODY_BITGO_INDIA,
2021
CoinFeature.CUSTODY_BITGO_MENA_FZE,
2122
CoinFeature.CUSTODY_BITGO_CUSTODY_MENA_FZE,
2223
CoinFeature.CUSTODY_BITGO_GERMANY,

modules/statics/src/base.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,10 @@ export enum CoinFeature {
266266
* This coin supports custody in BitGo Custody MENA FZE entities
267267
*/
268268
CUSTODY_BITGO_CUSTODY_MENA_FZE = 'custody-bitgo-custody-mena-fze',
269+
/**
270+
* This coin supports custody in BitGo India entities
271+
*/
272+
CUSTODY_BITGO_INDIA = 'custody-bitgo-india',
269273
/*
270274
* This coin has transactions that expire after a certain amount of time.
271275
*/

modules/statics/src/coinFeatures.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export const ACCOUNT_COIN_DEFAULT_FEATURES = [
1414
CoinFeature.CUSTODY_BITGO_KOREA,
1515
CoinFeature.CUSTODY_BITGO_EUROPE_APS,
1616
CoinFeature.CUSTODY_BITGO_FRANKFURT,
17+
CoinFeature.CUSTODY_BITGO_INDIA,
1718
];
1819

1920
export const ACCOUNT_COIN_DEFAULT_FEATURES_EXCLUDE_SINGAPORE = ACCOUNT_COIN_DEFAULT_FEATURES.filter(
@@ -79,6 +80,7 @@ export const CELO_FEATURES = [
7980
feature !== CoinFeature.CUSTODY_BITGO_NEW_YORK &&
8081
feature !== CoinFeature.CUSTODY_BITGO_SWITZERLAND &&
8182
feature !== CoinFeature.CUSTODY_BITGO_SISTER_TRUST_ONE &&
83+
feature !== CoinFeature.CUSTODY_BITGO_INDIA &&
8284
feature !== CoinFeature.DISTRIBUTED_CUSTODY
8385
);
8486

@@ -91,7 +93,8 @@ export const CELO_TOKEN_FEATURES = [...ACCOUNT_COIN_DEFAULT_FEATURES].filter(
9193
feature !== CoinFeature.CUSTODY_BITGO_SINGAPORE &&
9294
feature !== CoinFeature.CUSTODY_BITGO_KOREA &&
9395
feature !== CoinFeature.CUSTODY_BITGO_EUROPE_APS &&
94-
feature !== CoinFeature.CUSTODY_BITGO_FRANKFURT
96+
feature !== CoinFeature.CUSTODY_BITGO_FRANKFURT &&
97+
feature !== CoinFeature.CUSTODY_BITGO_INDIA
9598
);
9699

97100
export const RBTC_FEATURES = [

modules/statics/src/ofc.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export class OfcCoin extends BaseCoin {
2929
CoinFeature.CUSTODY_BITGO_TRUST,
3030
CoinFeature.CUSTODY_BITGO_MENA_FZE,
3131
CoinFeature.CUSTODY_BITGO_CUSTODY_MENA_FZE,
32+
CoinFeature.CUSTODY_BITGO_INDIA,
3233
];
3334

3435
// If set, this coin is the native address format for this token.

modules/statics/src/utxo.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export class UtxoCoin extends BaseCoin {
2222
CoinFeature.CUSTODY_BITGO_TRUST,
2323
CoinFeature.CUSTODY_BITGO_MENA_FZE,
2424
CoinFeature.CUSTODY_BITGO_CUSTODY_MENA_FZE,
25+
CoinFeature.CUSTODY_BITGO_INDIA,
2526
CoinFeature.MULTISIG_COLD,
2627
CoinFeature.MULTISIG,
2728
CoinFeature.PAYGO,

modules/statics/test/unit/coins.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,7 @@ const coinsWithExcludedFeatures: Record<string, { features: CoinFeature[] }> = {
580580
CoinFeature.TRANSACTION_DATA,
581581
CoinFeature.CUSTODY,
582582
CoinFeature.CUSTODY_BITGO_TRUST,
583+
CoinFeature.CUSTODY_BITGO_INDIA,
583584
CoinFeature.CUSTODY_BITGO_KOREA,
584585
CoinFeature.CUSTODY_BITGO_EUROPE_APS,
585586
CoinFeature.CUSTODY_BITGO_FRANKFURT,
@@ -592,6 +593,7 @@ const coinsWithExcludedFeatures: Record<string, { features: CoinFeature[] }> = {
592593
CoinFeature.VALUELESS_TRANSFER,
593594
CoinFeature.TRANSACTION_DATA,
594595
CoinFeature.CUSTODY_BITGO_TRUST,
596+
CoinFeature.CUSTODY_BITGO_INDIA,
595597
CoinFeature.CUSTODY_BITGO_KOREA,
596598
CoinFeature.CUSTODY_BITGO_EUROPE_APS,
597599
CoinFeature.CUSTODY_BITGO_FRANKFURT,
@@ -605,6 +607,7 @@ const coinsWithExcludedFeatures: Record<string, { features: CoinFeature[] }> = {
605607
CoinFeature.VALUELESS_TRANSFER,
606608
CoinFeature.TRANSACTION_DATA,
607609
CoinFeature.CUSTODY_BITGO_TRUST,
610+
CoinFeature.CUSTODY_BITGO_INDIA,
608611
CoinFeature.CUSTODY_BITGO_KOREA,
609612
CoinFeature.CUSTODY_BITGO_EUROPE_APS,
610613
CoinFeature.CUSTODY_BITGO_FRANKFURT,
@@ -619,6 +622,7 @@ const coinsWithExcludedFeatures: Record<string, { features: CoinFeature[] }> = {
619622
CoinFeature.TRANSACTION_DATA,
620623
CoinFeature.CUSTODY,
621624
CoinFeature.CUSTODY_BITGO_TRUST,
625+
CoinFeature.CUSTODY_BITGO_INDIA,
622626
CoinFeature.CUSTODY_BITGO_KOREA,
623627
CoinFeature.CUSTODY_BITGO_EUROPE_APS,
624628
CoinFeature.CUSTODY_BITGO_FRANKFURT,
@@ -632,6 +636,7 @@ const coinsWithExcludedFeatures: Record<string, { features: CoinFeature[] }> = {
632636
CoinFeature.TRANSACTION_DATA,
633637
CoinFeature.CUSTODY,
634638
CoinFeature.CUSTODY_BITGO_TRUST,
639+
CoinFeature.CUSTODY_BITGO_INDIA,
635640
CoinFeature.CUSTODY_BITGO_SINGAPORE,
636641
CoinFeature.CUSTODY_BITGO_KOREA,
637642
CoinFeature.CUSTODY_BITGO_EUROPE_APS,
@@ -646,6 +651,7 @@ const coinsWithExcludedFeatures: Record<string, { features: CoinFeature[] }> = {
646651
CoinFeature.TRANSACTION_DATA,
647652
CoinFeature.CUSTODY,
648653
CoinFeature.CUSTODY_BITGO_TRUST,
654+
CoinFeature.CUSTODY_BITGO_INDIA,
649655
CoinFeature.CUSTODY_BITGO_KOREA,
650656
CoinFeature.CUSTODY_BITGO_EUROPE_APS,
651657
CoinFeature.CUSTODY_BITGO_FRANKFURT,
@@ -659,6 +665,7 @@ const coinsWithExcludedFeatures: Record<string, { features: CoinFeature[] }> = {
659665
CoinFeature.TRANSACTION_DATA,
660666
CoinFeature.CUSTODY,
661667
CoinFeature.CUSTODY_BITGO_TRUST,
668+
CoinFeature.CUSTODY_BITGO_INDIA,
662669
CoinFeature.CUSTODY_BITGO_SINGAPORE,
663670
CoinFeature.CUSTODY_BITGO_KOREA,
664671
CoinFeature.CUSTODY_BITGO_EUROPE_APS,
@@ -673,6 +680,7 @@ const coinsWithExcludedFeatures: Record<string, { features: CoinFeature[] }> = {
673680
CoinFeature.TRANSACTION_DATA,
674681
CoinFeature.CUSTODY,
675682
CoinFeature.CUSTODY_BITGO_TRUST,
683+
CoinFeature.CUSTODY_BITGO_INDIA,
676684
CoinFeature.CUSTODY_BITGO_KOREA,
677685
CoinFeature.CUSTODY_BITGO_EUROPE_APS,
678686
CoinFeature.CUSTODY_BITGO_FRANKFURT,
@@ -685,6 +693,7 @@ const coinsWithExcludedFeatures: Record<string, { features: CoinFeature[] }> = {
685693
CoinFeature.VALUELESS_TRANSFER,
686694
CoinFeature.TRANSACTION_DATA,
687695
CoinFeature.CUSTODY_BITGO_TRUST,
696+
CoinFeature.CUSTODY_BITGO_INDIA,
688697
CoinFeature.CUSTODY,
689698
CoinFeature.CUSTODY_BITGO_KOREA,
690699
CoinFeature.CUSTODY_BITGO_EUROPE_APS,
@@ -699,6 +708,7 @@ const coinsWithExcludedFeatures: Record<string, { features: CoinFeature[] }> = {
699708
CoinFeature.TRANSACTION_DATA,
700709
CoinFeature.CUSTODY,
701710
CoinFeature.CUSTODY_BITGO_TRUST,
711+
CoinFeature.CUSTODY_BITGO_INDIA,
702712
CoinFeature.CUSTODY_BITGO_KOREA,
703713
CoinFeature.CUSTODY_BITGO_EUROPE_APS,
704714
CoinFeature.CUSTODY_BITGO_FRANKFURT,
@@ -824,11 +834,15 @@ coins.forEach((coin, coinName) => {
824834
it(`should return true for CUSTODY_BITGO_TRUST ${coin.family} coin feature`, () => {
825835
coin.features.includes(CoinFeature.CUSTODY_BITGO_TRUST).should.eql(true);
826836
});
837+
it(`should return true for CUSTODY_BITGO_INDIA ${coin.family} coin feature`, () => {
838+
coin.features.includes(CoinFeature.CUSTODY_BITGO_INDIA).should.eql(true);
839+
});
827840
} else if (coin.family === CoinFamily.XTZ || coin.features.includes(CoinFeature.GENERIC_TOKEN)) {
828841
it(`should return false for all custody ${coin.family} coin feature`, () => {
829842
coin.features.includes(CoinFeature.CUSTODY).should.eql(false);
830843
if (coin.family !== CoinFamily.XTZ) {
831844
coin.features.includes(CoinFeature.CUSTODY_BITGO_TRUST).should.eql(false);
845+
coin.features.includes(CoinFeature.CUSTODY_BITGO_INDIA).should.eql(false);
832846
}
833847
coin.features.includes(CoinFeature.CUSTODY_BITGO_MENA_FZE).should.eql(false);
834848
coin.features.includes(CoinFeature.CUSTODY_BITGO_CUSTODY_MENA_FZE).should.eql(false);

modules/statics/test/unit/resources/amsTokenConfig.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export const amsTokenConfig = {
2323
'custody-bitgo-korea',
2424
'custody-bitgo-europe-aps',
2525
'custody-bitgo-frankfurt',
26+
'custody-bitgo-india',
2627
],
2728
decimalPlaces: 7,
2829
asset: 'txlm:BST-GBQTIOS3XGHB7LVYGBKQVJGCZ3R4JL5E4CBSWJ5ALIJUHBKS6263644L',
@@ -60,6 +61,7 @@ export const amsTokenConfig = {
6061
'custody-bitgo-korea',
6162
'custody-bitgo-europe-aps',
6263
'custody-bitgo-frankfurt',
64+
'custody-bitgo-india',
6365
'tss',
6466
'tss-cold',
6567
'staking',
@@ -107,6 +109,7 @@ export const amsTokenConfig = {
107109
'custody-bitgo-korea',
108110
'custody-bitgo-europe-aps',
109111
'custody-bitgo-frankfurt',
112+
'custody-bitgo-india',
110113
],
111114
decimalPlaces: 6,
112115
asset: 'talgo:JPT-162085446',
@@ -143,6 +146,7 @@ export const amsTokenConfig = {
143146
'custody-bitgo-korea',
144147
'custody-bitgo-europe-aps',
145148
'custody-bitgo-frankfurt',
149+
'custody-bitgo-india',
146150
],
147151
decimalPlaces: 8,
148152
asset: 'chex',
@@ -181,6 +185,7 @@ export const amsTokenConfig = {
181185
'custody-bitgo-korea',
182186
'custody-bitgo-europe-aps',
183187
'custody-bitgo-frankfurt',
188+
'custody-bitgo-india',
184189
],
185190
decimalPlaces: 6,
186191
asset: 'hteth:gousd',
@@ -226,6 +231,7 @@ export const amsTokenConfig = {
226231
'custody-bitgo-korea',
227232
'custody-bitgo-europe-aps',
228233
'custody-bitgo-frankfurt',
234+
'custody-bitgo-india',
229235
],
230236
decimalPlaces: 15,
231237
asset: 'txrp:xat',
@@ -266,6 +272,7 @@ export const amsTokenConfig = {
266272
'custody-bitgo-korea',
267273
'custody-bitgo-europe-aps',
268274
'custody-bitgo-frankfurt',
275+
'custody-bitgo-india',
269276
],
270277
decimalPlaces: 6,
271278
asset: 'ttrx:usdt',
@@ -306,6 +313,7 @@ export const amsTokenConfig = {
306313
'custody-bitgo-korea',
307314
'custody-bitgo-europe-aps',
308315
'custody-bitgo-frankfurt',
316+
'custody-bitgo-india',
309317
'tss',
310318
'tss-cold',
311319
'bulk-transaction',
@@ -347,6 +355,7 @@ export const amsTokenConfig = {
347355
'custody-bitgo-korea',
348356
'custody-bitgo-europe-aps',
349357
'custody-bitgo-frankfurt',
358+
'custody-bitgo-india',
350359
'multisig-cold',
351360
'alphanumeric-memo-id',
352361
],
@@ -388,6 +397,7 @@ export const amsTokenConfig = {
388397
'custody-bitgo-korea',
389398
'custody-bitgo-europe-aps',
390399
'custody-bitgo-frankfurt',
400+
'custody-bitgo-india',
391401
'tss',
392402
'tss-cold',
393403
'bulk-transaction',
@@ -431,6 +441,7 @@ export const amsTokenConfig = {
431441
'custody-bitgo-korea',
432442
'custody-bitgo-europe-aps',
433443
'custody-bitgo-frankfurt',
444+
'custody-bitgo-india',
434445
],
435446
decimalPlaces: 6,
436447
asset: 'usdc',
@@ -470,6 +481,7 @@ export const amsTokenConfig = {
470481
'custody-bitgo-korea',
471482
'custody-bitgo-europe-aps',
472483
'custody-bitgo-frankfurt',
484+
'custody-bitgo-india',
473485
],
474486
decimalPlaces: 8,
475487
asset: 'tavaxc:bitgo',
@@ -509,6 +521,7 @@ export const amsTokenConfig = {
509521
'custody-bitgo-korea',
510522
'custody-bitgo-europe-aps',
511523
'custody-bitgo-frankfurt',
524+
'custody-bitgo-india',
512525
'bulk-transaction',
513526
],
514527
decimalPlaces: 18,
@@ -552,6 +565,7 @@ export const amsTokenConfig = {
552565
'custody-bitgo-korea',
553566
'custody-bitgo-europe-aps',
554567
'custody-bitgo-frankfurt',
568+
'custody-bitgo-india',
555569
'bulk-transaction',
556570
],
557571
decimalPlaces: 18,
@@ -631,6 +645,7 @@ export const amsTokenConfigWithCustomToken = {
631645
'custody-bitgo-singapore',
632646
'custody-bitgo-europe-aps',
633647
'custody-bitgo-frankfurt',
648+
'custody-bitgo-india',
634649
'bulk-transaction',
635650
],
636651
decimalPlaces: 6,
@@ -671,6 +686,7 @@ export const amsTokenConfigWithCustomToken = {
671686
'custody-bitgo-trust',
672687
'custody-bitgo-mena-fze',
673688
'custody-bitgo-custody-mena-fze',
689+
'custody-bitgo-india',
674690
],
675691
decimalPlaces: 18,
676692
asset: 'terc',
@@ -712,6 +728,7 @@ export const incorrectAmsTokenConfig = {
712728
'custody-bitgo-korea',
713729
'custody-bitgo-europe-aps',
714730
'custody-bitgo-frankfurt',
731+
'custody-bitgo-india',
715732
],
716733
decimalPlaces: 60,
717734
asset: 'usdc',

0 commit comments

Comments
 (0)