error message from server is toasted correctly

This commit is contained in:
Moriz Wahl 2022-03-31 14:11:32 +02:00
parent d0dc8dc0fd
commit aee53d17c0
2 changed files with 4 additions and 6 deletions

View File

@ -155,8 +155,6 @@ describe('Send', () => {
})
})
/* LINK */
describe('transaction form link', () => {
beforeEach(async () => {
apolloMutationMock.mockResolvedValue({
@ -261,7 +259,7 @@ describe('Send', () => {
})
it('toasts an error message', () => {
expect(toastErrorSpy).toBeCalledWith({ message: 'OUCH!' })
expect(toastErrorSpy).toBeCalledWith('OUCH!')
})
})
})

View File

@ -133,8 +133,8 @@ export default {
this.transactionData = { ...EMPTY_TRANSACTION_DATA }
this.currentTransactionStep = TRANSACTION_STEPS.transactionResultSendSuccess
})
.catch((err) => {
this.errorResult = err[0].message
.catch((error) => {
this.errorResult = error.message
this.error = true
this.currentTransactionStep = TRANSACTION_STEPS.transactionResultSendError
})
@ -153,7 +153,7 @@ export default {
this.updateTransactions({})
})
.catch((error) => {
this.toastError(error)
this.toastError(error.message)
})
break
default: