From 3405514d983e31d6828a6b80de0d5a40ff4f45b9 Mon Sep 17 00:00:00 2001 From: Rafael Taranto Date: Thu, 13 Mar 2025 11:08:36 +0000 Subject: [PATCH] fix: fee for sweeps --- lib/plugins/wallet/geth/base.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/plugins/wallet/geth/base.js b/lib/plugins/wallet/geth/base.js index cb6a6fcb..1b8d91ce 100644 --- a/lib/plugins/wallet/geth/base.js +++ b/lib/plugins/wallet/geth/base.js @@ -221,10 +221,9 @@ function generateTx (_toAddress, wallet, amount, includesFee, cryptoCode, txId) const maxPriorityFeePerGas = new BN(web3.utils.toWei('1.0', 'gwei')) // web3 default value const maxFeePerGas = baseFeePerGas.times(2).plus(maxPriorityFeePerGas) - const newGasPrice = BN.minimum(maxFeePerGas, baseFeePerGas.plus(maxPriorityFeePerGas)) const toSend = includesFee - ? new BN(amount).minus(newGasPrice.times(gas)) + ? new BN(amount).minus(maxFeePerGas.times(gas)) : amount const rawTx = {