diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index 7de64ff6a..001fbfb0b 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -90,7 +90,8 @@ "transaction":{ "show_all":"Alle {count} Transaktionen ansehen", "nullTransactions":"Du hast noch keine Transaktionen auf deinem Konto.", - "more": "mehr" + "more": "mehr", + "receiverNotFound":"Empfänger nicht gefunden" }, "site": { "login": { diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index ac75c90f0..161870dd1 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -90,7 +90,8 @@ "transaction":{ "show_all":"View all {count} transactions.", "nullTransactions":"You don't have any transactions on your account yet.", - "more": "more" + "more": "more", + "receiverNotFound":"Recipient not found" }, "site": { "login": { diff --git a/frontend/src/views/Pages/AccountOverview.spec.js b/frontend/src/views/Pages/AccountOverview.spec.js index 18bc7c036..8d47cdb27 100644 --- a/frontend/src/views/Pages/AccountOverview.spec.js +++ b/frontend/src/views/Pages/AccountOverview.spec.js @@ -112,7 +112,7 @@ describe('AccountOverview', () => { describe('transaction is confirmed and server response is error', () => { beforeEach(async () => { jest.clearAllMocks() - sendMock.mockReturnValue({ success: false }) + sendMock.mockReturnValue({ success: false, result: { message: 'receiver not found' } }) await wrapper .findComponent({ name: 'TransactionConfirmation' }) .vm.$emit('send-transaction') @@ -121,6 +121,10 @@ describe('AccountOverview', () => { it('shows the error page', () => { expect(wrapper.find('div.card-body').text()).toContain('form.send_transaction_error') }) + + it('shows recipient not found', () => { + expect(wrapper.text()).toContain('transaction.receiverNotFound') + }) }) }) }) diff --git a/frontend/src/views/Pages/AccountOverview.vue b/frontend/src/views/Pages/AccountOverview.vue index 08eb503ad..54bcf2bdd 100644 --- a/frontend/src/views/Pages/AccountOverview.vue +++ b/frontend/src/views/Pages/AccountOverview.vue @@ -23,7 +23,11 @@ >
@@ -71,6 +75,7 @@ export default { timestamp: Date.now(), transactionData: { ...EMPTY_TRANSACTION_DATA }, error: false, + errorResult: '', currentTransactionStep: 0, loading: false, } @@ -104,6 +109,7 @@ export default { this.error = false this.$emit('update-balance', this.transactionData.amount) } else { + this.errorResult = result.result.message this.error = true } this.currentTransactionStep = 2 diff --git a/frontend/src/views/Pages/AccountOverview/GddSend/TransactionResult.vue b/frontend/src/views/Pages/AccountOverview/GddSend/TransactionResult.vue index ec242c75c..d8a2bd61b 100644 --- a/frontend/src/views/Pages/AccountOverview/GddSend/TransactionResult.vue +++ b/frontend/src/views/Pages/AccountOverview/GddSend/TransactionResult.vue @@ -17,9 +17,16 @@
- {{ $t('form.sorry') }} +
{{ $t('form.sorry') }}

- {{ $t('form.send_transaction_error') }} + +
{{ $t('form.send_transaction_error') }}
+ +
+
+ {{ $t('transaction.receiverNotFound') }} +
+
({{ errorResult }})

{{ $t('form.close') }} @@ -33,6 +40,7 @@ export default { name: 'TransactionResult', props: { error: { type: Boolean, default: true }, + errorResult: { type: String, default: '' }, }, }