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 nonce = await safeInstance.methods.nonce().call()
|
||||||
const threshold = await safeInstance.methods.getThreshold().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
|
let txData
|
||||||
if (isExecution) {
|
if (isExecution) {
|
||||||
|
@ -37,7 +37,7 @@ export const estimateTxGasCosts = async (
|
||||||
.encodeABI()
|
.encodeABI()
|
||||||
} else {
|
} else {
|
||||||
const txHash = await safeInstance.methods
|
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({
|
.call({
|
||||||
from,
|
from,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue