estimate tx when confirming transaction with threshold > 1

This commit is contained in:
Mikhail Mikheev 2019-10-11 18:58:32 +04:00
parent 1e5958b8ea
commit 0ca45b2132
1 changed files with 2 additions and 2 deletions

View File

@ -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,
}) })