Skip to content

Commit

Permalink
Fixed inverted assert in duplicate name detection for ABI encoding (e…
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo authored and Woodpile37 committed Jan 14, 2024
1 parent 7abaaa7 commit 92abbcc
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
Expand Up @@ -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;
Expand Down

0 comments on commit 92abbcc

Please sign in to comment.