Merge pull request #274 from gnosis/bug/wrong-confirmation-notification
BUG: Wrong notification for confirmation tx
This commit is contained in:
commit
515d177c89
|
@ -34,8 +34,8 @@ const confirmationTxNotificationsQueue: NotificationsQueue = {
|
||||||
pendingExecution: NOTIFICATIONS.TX_CONFIRMATION_PENDING_MSG,
|
pendingExecution: NOTIFICATIONS.TX_CONFIRMATION_PENDING_MSG,
|
||||||
afterRejection: NOTIFICATIONS.TX_REJECTED_MSG,
|
afterRejection: NOTIFICATIONS.TX_REJECTED_MSG,
|
||||||
afterExecution: {
|
afterExecution: {
|
||||||
noMoreConfirmationsNeeded: NOTIFICATIONS.TX_CONFIRMATION_EXECUTED_MSG,
|
noMoreConfirmationsNeeded: NOTIFICATIONS.TX_EXECUTED_MSG,
|
||||||
moreConfirmationsNeeded: null,
|
moreConfirmationsNeeded: NOTIFICATIONS.TX_CONFIRMATION_EXECUTED_MSG,
|
||||||
},
|
},
|
||||||
afterExecutionError: NOTIFICATIONS.TX_CONFIRMATION_FAILED_MSG,
|
afterExecutionError: NOTIFICATIONS.TX_CONFIRMATION_FAILED_MSG,
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,7 +129,7 @@ export const NOTIFICATIONS: Notifications = {
|
||||||
options: { variant: INFO, persist: true },
|
options: { variant: INFO, persist: true },
|
||||||
},
|
},
|
||||||
TX_CONFIRMATION_EXECUTED_MSG: {
|
TX_CONFIRMATION_EXECUTED_MSG: {
|
||||||
message: 'Confirmation transaction succesful',
|
message: 'Confirmation transaction was successful',
|
||||||
options: { variant: SUCCESS, persist: false, autoHideDuration: longDuration },
|
options: { variant: SUCCESS, persist: false, autoHideDuration: longDuration },
|
||||||
},
|
},
|
||||||
TX_CONFIRMATION_FAILED_MSG: {
|
TX_CONFIRMATION_FAILED_MSG: {
|
||||||
|
|
|
@ -108,6 +108,7 @@ const createTransaction = (
|
||||||
return receipt.transactionHash
|
return receipt.transactionHash
|
||||||
})
|
})
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
console.error(err)
|
||||||
closeSnackbar(beforeExecutionKey)
|
closeSnackbar(beforeExecutionKey)
|
||||||
closeSnackbar(pendingExecutionKey)
|
closeSnackbar(pendingExecutionKey)
|
||||||
showSnackbar(notificationsQueue.afterExecutionError, enqueueSnackbar, closeSnackbar)
|
showSnackbar(notificationsQueue.afterExecutionError, enqueueSnackbar, closeSnackbar)
|
||||||
|
@ -116,7 +117,7 @@ const createTransaction = (
|
||||||
.execTransaction(to, valueInWei, txData, CALL, 0, 0, 0, ZERO_ADDRESS, ZERO_ADDRESS, sigs)
|
.execTransaction(to, valueInWei, txData, CALL, 0, 0, 0, ZERO_ADDRESS, ZERO_ADDRESS, sigs)
|
||||||
.encodeABI()
|
.encodeABI()
|
||||||
const errMsg = await getErrorMessage(safeInstance.address, 0, executeDataUsedSignatures, from)
|
const errMsg = await getErrorMessage(safeInstance.address, 0, executeDataUsedSignatures, from)
|
||||||
console.error(`Error executing the TX: ${errMsg}`)
|
console.error(`Error creating the TX: ${errMsg}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
return txHash
|
return txHash
|
||||||
|
|
|
@ -143,6 +143,7 @@ const processTransaction = (
|
||||||
return receipt.transactionHash
|
return receipt.transactionHash
|
||||||
})
|
})
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
console.error(err)
|
||||||
closeSnackbar(beforeExecutionKey)
|
closeSnackbar(beforeExecutionKey)
|
||||||
closeSnackbar(pendingExecutionKey)
|
closeSnackbar(pendingExecutionKey)
|
||||||
showSnackbar(notificationsQueue.afterExecutionError, enqueueSnackbar, closeSnackbar)
|
showSnackbar(notificationsQueue.afterExecutionError, enqueueSnackbar, closeSnackbar)
|
||||||
|
|
Loading…
Reference in New Issue