@polkadot/types-codec 8.14.2-12 → 9.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/extended/Map.js +1 -1
- package/cjs/packageInfo.js +1 -1
- package/extended/Map.js +1 -1
- package/package.json +3 -3
- package/packageInfo.js +1 -1
package/cjs/extended/Map.js
CHANGED
|
@@ -49,7 +49,7 @@ function decodeMapFromMap(registry, KeyClass, ValClass, value) {
|
|
|
49
49
|
const isComplex = KeyClass.prototype instanceof _Array.AbstractArray || KeyClass.prototype instanceof _Struct.Struct || KeyClass.prototype instanceof _Enum.Enum;
|
|
50
50
|
|
|
51
51
|
try {
|
|
52
|
-
output.set(key instanceof KeyClass ? key : new KeyClass(registry, isComplex ? JSON.parse(key) : key), val instanceof ValClass ? val : new ValClass(registry, val));
|
|
52
|
+
output.set(key instanceof KeyClass ? key : new KeyClass(registry, isComplex && typeof key === 'string' ? JSON.parse(key) : key), val instanceof ValClass ? val : new ValClass(registry, val));
|
|
53
53
|
} catch (error) {
|
|
54
54
|
l.error('Failed to decode key or value:', error.message);
|
|
55
55
|
throw error;
|
package/cjs/packageInfo.js
CHANGED
package/extended/Map.js
CHANGED
|
@@ -36,7 +36,7 @@ function decodeMapFromMap(registry, KeyClass, ValClass, value) {
|
|
|
36
36
|
const isComplex = KeyClass.prototype instanceof AbstractArray || KeyClass.prototype instanceof Struct || KeyClass.prototype instanceof Enum;
|
|
37
37
|
|
|
38
38
|
try {
|
|
39
|
-
output.set(key instanceof KeyClass ? key : new KeyClass(registry, isComplex ? JSON.parse(key) : key), val instanceof ValClass ? val : new ValClass(registry, val));
|
|
39
|
+
output.set(key instanceof KeyClass ? key : new KeyClass(registry, isComplex && typeof key === 'string' ? JSON.parse(key) : key), val instanceof ValClass ? val : new ValClass(registry, val));
|
|
40
40
|
} catch (error) {
|
|
41
41
|
l.error('Failed to decode key or value:', error.message);
|
|
42
42
|
throw error;
|
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"./cjs/detectPackage.js"
|
|
21
21
|
],
|
|
22
22
|
"type": "module",
|
|
23
|
-
"version": "
|
|
23
|
+
"version": "9.2.1",
|
|
24
24
|
"main": "./cjs/index.js",
|
|
25
25
|
"module": "./index.js",
|
|
26
26
|
"types": "./index.d.ts",
|
|
@@ -435,7 +435,7 @@
|
|
|
435
435
|
},
|
|
436
436
|
"dependencies": {
|
|
437
437
|
"@babel/runtime": "^7.18.9",
|
|
438
|
-
"@polkadot/util": "^10.1.
|
|
439
|
-
"@polkadot/x-bigint": "^10.1.
|
|
438
|
+
"@polkadot/util": "^10.1.4",
|
|
439
|
+
"@polkadot/x-bigint": "^10.1.4"
|
|
440
440
|
}
|
|
441
441
|
}
|
package/packageInfo.js
CHANGED
|
@@ -5,5 +5,5 @@ export const packageInfo = {
|
|
|
5
5
|
name: '@polkadot/types-codec',
|
|
6
6
|
path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto',
|
|
7
7
|
type: 'esm',
|
|
8
|
-
version: '
|
|
8
|
+
version: '9.2.1'
|
|
9
9
|
};
|