@polkadot-api/metadata-builders
Advanced tools
Comparing version 0.6.0 to 0.7.0
@@ -75,2 +75,3 @@ import * as scale from '@polkadot-api/substrate-bindings'; | ||
metadata: V14 | V15; | ||
call: number | null; | ||
} | ||
@@ -77,0 +78,0 @@ declare const getLookupFn: (metadata: V14 | V15) => MetadataLookup; |
@@ -224,3 +224,11 @@ 'use strict'; | ||
}; | ||
return Object.assign(getLookupEntryDef, { metadata }); | ||
const getCall = () => { | ||
if ("outerEnums" in metadata) { | ||
return metadata.outerEnums.call; | ||
} | ||
const extrinsic = metadata.lookup[metadata.extrinsic?.type]; | ||
const call = extrinsic?.params.find((p) => p.name === "Call"); | ||
return call?.type ?? null; | ||
}; | ||
return Object.assign(getLookupEntryDef, { metadata, call: getCall() }); | ||
}; | ||
@@ -227,0 +235,0 @@ |
{ | ||
"name": "@polkadot-api/metadata-builders", | ||
"version": "0.6.0", | ||
"version": "0.7.0", | ||
"author": "Josep M Sobrepere (https://github.com/josepot)", | ||
@@ -38,4 +38,4 @@ "repository": { | ||
"dependencies": { | ||
"@polkadot-api/substrate-bindings": "0.6.3", | ||
"@polkadot-api/utils": "0.1.1" | ||
"@polkadot-api/utils": "0.1.1", | ||
"@polkadot-api/substrate-bindings": "0.7.0" | ||
}, | ||
@@ -42,0 +42,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
236645
1981
+ Added@polkadot-api/substrate-bindings@0.7.0(transitive)
- Removed@polkadot-api/substrate-bindings@0.6.3(transitive)