From e49d736d0c941f7bcfa6ec4f09a31c646481cb0d Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Mon, 22 Apr 2024 02:51:58 +0000 Subject: [PATCH] chore: use consts instead of mutable tx variable --- subproviders/hooked-wallet-ethtx.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/subproviders/hooked-wallet-ethtx.js b/subproviders/hooked-wallet-ethtx.js index 450cfba..1a07bd8 100644 --- a/subproviders/hooked-wallet-ethtx.js +++ b/subproviders/hooked-wallet-ethtx.js @@ -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')) }) }