This commit is contained in:
Mikhail Mikheev 2019-11-19 13:33:37 +04:00
parent 8ca65f9a27
commit 0c0d2fc00d
4 changed files with 6 additions and 4 deletions

View File

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

View File

@ -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: {

View File

@ -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

View File

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