We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab319f2 commit 3de1b81Copy full SHA for 3de1b81
packages/bytes/src.ts/index.ts
@@ -406,8 +406,11 @@ export function splitSignature(signature: SignatureLike): Signature {
406
} else {
407
if (result.v == null) {
408
result.v = 27 + result.recoveryParam;
409
- } else if (result.recoveryParam !== (1 - (result.v % 2))) {
410
- logger.throwArgumentError("signature recoveryParam mismatch v", "signature", signature);
+ } else {
+ const recId = (result.v === 0 || result.v === 1) ? result.v :(1 - (result.v % 2));
411
+ if (result.recoveryParam !== recId) {
412
+ logger.throwArgumentError("signature recoveryParam mismatch v", "signature", signature);
413
+ }
414
}
415
416
0 commit comments