fix corrupted balance error when calculating decay (this is not to be multiplied with 10000

This commit is contained in:
Ulf Gebhardt 2021-12-10 00:34:19 +01:00
parent dddd467569
commit 5eb955c52b
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9
2 changed files with 8 additions and 8 deletions

View File

@ -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(() => {

View File

@ -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()
})
},