Skip to content

Commit 65f76b3

Browse files
committed
refactor
1 parent 4e6be00 commit 65f76b3

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
@@ -1522,14 +1522,12 @@ export class Snapshot extends EventEmitter {
15221522
Object.keys(typeMap).forEach(param => {
15231523
const type = typeMap[param];
15241524
const typeObject = codec.createTypeObject(type);
1525-
if (type.child) {
1526-
if (
1525+
if (
1526+
(type.child &&
15271527
typeObject.code === 'ARRAY' &&
1528-
typeObject.arrayElementType?.code !== 'TYPE_CODE_UNSPECIFIED'
1529-
) {
1530-
paramTypes[param] = codec.createTypeObject(type);
1531-
}
1532-
} else if (typeObject.code !== 'TYPE_CODE_UNSPECIFIED') {
1528+
typeObject.arrayElementType?.code !== 'TYPE_CODE_UNSPECIFIED') ||
1529+
(!type.child && typeObject.code !== 'TYPE_CODE_UNSPECIFIED')
1530+
) {
15331531
paramTypes[param] = codec.createTypeObject(type);
15341532
}
15351533
});

0 commit comments

Comments
 (0)