Fix ss58Prefix extraction (#4274)
* Fix ss58Prefix extraction * allow fallback * adjust
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user