mirror of
https://github.com/status-im/safe-react.git
synced 2025-01-12 19:14:08 +00:00
Merge pull request #1845 from gnosis/hotfix/xdai-gas-estimation-low
(Hotix) - xDAI Gas estimation fix
This commit is contained in:
commit
a1acfc206a
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "safe-react",
|
"name": "safe-react",
|
||||||
"version": "2.19.0",
|
"version": "2.19.1",
|
||||||
"description": "Allowing crypto users manage funds in a safer way",
|
"description": "Allowing crypto users manage funds in a safer way",
|
||||||
"website": "https://github.com/gnosis/safe-react#readme",
|
"website": "https://github.com/gnosis/safe-react#readme",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
|
@ -182,15 +182,17 @@ const calculateMinimumGasForTransaction = async (
|
|||||||
const amountOfGasToTryTx = txGasEstimation + dataGasEstimation + additionalGas
|
const amountOfGasToTryTx = txGasEstimation + dataGasEstimation + additionalGas
|
||||||
console.info(`Estimating transaction creation with gas amount: ${amountOfGasToTryTx}`)
|
console.info(`Estimating transaction creation with gas amount: ${amountOfGasToTryTx}`)
|
||||||
try {
|
try {
|
||||||
await getGasEstimationTxResponse({
|
const estimation = await getGasEstimationTxResponse({
|
||||||
to: safeAddress,
|
to: safeAddress,
|
||||||
from: safeAddress,
|
from: safeAddress,
|
||||||
data: estimateData,
|
data: estimateData,
|
||||||
gasPrice: 0,
|
gasPrice: 0,
|
||||||
gas: amountOfGasToTryTx,
|
gas: amountOfGasToTryTx,
|
||||||
})
|
})
|
||||||
console.info(`Gas estimation successfully finished with gas amount: ${amountOfGasToTryTx}`)
|
if (estimation > 0) {
|
||||||
return amountOfGasToTryTx
|
console.info(`Gas estimation successfully finished with gas amount: ${amountOfGasToTryTx}`)
|
||||||
|
return amountOfGasToTryTx
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(`Error trying to estimate gas with amount: ${amountOfGasToTryTx}`)
|
console.log(`Error trying to estimate gas with amount: ${amountOfGasToTryTx}`)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user