Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugo0 committed May 17, 2024
1 parent 64b8c37 commit c8c2eb8
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -704,12 +704,24 @@ async function setFeeOptions({
}
}
// cast from bignumber to string before returning
txOptions.gasPrice = txOptions.gasPrice?.toString()
txOptions.maxFeePerGas = txOptions.maxFeePerGas?.toString()
txOptions.maxPriorityFeePerGas = txOptions.maxPriorityFeePerGas?.toString()
txOptions.value = txOptions.value?.toString()
txOptions.gasLimit = txOptions.gasLimit?.toString()
txOptions.nonce = txOptions.nonce?.toString()
if (txOptions.gasPrice !== undefined) {
txOptions.gasPrice = txOptions.gasPrice.toString()
}
if (txOptions.maxFeePerGas !== undefined) {
txOptions.maxFeePerGas = txOptions.maxFeePerGas.toString()
}
if (txOptions.maxPriorityFeePerGas !== undefined) {
txOptions.maxPriorityFeePerGas = txOptions.maxPriorityFeePerGas.toString()
}
if (txOptions.value !== undefined) {
txOptions.value = txOptions.value.toString()
}
if (txOptions.gasLimit !== undefined) {
txOptions.gasLimit = txOptions.gasLimit.toString()
}
if (txOptions.nonce !== undefined) {
txOptions.nonce = txOptions.nonce.toString()
}

config.verbose && console.log('FINAL txOptions:', txOptions)

Expand Down

0 comments on commit c8c2eb8

Please sign in to comment.