carbon-js-sdk 0.4.6-dev.1 → 0.4.6-dev.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -67,7 +67,7 @@ class IBCModule extends base_1.default {
67
67
  });
68
68
  }
69
69
  getChainInfoMap() {
70
- var _a, _b, _c;
70
+ var _a, _b, _c, _d, _e;
71
71
  return __awaiter(this, void 0, void 0, function* () {
72
72
  const tokenClient = this.sdkProvider.getTokenClient();
73
73
  const ibcBridges = tokenClient.bridges.ibc;
@@ -79,7 +79,7 @@ class IBCModule extends base_1.default {
79
79
  const chainInfo = yield this.getChainInfo(chainName, ibcBridge.chain_id_name);
80
80
  if (chainInfo) {
81
81
  const isCosmWasm = (_c = chainInfo.features) === null || _c === void 0 ? void 0 : _c.includes("cosmwasm");
82
- const extendedChainInfo = Object.assign(Object.assign({}, chainInfo), { rpc: isCosmWasm ? constant_1.publicRpcNodes[ibcBridge.chainName] : chainInfo.rpc, minimalDenomMap: {} });
82
+ const extendedChainInfo = Object.assign(Object.assign({}, chainInfo), { rpc: isCosmWasm ? constant_1.publicRpcNodes[ibcBridge.chainName] : chainInfo.rpc, minimalDenomMap: (_e = (_d = chainInfoMap[chainInfo.chainId]) === null || _d === void 0 ? void 0 : _d.minimalDenomMap) !== null && _e !== void 0 ? _e : {} });
83
83
  const extraCurrencies = denomTracesArr.reduce((prev, denomTrace) => {
84
84
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
85
85
  const firstTransferChannel = (_b = (_a = denomTrace.path.match(constant_1.ibcTransferChannelRegex)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.replace("transfer/", "");
@@ -90,7 +90,7 @@ class IBCModule extends base_1.default {
90
90
  const isNativeDenom = tokenClient.isCarbonToken(tokenInfo);
91
91
  if (!(((rootPath.length > 0 || (cw20RegexArr === null || cw20RegexArr === void 0 ? void 0 : cw20RegexArr.length)) && firstTransferChannel === ibcBridge.channels.src_channel)
92
92
  || (firstTransferChannel === ibcBridge.channels.dst_channel && isNativeDenom))) {
93
- if (firstTransferChannel === ibcBridge.channels.src_channel && rootPath.length === 0) {
93
+ if (rootPath.length === 0 && firstTransferChannel === ibcBridge.channels.src_channel) {
94
94
  extendedChainInfo.minimalDenomMap[coinMinimalDenom] = denomTrace.baseDenom;
95
95
  }
96
96
  return prev;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-js-sdk",
3
- "version": "0.4.6-dev.1+59d8f70ed7f7",
3
+ "version": "0.4.6-dev.2+975a420a7190",
4
4
  "description": "TypeScript SDK for Carbon blockchain",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",