Skip to content

Commit

Permalink
Fixed inverted assert in duplicate name detection for ABI encoding (#…
Browse files Browse the repository at this point in the history
ricmoo committed Feb 18, 2023
1 parent 48bbef7 commit 762c2f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src.ts/abi/coders/array.ts
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ export function pack(writer: Writer, coders: ReadonlyArray<Coder>, values: Array
assert(name, "cannot encode object for signature with missing names",
"INVALID_ARGUMENT", { argument: "values", info: { coder }, value: values });

assert(unique[name], "cannot encode object for signature with duplicate names",
assert(!unique[name], "cannot encode object for signature with duplicate names",
"INVALID_ARGUMENT", { argument: "values", info: { coder }, value: values });

unique[name] = true;

0 comments on commit 762c2f3

Please sign in to comment.