Skip to content

Commit

Permalink
serializeToBufferArray fix
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Mar 26, 2024
1 parent e35a2a1 commit d1ca708
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yarn-project/foundation/src/serialize/serialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export function serializeToBufferArray(...objs: Bufferable[]): Buffer[] {
ret.push(boolToBuffer(obj));
} else if (typeof obj === 'bigint') {
// Throw if bigint does not fit into 32 bytes
if (obj > BigInt('0xffffffffffffffffffffffffffffffff')) {
if (obj > BigInt('0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff')) {
throw new Error(`BigInt ${obj} does not fit into 32 bytes`);
}
ret.push(serializeBigInt(obj));
Expand Down

0 comments on commit d1ca708

Please sign in to comment.