From 5eb955c52b686454beef173fb976ce6842400a20 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Fri, 10 Dec 2021 00:34:19 +0100 Subject: [PATCH 1/2] fix corrupted balance error when calculating decay (this is not to be multiplied with 10000 --- .../src/graphql/resolver/TransactionResolver.ts | 2 +- frontend/src/views/Pages/Login.vue | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/backend/src/graphql/resolver/TransactionResolver.ts b/backend/src/graphql/resolver/TransactionResolver.ts index 58eb695ea..b2f4b4db5 100644 --- a/backend/src/graphql/resolver/TransactionResolver.ts +++ b/backend/src/graphql/resolver/TransactionResolver.ts @@ -428,7 +428,7 @@ async function addUserTransaction( if (lastUserTransaction) { newBalance += Number( await calculateDecay( - Number(lastUserTransaction.balance * 10000), + Number(lastUserTransaction.balance), lastUserTransaction.balanceDate, transaction.received, ).catch(() => { diff --git a/frontend/src/views/Pages/Login.vue b/frontend/src/views/Pages/Login.vue index d5d3e25a4..cd5f9fd88 100755 --- a/frontend/src/views/Pages/Login.vue +++ b/frontend/src/views/Pages/Login.vue @@ -104,13 +104,13 @@ export default { this.$router.push('/overview') loader.hide() }) - .catch((error) => { - if (error.message.includes('No user with this credentials')) { - this.$toasted.global.error(this.$t('error.no-account')) - } else { - // : this.$t('error.no-email-verify') - this.$router.push('/reset/login') - } + .catch((/* error */) => { + // if (error.message.includes('No user with this credentials')) { + this.$toasted.global.error(this.$t('error.no-account')) + // } else { + // this.$t('error.no-email-verify') + // this.$router.push('/reset/login') + // } loader.hide() }) }, From eef7403f0ff5fe3571182188dacd34566fc75f71 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Fri, 10 Dec 2021 00:35:04 +0100 Subject: [PATCH 2/2] Revert "Auxiliary commit to revert individual files from 5eb955c52b686454beef173fb976ce6842400a20" This reverts commit f1d9e9096abe110698c3e9d756c377a991a15b3c. --- frontend/src/views/Pages/Login.vue | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/frontend/src/views/Pages/Login.vue b/frontend/src/views/Pages/Login.vue index cd5f9fd88..d5d3e25a4 100755 --- a/frontend/src/views/Pages/Login.vue +++ b/frontend/src/views/Pages/Login.vue @@ -104,13 +104,13 @@ export default { this.$router.push('/overview') loader.hide() }) - .catch((/* error */) => { - // if (error.message.includes('No user with this credentials')) { - this.$toasted.global.error(this.$t('error.no-account')) - // } else { - // this.$t('error.no-email-verify') - // this.$router.push('/reset/login') - // } + .catch((error) => { + if (error.message.includes('No user with this credentials')) { + this.$toasted.global.error(this.$t('error.no-account')) + } else { + // : this.$t('error.no-email-verify') + this.$router.push('/reset/login') + } loader.hide() }) },