Fix ss58Prefix extraction (#4274)
* Fix ss58Prefix extraction * allow fallback * adjust
This commit is contained in:
@@ -20,12 +20,12 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "6.10.2",
|
||||
"version": "6.10.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.16.3",
|
||||
"@polkadot/api": "6.10.2",
|
||||
"@polkadot/types": "6.10.2",
|
||||
"@polkadot/api": "6.10.3",
|
||||
"@polkadot/types": "6.10.3",
|
||||
"@polkadot/util": "^8.0.4",
|
||||
"rxjs": "^7.4.0"
|
||||
}
|
||||
|
||||
@@ -20,19 +20,19 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "6.10.2",
|
||||
"version": "6.10.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.16.3",
|
||||
"@polkadot/api": "6.10.2",
|
||||
"@polkadot/rpc-core": "6.10.2",
|
||||
"@polkadot/types": "6.10.2",
|
||||
"@polkadot/api": "6.10.3",
|
||||
"@polkadot/rpc-core": "6.10.3",
|
||||
"@polkadot/types": "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/rpc-provider": "6.10.2"
|
||||
"@polkadot/rpc-provider": "6.10.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,16 +20,16 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "6.10.2",
|
||||
"version": "6.10.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.16.3",
|
||||
"@polkadot/api-derive": "6.10.2",
|
||||
"@polkadot/api-derive": "6.10.3",
|
||||
"@polkadot/keyring": "^8.0.4",
|
||||
"@polkadot/rpc-core": "6.10.2",
|
||||
"@polkadot/rpc-provider": "6.10.2",
|
||||
"@polkadot/types": "6.10.2",
|
||||
"@polkadot/types-known": "6.10.2",
|
||||
"@polkadot/rpc-core": "6.10.3",
|
||||
"@polkadot/rpc-provider": "6.10.3",
|
||||
"@polkadot/types": "6.10.3",
|
||||
"@polkadot/types-known": "6.10.3",
|
||||
"@polkadot/util": "^8.0.4",
|
||||
"@polkadot/util-crypto": "^8.0.4",
|
||||
"eventemitter3": "^4.0.7",
|
||||
|
||||
@@ -20,12 +20,12 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "6.10.2",
|
||||
"version": "6.10.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.16.3",
|
||||
"@polkadot/rpc-provider": "6.10.2",
|
||||
"@polkadot/types": "6.10.2",
|
||||
"@polkadot/rpc-provider": "6.10.3",
|
||||
"@polkadot/types": "6.10.3",
|
||||
"@polkadot/util": "^8.0.4",
|
||||
"rxjs": "^7.4.0"
|
||||
},
|
||||
|
||||
@@ -20,11 +20,11 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "6.10.2",
|
||||
"version": "6.10.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.16.3",
|
||||
"@polkadot/types": "6.10.2",
|
||||
"@polkadot/types": "6.10.3",
|
||||
"@polkadot/util": "^8.0.4",
|
||||
"@polkadot/util-crypto": "^8.0.4",
|
||||
"@polkadot/x-fetch": "^8.0.4",
|
||||
@@ -34,7 +34,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^8.0.4",
|
||||
"@polkadot/types": "6.10.2",
|
||||
"@polkadot/types": "6.10.3",
|
||||
"mock-socket": "^9.0.8",
|
||||
"nock": "^13.2.1"
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "6.10.2",
|
||||
"version": "6.10.3",
|
||||
"main": "index.js",
|
||||
"bin": {
|
||||
"polkadot-types-chain-info": "./scripts/polkadot-types-chain-info.cjs",
|
||||
@@ -33,10 +33,10 @@
|
||||
"@babel/core": "^7.16.0",
|
||||
"@babel/register": "^7.16.0",
|
||||
"@babel/runtime": "^7.16.3",
|
||||
"@polkadot/api": "6.10.2",
|
||||
"@polkadot/rpc-provider": "6.10.2",
|
||||
"@polkadot/types": "6.10.2",
|
||||
"@polkadot/types-support": "6.10.2",
|
||||
"@polkadot/api": "6.10.3",
|
||||
"@polkadot/rpc-provider": "6.10.3",
|
||||
"@polkadot/types": "6.10.3",
|
||||
"@polkadot/types-support": "6.10.3",
|
||||
"@polkadot/util": "^8.0.4",
|
||||
"handlebars": "^4.7.7",
|
||||
"websocket": "^1.0.34",
|
||||
|
||||
@@ -20,12 +20,12 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "6.10.2",
|
||||
"version": "6.10.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.16.3",
|
||||
"@polkadot/networks": "^8.0.4",
|
||||
"@polkadot/types": "6.10.2",
|
||||
"@polkadot/types": "6.10.3",
|
||||
"@polkadot/util": "^8.0.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "6.10.2",
|
||||
"version": "6.10.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.16.3",
|
||||
|
||||
@@ -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