Skip to content

Commit 5469021

Browse files
committed
filter out non tradable blockchains
1 parent fbea666 commit 5469021

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/client/client.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,8 @@ export const BIG_NUMBER_FORMAT = {
276276
prefix: ''
277277
}
278278

279+
const TRADABLE_CHAINS = ['btc','eth','neo']
280+
279281
export const UNLIMITED_APPROVAL = Number.MAX_SAFE_INTEGER
280282

281283
export class Client {
@@ -3187,12 +3189,14 @@ export class Client {
31873189
const assetList = {}
31883190
const assets: Asset[] = await this.listAssets()
31893191
for (const a of assets) {
3190-
assetList[a.symbol] = {
3191-
hash: a.hash,
3192-
precision: 8,
3193-
symbol: a.symbol,
3194-
blockchainPrecision: a.blockchainPrecision,
3195-
blockchain: a.blockchain
3192+
if(TRADABLE_CHAINS.includes(a.blockchain.toString().toLowerCase())) {
3193+
assetList[a.symbol] = {
3194+
hash: a.hash,
3195+
precision: 8,
3196+
symbol: a.symbol,
3197+
blockchainPrecision: a.blockchainPrecision,
3198+
blockchain: a.blockchain
3199+
}
31963200
}
31973201
}
31983202
return assetList

0 commit comments

Comments
 (0)