mirror of
https://github.com/status-im/safe-react.git
synced 2025-02-23 23:18:06 +00:00
estimate tx when confirming transaction with threshold > 1
This commit is contained in:
parent
1e5958b8ea
commit
0ca45b2132
@ -21,7 +21,7 @@ export const estimateTxGasCosts = async (
|
||||
const nonce = await safeInstance.methods.nonce().call()
|
||||
const threshold = await safeInstance.methods.getThreshold().call()
|
||||
|
||||
const isExecution = (tx && tx.confirmations.size) || threshold === '1'
|
||||
const isExecution = (tx && tx.confirmations.size === threshold) || preApprovingOwner || threshold === '1'
|
||||
|
||||
let txData
|
||||
if (isExecution) {
|
||||
@ -37,7 +37,7 @@ export const estimateTxGasCosts = async (
|
||||
.encodeABI()
|
||||
} else {
|
||||
const txHash = await safeInstance.methods
|
||||
.getTransactionHash(to, 0, data, CALL, 0, 0, 0, ZERO_ADDRESS, ZERO_ADDRESS, nonce)
|
||||
.getTransactionHash(to, tx ? tx.value : 0, data, CALL, 0, 0, 0, ZERO_ADDRESS, ZERO_ADDRESS, nonce)
|
||||
.call({
|
||||
from,
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user