mirror of
https://github.com/status-im/safe-react.git
synced 2025-02-17 12:07:09 +00:00
Fix send params for approval/execution txs
This commit is contained in:
parent
2e5d2c8f0e
commit
8961982366
@ -37,7 +37,7 @@ export const getApprovalTransaction = async (
|
|||||||
const web3 = getWeb3()
|
const web3 = getWeb3()
|
||||||
const contract = new web3.eth.Contract(GnosisSafeSol.abi, safeInstance.address)
|
const contract = new web3.eth.Contract(GnosisSafeSol.abi, safeInstance.address)
|
||||||
|
|
||||||
return contract.methods.approveHash(txHash, { value: 0 })
|
return contract.methods.approveHash(txHash)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(`Error while approving transaction: ${err}`)
|
console.error(`Error while approving transaction: ${err}`)
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ export const getExecutionTransaction = async (
|
|||||||
const web3 = getWeb3()
|
const web3 = getWeb3()
|
||||||
const contract = new web3.eth.Contract(GnosisSafeSol.abi, safeInstance.address)
|
const contract = new web3.eth.Contract(GnosisSafeSol.abi, safeInstance.address)
|
||||||
|
|
||||||
return contract.methods.execTransaction(to, valueInWei, data, operation, 0, 0, 0, ZERO_ADDRESS, ZERO_ADDRESS, sigs, { value: 0 })
|
return contract.methods.execTransaction(to, valueInWei, data, operation, 0, 0, 0, ZERO_ADDRESS, ZERO_ADDRESS, sigs)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(`Error while creating transaction: ${err}`)
|
console.error(`Error while creating transaction: ${err}`)
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ const createTransaction = (
|
|||||||
tx = await getApprovalTransaction(safeInstance, to, valueInWei, txData, CALL, nonce, from)
|
tx = await getApprovalTransaction(safeInstance, to, valueInWei, txData, CALL, nonce, from)
|
||||||
}
|
}
|
||||||
|
|
||||||
const sendParams = { from }
|
const sendParams = { from, value: 0 }
|
||||||
// if not set owner management tests will fail on ganache
|
// if not set owner management tests will fail on ganache
|
||||||
if (process.env.NODE_ENV === 'test') {
|
if (process.env.NODE_ENV === 'test') {
|
||||||
sendParams.gas = '7000000'
|
sendParams.gas = '7000000'
|
||||||
|
@ -95,7 +95,7 @@ const processTransaction = (
|
|||||||
transaction = await getApprovalTransaction(safeInstance, tx.recipient, tx.value, tx.data, CALL, nonce, from)
|
transaction = await getApprovalTransaction(safeInstance, tx.recipient, tx.value, tx.data, CALL, nonce, from)
|
||||||
}
|
}
|
||||||
|
|
||||||
const sendParams = { from }
|
const sendParams = { from, value: 0 }
|
||||||
// if not set owner management tests will fail on ganache
|
// if not set owner management tests will fail on ganache
|
||||||
if (process.env.NODE_ENV === 'test') {
|
if (process.env.NODE_ENV === 'test') {
|
||||||
sendParams.gas = '7000000'
|
sendParams.gas = '7000000'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user