@chain-registry/keplr 2.0.251 → 2.0.281

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.
package/esm/index.js CHANGED
@@ -62,16 +62,17 @@ export const chainRegistryChainToKeplr = (chain, assets, options = {
62
62
  if (!options.getExplorer)
63
63
  options.getExplorer = getExplr;
64
64
  const features = [];
65
+ const codebase = chain.codebase;
65
66
  // check if it's a Cosmos SDK chain (either new or old format)
66
- const isCosmosSDKChain = chain.codebase?.sdk?.type === 'cosmos' || !!chain.codebase?.cosmosSdkVersion;
67
+ const isCosmosSDKChain = codebase?.sdk?.type === 'cosmos' || !!codebase?.cosmosSdkVersion;
67
68
  if (isCosmosSDKChain) {
68
69
  // determine SDK version
69
70
  let sdkVer;
70
71
  if (chain.codebase?.sdk?.type === 'cosmos' && chain.codebase.sdk.version) {
71
72
  sdkVer = extractVersion(chain.codebase.sdk.version);
72
73
  }
73
- else if (chain.codebase?.cosmosSdkVersion) {
74
- sdkVer = extractVersion(chain.codebase.cosmosSdkVersion);
74
+ else if (codebase?.cosmosSdkVersion) {
75
+ sdkVer = extractVersion(codebase.cosmosSdkVersion);
75
76
  }
76
77
  else {
77
78
  // if NOT specified, we assume stargate, sorry not sorry
@@ -89,10 +90,10 @@ export const chainRegistryChainToKeplr = (chain, assets, options = {
89
90
  if (semver.satisfies(sdkVer, '>=0.45'))
90
91
  features.push('ibc-go');
91
92
  // CosmWasm feature detection
92
- const cosmwasmEnabled = chain.codebase?.cosmwasm?.enabled ?? chain.codebase?.cosmwasmEnabled ?? false;
93
+ const cosmwasmEnabled = chain.codebase?.cosmwasm?.enabled ?? codebase?.cosmwasmEnabled ?? false;
93
94
  if (cosmwasmEnabled) {
94
95
  features.push('cosmwasm');
95
- const wasmVer = extractVersion(chain.codebase?.cosmwasm?.version ?? chain.codebase?.cosmwasmVersion ?? '0.24.0');
96
+ const wasmVer = extractVersion(chain.codebase?.cosmwasm?.version ?? codebase?.cosmwasmVersion ?? '0.24.0');
96
97
  if (semver.satisfies(wasmVer, '>=0.24.0'))
97
98
  features.push('wasmd_0.24+');
98
99
  }
package/index.js CHANGED
@@ -69,16 +69,17 @@ const chainRegistryChainToKeplr = (chain, assets, options = {
69
69
  if (!options.getExplorer)
70
70
  options.getExplorer = getExplr;
71
71
  const features = [];
72
+ const codebase = chain.codebase;
72
73
  // check if it's a Cosmos SDK chain (either new or old format)
73
- const isCosmosSDKChain = chain.codebase?.sdk?.type === 'cosmos' || !!chain.codebase?.cosmosSdkVersion;
74
+ const isCosmosSDKChain = codebase?.sdk?.type === 'cosmos' || !!codebase?.cosmosSdkVersion;
74
75
  if (isCosmosSDKChain) {
75
76
  // determine SDK version
76
77
  let sdkVer;
77
78
  if (chain.codebase?.sdk?.type === 'cosmos' && chain.codebase.sdk.version) {
78
79
  sdkVer = extractVersion(chain.codebase.sdk.version);
79
80
  }
80
- else if (chain.codebase?.cosmosSdkVersion) {
81
- sdkVer = extractVersion(chain.codebase.cosmosSdkVersion);
81
+ else if (codebase?.cosmosSdkVersion) {
82
+ sdkVer = extractVersion(codebase.cosmosSdkVersion);
82
83
  }
83
84
  else {
84
85
  // if NOT specified, we assume stargate, sorry not sorry
@@ -96,10 +97,10 @@ const chainRegistryChainToKeplr = (chain, assets, options = {
96
97
  if (semver_1.default.satisfies(sdkVer, '>=0.45'))
97
98
  features.push('ibc-go');
98
99
  // CosmWasm feature detection
99
- const cosmwasmEnabled = chain.codebase?.cosmwasm?.enabled ?? chain.codebase?.cosmwasmEnabled ?? false;
100
+ const cosmwasmEnabled = chain.codebase?.cosmwasm?.enabled ?? codebase?.cosmwasmEnabled ?? false;
100
101
  if (cosmwasmEnabled) {
101
102
  features.push('cosmwasm');
102
- const wasmVer = extractVersion(chain.codebase?.cosmwasm?.version ?? chain.codebase?.cosmwasmVersion ?? '0.24.0');
103
+ const wasmVer = extractVersion(chain.codebase?.cosmwasm?.version ?? codebase?.cosmwasmVersion ?? '0.24.0');
103
104
  if (semver_1.default.satisfies(wasmVer, '>=0.24.0'))
104
105
  features.push('wasmd_0.24+');
105
106
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chain-registry/keplr",
3
- "version": "2.0.251",
3
+ "version": "2.0.281",
4
4
  "author": "Dan Lynch <pyramation@gmail.com>",
5
5
  "description": "Chain Registry to Keplr",
6
6
  "main": "index.js",
@@ -20,11 +20,11 @@
20
20
  "url": "https://github.com/hyperweb-io/chain-registry/issues"
21
21
  },
22
22
  "dependencies": {
23
- "@chain-registry/types": "^2.0.251",
23
+ "@chain-registry/types": "^2.0.281",
24
24
  "@keplr-wallet/cosmos": "0.12.28",
25
25
  "@keplr-wallet/crypto": "0.12.28",
26
26
  "@types/semver": "^7.5.8",
27
- "chain-registry": "^2.0.251",
27
+ "chain-registry": "^2.0.281",
28
28
  "semver": "^7.5.0"
29
29
  },
30
30
  "scripts": {
@@ -38,5 +38,5 @@
38
38
  "test:watch": "jest --watch"
39
39
  },
40
40
  "keywords": [],
41
- "gitHead": "9de1ecbf1e724a8b1525ee73b9e6fef5bc331e77"
41
+ "gitHead": "f44d7d5a66fbdbb84947fcd68be481a13e9e11dc"
42
42
  }