Skip to content

Commit

Permalink
chore(crypto): improve nonce exception message (#765)
Browse files Browse the repository at this point in the history
* improve exception message for senders with zero nonce

* empty commit
  • Loading branch information
oXtxNt9U authored Nov 18, 2024
1 parent b84b898 commit 734a3bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/contracts/source/exceptions/crypto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ export class UnexpectedNonceError extends Exception {
public constructor(txNonce: any, sender: Wallet) {
super(
`Cannot apply a transaction with nonce ${txNonce.toFixed()}: the ` +
`sender ${sender.getAddress()} has nonce ${sender.getNonce().toFixed()}.`,
`sender ${sender.getAddress()} has nonce ${sender.getNonce().toFixed()}${sender.getNonce().isZero() ? " (this might be due to a wrong signature)" : ""}.`,
);
}
}
Expand Down

0 comments on commit 734a3bd

Please sign in to comment.