Code style

This commit is contained in:
Arnaud 2025-04-02 09:46:10 +02:00
parent 23de34af23
commit 92f1932acb
No known key found for this signature in database
GPG Key ID: 20E40A5D3110766F

View File

@ -139,11 +139,12 @@ method populateTransaction*(
# Multiply by 2 because during times of congestion, baseFeePerGas can increase by 12.5% per block.
# https://github.com/ethers-io/ethers.js/discussions/3601#discussioncomment-4461273
populated.maxFeePerGas = some(transaction.maxFeePerGas |? baseFeePerGas * 2 + maxPriorityFeePerGas)
let maxFeePerGas = transaction.maxFeePerGas |? baseFeePerGas * 2 + maxPriorityFeePerGas
populated.maxFeePerGas = some(maxFeePerGas)
populated.gasPrice = none(UInt256)
trace "EIP-1559 is supported", maxPriorityFeePerGas = maxPriorityFeePerGas, maxFeePerGas = populated.maxFeePerGas
trace "EIP-1559 is supported", maxPriorityFeePerGas = maxPriorityFeePerGas, maxFeePerGas = maxFeePerGas
else:
populated.gasPrice = some(transaction.gasPrice |? (await signer.getGasPrice()))
trace "EIP-1559 is not supported", gasPrice = populated.gasPrice