Skip to content

Commit

Permalink
feat: update version to 2.0.0-beta.12; add btcTokens getter and bitco…
Browse files Browse the repository at this point in the history
…in configuration in oraidex.json
  • Loading branch information
vuonghuuhung committed Dec 4, 2024
1 parent 1dbd8d3 commit 842f8a0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/oraidex-common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oraichain/oraidex-common",
"version": "2.0.0-beta.11",
"version": "2.0.0-beta.12",
"main": "./build/index.js",
"module": "./build/index.js",
"types": "./build/index.d.ts",
Expand Down
5 changes: 5 additions & 0 deletions packages/oraidex-common/src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
} from "./constant";
import { NetworkConfig } from "./network";
import { CustomChainInfo } from "./format-types";
import { ChainIdEnum } from "./interface";

export class OraidexCommon {
static instance: OraidexCommon;
Expand Down Expand Up @@ -79,6 +80,10 @@ export class OraidexCommon {
return this.tokenConfig.kawaiiTokens;
}

get btcTokens() {
return this.flattenTokens.filter((token) => token.chainId === ChainIdEnum.Bitcoin);
}

get oraichainTokensWithIcon() {
return mapListWithIcon(this.oraichainTokens, tokensIcon, "coinGeckoId");
}
Expand Down
6 changes: 6 additions & 0 deletions packages/oraidex-common/src/supported/config/oraidex.json
Original file line number Diff line number Diff line change
Expand Up @@ -298,5 +298,11 @@
"denom": "usat",
"coingecko_id": "bitcoin"
}
},
"bitcoin": {
"BTC": {
"denom": "btc",
"coingecko_id": "bitcoin"
}
}
}

0 comments on commit 842f8a0

Please sign in to comment.