Skip to content

Commit

Permalink
Merge pull request #5461 from BitGo/COPS-3277
Browse files Browse the repository at this point in the history
feat(bitgo): add bitgo custody mena fze entity
  • Loading branch information
Mustafiz04 authored Feb 3, 2025
2 parents 0bde625 + 2f9452c commit 8bb5f83
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions modules/statics/src/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export class AccountCoin extends BaseCoin {
CoinFeature.CUSTODY,
CoinFeature.CUSTODY_BITGO_TRUST,
CoinFeature.CUSTODY_BITGO_MENA_FZE,
CoinFeature.CUSTODY_BITGO_CUSTODY_MENA_FZE,
CoinFeature.CUSTODY_BITGO_SINGAPORE,
CoinFeature.CUSTODY_BITGO_KOREA,
CoinFeature.CUSTODY_BITGO_EUROPE_APS,
Expand Down
1 change: 1 addition & 0 deletions modules/statics/src/ada.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export class Ada extends BaseCoin {
CoinFeature.REQUIRES_BIG_NUMBER,
CoinFeature.CUSTODY_BITGO_TRUST,
CoinFeature.CUSTODY_BITGO_MENA_FZE,
CoinFeature.CUSTODY_BITGO_CUSTODY_MENA_FZE,
CoinFeature.STAKING,
CoinFeature.BULK_TRANSACTION,
];
Expand Down
1 change: 1 addition & 0 deletions modules/statics/src/avaxp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export class AVAXPCoin extends BaseCoin {
CoinFeature.UNSPENT_MODEL,
CoinFeature.CUSTODY_BITGO_TRUST,
CoinFeature.CUSTODY_BITGO_MENA_FZE,
CoinFeature.CUSTODY_BITGO_CUSTODY_MENA_FZE,
CoinFeature.CUSTODY_BITGO_GERMANY,
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.MULTISIG_COLD,
Expand Down
4 changes: 4 additions & 0 deletions modules/statics/src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ export enum CoinFeature {
* This coin supports custody in BitGo MENA FZE entities
*/
CUSTODY_BITGO_MENA_FZE = 'custody-bitgo-mena-fze',
/**
* This coin supports custody in BitGo Custody MENA FZE entities
*/
CUSTODY_BITGO_CUSTODY_MENA_FZE = 'custody-bitgo-custody-mena-fze',
/*
* This coin has transactions that expire after a certain amount of time.
*/
Expand Down
3 changes: 2 additions & 1 deletion modules/statics/src/coins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ const XTZ_FEATURES = [
(feature) =>
feature !== CoinFeature.CUSTODY &&
feature !== CoinFeature.CUSTODY_BITGO_TRUST &&
feature !== CoinFeature.CUSTODY_BITGO_MENA_FZE
feature !== CoinFeature.CUSTODY_BITGO_MENA_FZE &&
feature !== CoinFeature.CUSTODY_BITGO_CUSTODY_MENA_FZE
);

const XRP_FEATURES = [
Expand Down
1 change: 1 addition & 0 deletions modules/statics/src/ofc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export class OfcCoin extends BaseCoin {
CoinFeature.CUSTODY,
CoinFeature.CUSTODY_BITGO_TRUST,
CoinFeature.CUSTODY_BITGO_MENA_FZE,
CoinFeature.CUSTODY_BITGO_CUSTODY_MENA_FZE,
];

// If set, this coin is the native address format for this token.
Expand Down
1 change: 1 addition & 0 deletions modules/statics/src/utxo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export class UtxoCoin extends BaseCoin {
CoinFeature.CUSTODY,
CoinFeature.CUSTODY_BITGO_TRUST,
CoinFeature.CUSTODY_BITGO_MENA_FZE,
CoinFeature.CUSTODY_BITGO_CUSTODY_MENA_FZE,
CoinFeature.MULTISIG_COLD,
CoinFeature.PAYGO,
];
Expand Down
5 changes: 5 additions & 0 deletions modules/statics/test/unit/coins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -624,11 +624,15 @@ coins.forEach((coin, coinName) => {
it(`should return true for CUSTODY_BITGO_MENA_FZE ${coin.family} coin feature`, () => {
coin.features.includes(CoinFeature.CUSTODY_BITGO_MENA_FZE).should.eql(true);
});
it(`should return true for CUSTODY_BITGO_CUSTODY_MENA_FZE ${coin.family} coin feature`, () => {
coin.features.includes(CoinFeature.CUSTODY_BITGO_CUSTODY_MENA_FZE).should.eql(true);
});
} else if (coin.family === CoinFamily.XTZ || coin.features.includes(CoinFeature.GENERIC_TOKEN)) {
it(`should return false for all custody ${coin.family} coin feature`, () => {
coin.features.includes(CoinFeature.CUSTODY).should.eql(false);
coin.features.includes(CoinFeature.CUSTODY_BITGO_TRUST).should.eql(false);
coin.features.includes(CoinFeature.CUSTODY_BITGO_MENA_FZE).should.eql(false);
coin.features.includes(CoinFeature.CUSTODY_BITGO_CUSTODY_MENA_FZE).should.eql(false);
coin.features.includes(CoinFeature.CUSTODY_BITGO_NEW_YORK).should.eql(false);
coin.features.includes(CoinFeature.CUSTODY_BITGO_GERMANY).should.eql(false);
coin.features.includes(CoinFeature.CUSTODY_BITGO_SWITZERLAND).should.eql(false);
Expand All @@ -640,6 +644,7 @@ coins.forEach((coin, coinName) => {
coin.features.includes(CoinFeature.CUSTODY).should.eql(coinSupportsCustody);
coin.features.includes(CoinFeature.CUSTODY_BITGO_TRUST).should.eql(coinSupportsCustody);
coin.features.includes(CoinFeature.CUSTODY_BITGO_MENA_FZE).should.eql(coinSupportsCustody);
coin.features.includes(CoinFeature.CUSTODY_BITGO_CUSTODY_MENA_FZE).should.eql(coinSupportsCustody);
});

it('should return false for all non-SD coin feature', () => {
Expand Down

0 comments on commit 8bb5f83

Please sign in to comment.