Increase gas limit for txs in test environment

This commit is contained in:
mmv 2019-09-26 16:51:58 +04:00
parent 4dad9ce197
commit ade3010260
2 changed files with 20 additions and 6 deletions

View File

@ -41,11 +41,18 @@ const createTransaction = (
} else {
tx = await getApprovalTransaction(safeInstance, to, valueInWei, txData, CALL, nonce, from)
}
const sendParams = {
from,
}
// if not set owner management tests will fail on ganache
if (process.env.NODE_ENV === 'test') {
sendParams.gas = '7000000'
}
await tx
.send({
from,
})
.send(sendParams)
.once('transactionHash', (hash) => {
txHash = hash
openSnackbar(notifications.BEFORE_EXECUTION_OR_CREATION, 'success')

View File

@ -59,10 +59,17 @@ const processTransaction = (
transaction = await getApprovalTransaction(safeInstance, tx.recipient, tx.value, tx.data, CALL, nonce, from)
}
const sendParams = {
from,
}
// if not set owner management tests will fail on ganache
if (process.env.NODE_ENV === 'test') {
sendParams.gas = '7000000'
}
await transaction
.send({
from,
})
.send(sendParams)
.once('transactionHash', (hash) => {
txHash = hash
openSnackbar(