Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions modules/statics/src/allCoinsAndTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ import {
ZKETH_FEATURES,
ACCOUNT_COIN_DEFAULT_FEATURES_EXCLUDE_SINGAPORE_AND_MENA_FZE,
WFLR_FEATURES,
ACCOUNT_COIN_DEFAULT_FEATURES_EXCLUDE_MENA_FZE,
} from './coinFeatures';
import { botTokens } from './coins/botTokens';
import { adaTokens } from './coins/adaTokens';
Expand Down Expand Up @@ -483,7 +484,7 @@ export const allCoinsAndTokens = [
18,
UnderlyingAsset.RBTC,
BaseUnit.ETH,
RBTC_FEATURES
AccountCoin.getFeaturesByTypeExcluding([CoinFeature.CUSTODY_BITGO_MENA_FZE], RBTC_FEATURES)
),
account(
'9cf6d137-6c6b-4fc0-acc0-8e78a1599c15',
Expand Down Expand Up @@ -2620,7 +2621,7 @@ export const allCoinsAndTokens = [
7,
UnderlyingAsset['xlm:SLT-GCKA6K5PCQ6PNF5RQBF7PQDJWRHO6UOGFMRLK3DYHDOI244V47XKQ4GP'],
'smartlands.io',
AccountCoin.DEFAULT_FEATURES,
ACCOUNT_COIN_DEFAULT_FEATURES_EXCLUDE_MENA_FZE,
'',
'SLT'
),
Expand Down
16 changes: 16 additions & 0 deletions modules/statics/src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3469,4 +3469,20 @@ export abstract class BaseCoin {
this.network = options.network;
this.primaryKeyCurve = options.primaryKeyCurve;
}

/**
* Returns features from a base feature set, excluding specified features
* @param excludedFeatures Array of features to exclude
* @param baseFeatures Base feature array to filter from (optional)
* @returns Filtered array of features
*/
public static getFeaturesByTypeExcluding(
excludedFeatures: CoinFeature[],
baseFeatures?: CoinFeature[]
): CoinFeature[] {
if (!baseFeatures) {
return [];
}
return baseFeatures.filter((feature) => !excludedFeatures.includes(feature));
}
}
4 changes: 3 additions & 1 deletion modules/statics/src/coins/avaxTokens.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { AccountCoin, avaxErc20, tavaxErc20 } from '../account';
import { CoinFeature, UnderlyingAsset } from '../base';
import { ACCOUNT_COIN_DEFAULT_FEATURES_EXCLUDE_MENA_FZE } from '../coinFeatures';

export const avaxTokens = [
avaxErc20(
Expand Down Expand Up @@ -568,7 +569,8 @@ export const avaxTokens = [
'Betswap.gg',
18,
'0x49f519002eeced6902f24c0be72b6d898e4d27fc',
UnderlyingAsset['avaxc:bsgg']
UnderlyingAsset['avaxc:bsgg'],
ACCOUNT_COIN_DEFAULT_FEATURES_EXCLUDE_MENA_FZE
),
avaxErc20(
'e6bd6935-daac-4edc-8cfb-f8305ebbdb11',
Expand Down
21 changes: 13 additions & 8 deletions modules/statics/src/coins/bscTokens.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { bscToken, tbscToken, AccountCoin } from '../account';
import { UnderlyingAsset, CoinFeature } from '../base';
import { AccountCoin, bscToken, tbscToken } from '../account';
import { CoinFeature, UnderlyingAsset } from '../base';
import {
BSC_TOKEN_FEATURES,
BSC_TOKEN_FEATURES_EXCLUDE_SINGAPORE,
BSC_TOKEN_FEATURES_EXCLUDE_MENA_FZE,
BSC_TOKEN_FEATURES_EXCLUDE_SINGAPORE,
} from '../coinFeatures';

export const bscTokens = [
Expand Down Expand Up @@ -150,7 +150,12 @@ export const bscTokens = [
'0xcebef3df1f3c5bfd90fde603e71f31a53b11944d',
UnderlyingAsset['bsc:litt'],
AccountCoin.getFeaturesByTypeExcluding(
[CoinFeature.CUSTODY_BITGO_GERMANY, CoinFeature.CUSTODY_BITGO_EUROPE_APS, CoinFeature.CUSTODY_BITGO_FRANKFURT],
[
CoinFeature.CUSTODY_BITGO_GERMANY,
CoinFeature.CUSTODY_BITGO_EUROPE_APS,
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.CUSTODY_BITGO_MENA_FZE,
],
BSC_TOKEN_FEATURES
)
),
Expand Down Expand Up @@ -197,7 +202,7 @@ export const bscTokens = [
6,
'0x71b3a0566f4bf80331d115d8026a7022bf670cce',
UnderlyingAsset['bsc:dd'],
BSC_TOKEN_FEATURES
AccountCoin.getFeaturesByTypeExcluding([CoinFeature.CUSTODY_BITGO_MENA_FZE], BSC_TOKEN_FEATURES)
),
bscToken(
'ebfcdf18-bdad-41da-bbda-2b3a71338c1c',
Expand Down Expand Up @@ -317,7 +322,7 @@ export const bscTokens = [
18,
'0x9b4bdddaeb68d85b0848bab7774e6855439fd94e',
UnderlyingAsset['bsc:tking'],
BSC_TOKEN_FEATURES
AccountCoin.getFeaturesByTypeExcluding([CoinFeature.CUSTODY_BITGO_MENA_FZE], BSC_TOKEN_FEATURES)
),
bscToken(
'd24030d5-e0a1-4216-9b80-9582ce5e4de1',
Expand Down Expand Up @@ -1019,7 +1024,7 @@ export const bscTokens = [
18,
'0x2003f7ba57ea956b05b85c60b4b2ceea9b111256',
UnderlyingAsset['bsc:kmd'],
BSC_TOKEN_FEATURES
AccountCoin.getFeaturesByTypeExcluding([CoinFeature.CUSTODY_BITGO_MENA_FZE], BSC_TOKEN_FEATURES)
),
bscToken(
'a4cda030-4c22-4ece-93b4-840da127781c',
Expand Down Expand Up @@ -1180,7 +1185,7 @@ export const bscTokens = [
18,
'0xad29abb318791d579433d831ed122afeaf29dcfe',
UnderlyingAsset['bsc:ftm'],
BSC_TOKEN_FEATURES
AccountCoin.getFeaturesByTypeExcluding([CoinFeature.CUSTODY_BITGO_MENA_FZE], BSC_TOKEN_FEATURES)
),
bscToken(
'2a1d251c-388d-48cb-9f91-53d41d7e0e91',
Expand Down
Loading