Skip to content

Commit b314202

Browse files
fix(abstract-eth): remove unreachable _counter undefined guard
_counter is typed as `number` and initialized to 0 in the constructor, making the `_counter === undefined` check in validateBaseTransactionFields permanently unreachable dead code. Remove it to eliminate a false sense of safety flagged in the security audit. Ticket: CGD-576
1 parent 190b1d0 commit b314202

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

modules/abstract-eth/src/lib/transactionBuilder.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,9 +386,6 @@ export abstract class TransactionBuilder extends BaseTransactionBuilder {
386386
if (this._common === undefined) {
387387
throw new BuildTransactionError('Invalid transaction: network common');
388388
}
389-
if (this._counter === undefined) {
390-
throw new BuildTransactionError('Invalid transaction: missing address counter');
391-
}
392389
}
393390

394391
/** @inheritdoc */

0 commit comments

Comments
 (0)