New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@polkadot/params

Package Overview
Dependencies
Maintainers
1
Versions
163
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@polkadot/params - npm Package Compare versions

Comparing version 0.15.8 to 0.16.1

24

decode/value/method.js

@@ -5,3 +5,3 @@ "use strict";

var _values = _interopRequireDefault(require("@babel/runtime/core-js/object/values"));
var _keys = _interopRequireDefault(require("@babel/runtime/core-js/object/keys"));

@@ -14,7 +14,5 @@ // Copyright 2017-2018 Jaco Greeff

module.exports = function call(decode, input, isPublic) {
// flowlint-next-line unclear-type:off
const sections = (0, _values.default)(extrinsics);
const section = sections.find(section => section.index[0] === input[0]);
const section = (0, _keys.default)(extrinsics).find(name => extrinsics[name].index[0] === input[0]);
if (!section) {
if (section === undefined) {
console.error(':: Unable to find section', input[0]);

@@ -27,9 +25,8 @@ return {

};
} // flowlint-next-line unclear-type:off
}
const methods = isPublic ? extrinsics[section].public : extrinsics[section].private;
const method = (0, _keys.default)(methods).find(name => methods[name].index[1] === input[1]);
const methods = (0, _values.default)(section.methods[isPublic ? 'public' : 'private']);
const extrinsic = methods.find(method => method.index[0] === input[1]);
if (!extrinsic) {
if (method === undefined) {
console.error(':: Unable to find method', input[1]);

@@ -42,6 +39,5 @@ return {

};
} // flowlint-next-line unclear-type:off
}
const params = (0, _values.default)(extrinsic.params);
const params = (0, _keys.default)(methods[method].params).map(name => methods[method].params[name]);
const result = {

@@ -51,3 +47,3 @@ length: 2,

value: {
extrinsic,
extrinsic: methods[method],
params: []

@@ -54,0 +50,0 @@ }

{
"name": "@polkadot/params",
"version": "0.15.8",
"version": "0.16.1",
"description": "Type defintions for parameters as passed in calls",

@@ -33,7 +33,7 @@ "main": "index.js",

"@babel/runtime": "^7.0.0-beta.47",
"@polkadot/extrinsics": "^0.15.8",
"@polkadot/extrinsics-substrate": "^0.15.8",
"@polkadot/primitives": "^0.15.8",
"@polkadot/extrinsics": "^0.16.1",
"@polkadot/extrinsics-substrate": "^0.16.1",
"@polkadot/primitives": "^0.16.1",
"@polkadot/util": "^0.21.3"
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc