@eth-sdk/utils
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -1,4 +0,2 @@ | ||
import { IItemParam } from './interfaces'; | ||
export declare function decode<T = { | ||
[key: string]: any; | ||
}>(params: IItemParam[], data: string): T; | ||
import { IItemParam, IDecoded } from './interfaces'; | ||
export declare function decode<T = IDecoded>(params: IItemParam[], data: string): T; |
@@ -49,3 +49,5 @@ "use strict"; | ||
if (hex_1.isHex(data, 'data')) { | ||
result = {}; | ||
result = { | ||
length: 0, | ||
}; | ||
data = data.slice(2); | ||
@@ -85,3 +87,4 @@ for (let i = 0; i < params.length; i += 1) { | ||
} | ||
result = Object.assign(Object.assign({}, result), { [name]: value }); | ||
result = Object.assign(Object.assign({}, result), { [name]: value, [i]: value }); | ||
result.length += 1; | ||
} | ||
@@ -88,0 +91,0 @@ } |
@@ -27,1 +27,6 @@ import { TType, TItemStateMutability, TItemType } from './types'; | ||
} | ||
export interface IDecoded { | ||
[key: string]: any; | ||
[key: number]: any; | ||
length: number; | ||
} |
{ | ||
"name": "@eth-sdk/utils", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "Eth sdk utils", | ||
@@ -5,0 +5,0 @@ "author": { |
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
66905
1071