mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge branch 'master' into admin-email-confirmation
This commit is contained in:
commit
15a9af4552
@ -373,7 +373,7 @@ export class TransactionResolver {
|
||||
// TODO: the detour over the public key is unnecessary
|
||||
const recipiantPublicKey = await getPublicKey(email)
|
||||
if (!recipiantPublicKey) {
|
||||
throw new Error('recipiant not known')
|
||||
throw new Error('recipient not known')
|
||||
}
|
||||
if (!isHexPublicKey(recipiantPublicKey)) {
|
||||
throw new Error('invalid recipiant public key')
|
||||
|
||||
@ -112,7 +112,7 @@ describe('SendOverview', () => {
|
||||
describe('transaction is confirmed and server response is error', () => {
|
||||
beforeEach(async () => {
|
||||
jest.clearAllMocks()
|
||||
sendMock.mockRejectedValue({ message: 'recipiant not known' })
|
||||
sendMock.mockRejectedValue({ message: 'recipient not known' })
|
||||
await wrapper
|
||||
.findComponent({ name: 'TransactionConfirmation' })
|
||||
.vm.$emit('send-transaction')
|
||||
|
||||
@ -78,6 +78,7 @@ export default {
|
||||
},
|
||||
async sendTransaction() {
|
||||
this.loading = true
|
||||
this.error = false
|
||||
this.$apollo
|
||||
.mutate({
|
||||
mutation: sendCoins,
|
||||
|
||||
@ -1,45 +1,47 @@
|
||||
<template>
|
||||
<b-row v-if="!error">
|
||||
<b-col>
|
||||
<b-card class="p-0" style="background-color: #ebebeba3 !important">
|
||||
<div class="p-4">
|
||||
{{ $t('form.thx') }}
|
||||
<hr />
|
||||
{{ $t('form.send_transaction_success') }}
|
||||
</div>
|
||||
<p class="text-center mt-3">
|
||||
<b-button variant="success" @click="$emit('on-reset')">{{ $t('form.close') }}</b-button>
|
||||
</p>
|
||||
</b-card>
|
||||
</b-col>
|
||||
</b-row>
|
||||
<b-row v-else>
|
||||
<b-col>
|
||||
<b-card class="p-0" style="background-color: #ebebeba3 !important">
|
||||
<div class="p-4" style="font-size: 1.5rem">
|
||||
<div>{{ $t('form.sorry') }}</div>
|
||||
<hr />
|
||||
<b-container>
|
||||
<b-row v-if="error">
|
||||
<b-col>
|
||||
<b-card class="p-0" style="background-color: #ebebeba3 !important">
|
||||
<div class="p-4" style="font-size: 1.5rem">
|
||||
<div>{{ $t('form.sorry') }}</div>
|
||||
<hr />
|
||||
|
||||
<div class="test-send_transaction_error">{{ $t('form.send_transaction_error') }}</div>
|
||||
<div class="test-send_transaction_error">{{ $t('form.send_transaction_error') }}</div>
|
||||
|
||||
<hr />
|
||||
<div class="test-receiver-not-found" v-if="errorResult === 'recipiant not known'">
|
||||
{{ $t('transaction.receiverNotFound') }}
|
||||
<hr />
|
||||
<div class="test-receiver-not-found" v-if="errorResult === 'recipient not known'">
|
||||
{{ $t('transaction.receiverNotFound') }}
|
||||
</div>
|
||||
<div v-else>({{ errorResult }})</div>
|
||||
</div>
|
||||
<div v-else>({{ errorResult }})</div>
|
||||
</div>
|
||||
<p class="text-center mt-3">
|
||||
<b-button variant="success" @click="$emit('on-reset')">{{ $t('form.close') }}</b-button>
|
||||
</p>
|
||||
</b-card>
|
||||
</b-col>
|
||||
</b-row>
|
||||
<p class="text-center mt-3">
|
||||
<b-button variant="success" @click="$emit('on-reset')">{{ $t('form.close') }}</b-button>
|
||||
</p>
|
||||
</b-card>
|
||||
</b-col>
|
||||
</b-row>
|
||||
<b-row v-if="!error">
|
||||
<b-col>
|
||||
<b-card class="p-0" style="background-color: #ebebeba3 !important">
|
||||
<div class="p-4">
|
||||
{{ $t('form.thx') }}
|
||||
<hr />
|
||||
{{ $t('form.send_transaction_success') }}
|
||||
</div>
|
||||
<p class="text-center mt-3">
|
||||
<b-button variant="success" @click="$emit('on-reset')">{{ $t('form.close') }}</b-button>
|
||||
</p>
|
||||
</b-card>
|
||||
</b-col>
|
||||
</b-row>
|
||||
</b-container>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'TransactionResult',
|
||||
props: {
|
||||
error: { type: Boolean, default: true },
|
||||
error: { type: Boolean, default: false },
|
||||
errorResult: { type: String, default: '' },
|
||||
},
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user