Skip to content

Commit

Permalink
v0.7.4-beta.3
Browse files Browse the repository at this point in the history
  • Loading branch information
randy75828 committed Nov 29, 2023
1 parent 2a78076 commit 679d537
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "carbon-js-sdk",
"version": "0.7.4-beta.2",
"version": "0.7.4-beta.3",
"description": "TypeScript SDK for Carbon blockchain",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand All @@ -9,7 +9,7 @@
"license": "MIT",
"scripts": {
"watch": "nodemon yarn build",
"build": "tsc && tsc-alias",
"build": "yarn run lint && tsc && tsc-alias",
"cp-proto": "cp ~/go/src/github.com/Switcheo/carbon/gen/proto-ts.tar.gz .",
"sync-proto": "sh scripts/update-proto.sh",
"sync-register": "yarn sync-reset && sh scripts/generate-registry.sh",
Expand Down
11 changes: 4 additions & 7 deletions src/clients/TokenClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ class TokenClient {
if (typeof denom !== "string") return "";
denom = denom.toLowerCase();
if (TokenClient.isPoolTokenLegacy(denom)) {
const match = denom.match(/^([a-z\d.-/]+)-(\d+)-([a-z\d.-/]+)-(\d+)-lp\d+$/i);
const match = denom.match(/^([a-z\d.-/]+)-(\d+)-([a-z\d.-/]+)-(\d+)-lp\d+$/i);
// inconsistent implementation of isPoolToken, exit
if (match === null) return this.getSymbol(denom);

Expand Down Expand Up @@ -715,12 +715,9 @@ class TokenClient {
async getDenomToGeckoIdMap(): Promise<TypeUtils.SimpleMap<string>> {
const networkConfig = this.configProvider.getConfig();
const insights = new InsightsQueryClient(networkConfig);
let tokens: SimpleMap<string> = {};
try {
const response = await insights.DenomToGeckoIdMap();
tokens = response.result.gecko;
} catch (err) {
}
const response = await insights.DenomToGeckoIdMap();
const tokens = response.result.gecko;

return tokens;
}

Expand Down

0 comments on commit 679d537

Please sign in to comment.