From dfc8aadce4e9edb8eeb50c1b8e35362be8055575 Mon Sep 17 00:00:00 2001 From: ogerly Date: Mon, 14 Mar 2022 14:18:11 +0100 Subject: [PATCH] add enum SEND_TYPEP: send and link --- .../GddSend/TransactionConfirmationLink.vue | 4 ++-- .../GddSend/TransactionConfirmationSend.vue | 12 ++---------- .../src/components/GddSend/TransactionForm.vue | 18 +++++++++++------- frontend/src/pages/Send.vue | 13 +++++++++---- 4 files changed, 24 insertions(+), 23 deletions(-) diff --git a/frontend/src/components/GddSend/TransactionConfirmationLink.vue b/frontend/src/components/GddSend/TransactionConfirmationLink.vue index 6b91b0a08..f357ea654 100644 --- a/frontend/src/components/GddSend/TransactionConfirmationLink.vue +++ b/frontend/src/components/GddSend/TransactionConfirmationLink.vue @@ -4,7 +4,7 @@
{{ $t('gdd_per_link.header') }}
-

{{ amount | GDD }}

+

− {{ $n(amount, 'decimal') }} GDD

{{ memo }}
@@ -20,7 +20,7 @@ {{ $t('form.your_amount') }} - - {{ amount | GDD }} + − {{ $n(amount, 'decimal') }} GDD diff --git a/frontend/src/components/GddSend/TransactionConfirmationSend.vue b/frontend/src/components/GddSend/TransactionConfirmationSend.vue index f4ce6b080..0bfff3ddb 100644 --- a/frontend/src/components/GddSend/TransactionConfirmationSend.vue +++ b/frontend/src/components/GddSend/TransactionConfirmationSend.vue @@ -18,7 +18,7 @@
GDD
-
{{ amount | GDD }}
+
− {{ $n(amount, 'decimal') }} GDD

@@ -43,16 +43,8 @@ {{ $t('form.your_amount') }} - - - {{ amount | GDD }} - -
- - - Vergänglichkeit für 14 Tage - - ~ {{ $n(amount * 0.028, 'decimal') }} + − {{ $n(amount, 'decimal') }} GDD diff --git a/frontend/src/components/GddSend/TransactionForm.vue b/frontend/src/components/GddSend/TransactionForm.vue index 1a1dd7198..991e165ce 100644 --- a/frontend/src/components/GddSend/TransactionForm.vue +++ b/frontend/src/components/GddSend/TransactionForm.vue @@ -6,17 +6,17 @@ - + {{ $t('send_gdd') }} - + {{ $t('send_per_link') }} -
+

{{ $t('gdd_per_link.header') }}

{{ $t('gdd_per_link.sentence_1') }} @@ -25,10 +25,10 @@
- {{ selected === 'send' ? $t('form.send_now') : $t('form.generate_now') }} + {{ selected === sendTypes.send ? $t('form.send_now') : $t('form.generate_now') }} @@ -151,6 +151,7 @@ diff --git a/frontend/src/pages/Send.vue b/frontend/src/pages/Send.vue index 786624045..e9cf3442f 100644 --- a/frontend/src/pages/Send.vue +++ b/frontend/src/pages/Send.vue @@ -71,6 +71,11 @@ const EMPTY_TRANSACTION_DATA = { memo: '', } +export const SEND_TYPES = { + send: 'send', + link: 'link', +} + export default { name: 'Send', components: { @@ -108,10 +113,10 @@ export default { setTransaction(data) { this.transactionData = { ...data } switch (data.selected) { - case 'send': + case SEND_TYPES.send: this.currentTransactionStep = TRANSACTION_STEPS.transactionConfirmationSend break - case 'link': + case SEND_TYPES.link: this.currentTransactionStep = TRANSACTION_STEPS.transactionConfirmationLink break } @@ -120,7 +125,7 @@ export default { this.loading = true this.error = false switch (this.transactionData.selected) { - case 'send': + case SEND_TYPES.send: this.$apollo .mutate({ mutation: sendCoins, @@ -137,7 +142,7 @@ export default { this.currentTransactionStep = TRANSACTION_STEPS.transactionResultSendError }) break - case 'link': + case SEND_TYPES.link: this.$apollo .mutate({ mutation: createTransactionLink,