Skip to content

Commit 10f3bc6

Browse files
committed
refactor
1 parent 8a15343 commit 10f3bc6

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/transaction.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1729,14 +1729,12 @@ export class Snapshot extends EventEmitter {
17291729
Object.keys(typeMap).forEach(param => {
17301730
const type = typeMap[param];
17311731
const typeObject = codec.createTypeObject(type);
1732-
if (type.child) {
1733-
if (
1732+
if (
1733+
(type.child &&
17341734
typeObject.code === 'ARRAY' &&
1735-
typeObject.arrayElementType?.code !== 'TYPE_CODE_UNSPECIFIED'
1736-
) {
1737-
paramTypes[param] = codec.createTypeObject(type);
1738-
}
1739-
} else if (typeObject.code !== 'TYPE_CODE_UNSPECIFIED') {
1735+
typeObject.arrayElementType?.code !== 'TYPE_CODE_UNSPECIFIED') ||
1736+
(!type.child && typeObject.code !== 'TYPE_CODE_UNSPECIFIED')
1737+
) {
17401738
paramTypes[param] = codec.createTypeObject(type);
17411739
}
17421740
});

0 commit comments

Comments
 (0)