Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Commit

Permalink
chore: use consts instead of mutable tx variable
Browse files Browse the repository at this point in the history
  • Loading branch information
legobeat committed Apr 22, 2024
1 parent cef6e65 commit d3e2da0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions subproviders/hooked-wallet-ethtx.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ function HookedWalletEthTxSubprovider(opts) {
opts.getPrivateKey(txData.from, function(err, privateKey) {
if (err) return cb(err)

var tx = TransactionFactory.fromTxData(txData)
tx = tx.sign(privateKey)
cb(null, '0x' + tx.serialize().toString('hex'))
const rawTx = TransactionFactory.fromTxData(txData)
const signedTx = rawTx.sign(privateKey)
cb(null, '0x' + signedTx.serialize().toString('hex'))
})
}

Expand Down

0 comments on commit d3e2da0

Please sign in to comment.