Fix ss58Prefix extraction (#4274)

* Fix ss58Prefix extraction

* allow fallback

* adjust
This commit is contained in:
Jaco
2021-11-30 16:07:50 +02:00
committed by GitHub
parent 7be3cc949f
commit bacb757d7d
13 changed files with 70 additions and 61 deletions
+3 -3
View File
@@ -20,18 +20,18 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "6.10.2",
"version": "6.10.3",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.3",
"@polkadot/types-known": "6.10.2",
"@polkadot/types-known": "6.10.3",
"@polkadot/util": "^8.0.4",
"@polkadot/util-crypto": "^8.0.4",
"rxjs": "^7.4.0"
},
"devDependencies": {
"@polkadot/keyring": "^8.0.4",
"@polkadot/types-support": "6.10.2",
"@polkadot/types-support": "6.10.3",
"@types/bn.js": "^4.11.6",
"bn.js": "^4.12.0"
}
+1 -1
View File
@@ -122,7 +122,7 @@ function injectExtrinsics (registry: Registry, { lookup, pallets }: MetadataLate
function extractProperties (registry: Registry, metadata: Metadata): ChainProperties | undefined {
const original = registry.getChainProperties();
const constants = decorateConstants(registry, metadata.asLatest, metadata.version);
const ss58Format = constants.system?.ss58Prefix;
const ss58Format = constants.system && (constants.system.sS58Prefix || constants.system.ss58Prefix);
if (!ss58Format) {
return original;