Skip to content

Commit

Permalink
Restore invalid signature behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
fvictorio committed Mar 31, 2021
1 parent 3010aff commit 42cafdd
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ export class TxPool {
try {
return tx.getSenderAddress(); // verifies signature
} catch (e) {
throw new InvalidInputError(e.message);
throw new InvalidInputError("Invalid Signature");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,7 @@ export class HardhatNode extends EventEmitter {
try {
sender = tx.getSenderAddress(); // verifies signature as a side effect
} catch (e) {
throw new InvalidInputError(e.message);
throw new InvalidInputError("Invalid Signature");
}

const senderNonce = await this._txPool.getExecutableNonce(sender);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ describe("Tx Pool", () => {
await assert.isRejected(
txPool.addTransaction(tx),
InvalidInputError,
"This transaction is not signed"
"Invalid Signature"
);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3543,7 +3543,7 @@ describe("Eth module", function () {
"0xf3808501dcd6500083015f9080800082011a80a00dbd1a45b7823be518540ca77afb7178a470b8054281530a6cdfd0ad3328cf96",
],
// A missing `r` is now treated as unsigned, via the BaseTransaction method "isSigned"
"This transaction is not signed"
"Invalid Signature"
);
});

Expand Down

0 comments on commit 42cafdd

Please sign in to comment.