@@ -22,7 +22,7 @@
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/types-codec": "10.4.2-6-x",
|
||||
"@polkadot/util": "^12.0.1",
|
||||
"@polkadot/util": "^12.1.1",
|
||||
"tslib": "^2.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -39,7 +39,7 @@ function getTypeClassMap (value: TypeDef): Record<string, string> {
|
||||
const subs = getSubDefArray(value);
|
||||
const map: Record<string, string> = {};
|
||||
|
||||
for (let i = 0; i < subs.length; i++) {
|
||||
for (let i = 0, count = subs.length; i < count; i++) {
|
||||
map[subs[i].name as string] = getTypeDefType(subs[i]);
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ function encodeSubTypes (registry: Registry, sub: TypeDef[], asEnum?: boolean, e
|
||||
|
||||
const inner: Record<string, string> = objectSpread({}, extra);
|
||||
|
||||
for (let i = 0; i < sub.length; i++) {
|
||||
for (let i = 0, count = sub.length; i < count; i++) {
|
||||
const def = sub[i];
|
||||
|
||||
inner[def.name as string] = encodeTypeDef(registry, def);
|
||||
|
||||
@@ -14,7 +14,7 @@ export function typeSplit (type: string): string[] {
|
||||
// current start position
|
||||
let start = 0;
|
||||
|
||||
for (let i = 0; i < type.length; i++) {
|
||||
for (let i = 0, count = type.length; i < count; i++) {
|
||||
switch (type[i]) {
|
||||
// if we are not nested, add the type
|
||||
case ',': {
|
||||
|
||||
Reference in New Issue
Block a user