remove console.log and move getting errmsg to catch block in executeTransaction
This commit is contained in:
parent
f01bedf87b
commit
3383afee0d
|
@ -64,15 +64,6 @@ export const executeTransaction = async (
|
||||||
sender: string,
|
sender: string,
|
||||||
signatures?: string,
|
signatures?: string,
|
||||||
) => {
|
) => {
|
||||||
console.log({
|
|
||||||
to,
|
|
||||||
valueInWei,
|
|
||||||
data,
|
|
||||||
operation,
|
|
||||||
nonce,
|
|
||||||
sender,
|
|
||||||
signatures,
|
|
||||||
})
|
|
||||||
try {
|
try {
|
||||||
let sigs = signatures
|
let sigs = signatures
|
||||||
|
|
||||||
|
@ -84,13 +75,6 @@ export const executeTransaction = async (
|
||||||
)}000000000000000000000000000000000000000000000000000000000000000001`
|
)}000000000000000000000000000000000000000000000000000000000000000001`
|
||||||
}
|
}
|
||||||
|
|
||||||
// debug
|
|
||||||
const executeDataUsedSignatures = safeInstance.contract.methods
|
|
||||||
.execTransaction(to, valueInWei, data, operation, 0, 0, 0, ZERO_ADDRESS, ZERO_ADDRESS, sigs)
|
|
||||||
.encodeABI()
|
|
||||||
console.log(await getErrorMessage(safeInstance.address, 0, executeDataUsedSignatures, sender))
|
|
||||||
// debug end
|
|
||||||
|
|
||||||
const receipt = await safeInstance.execTransaction(
|
const receipt = await safeInstance.execTransaction(
|
||||||
to,
|
to,
|
||||||
valueInWei,
|
valueInWei,
|
||||||
|
@ -119,8 +103,15 @@ export const executeTransaction = async (
|
||||||
|
|
||||||
return receipt
|
return receipt
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// eslint-disable-next-line
|
/* eslint-disable */
|
||||||
console.log('Error executing the TX: ' + error)
|
const executeDataUsedSignatures = safeInstance.contract.methods
|
||||||
|
.execTransaction(to, valueInWei, data, operation, 0, 0, 0, ZERO_ADDRESS, ZERO_ADDRESS, sigs)
|
||||||
|
.encodeABI()
|
||||||
|
const errMsg = await getErrorMessage(safeInstance.address, 0, executeDataUsedSignatures, sender)
|
||||||
|
|
||||||
|
console.log(`Error executing the TX: ${error}`)
|
||||||
|
console.log(`Error executing the TX: ${errMsg}`)
|
||||||
|
/* eslint-enable */
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue