From 9a11d252781301e2ff8f47d8f6017071a117625e Mon Sep 17 00:00:00 2001 From: starry-shivam Date: Fri, 5 Apr 2024 10:31:31 +0530 Subject: [PATCH] Fix double precision issue when depositing via reminder notification Signed-off-by: starry-shivam --- .../greenstash/reminder/receivers/ReminderDepositReceiver.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/starry/greenstash/reminder/receivers/ReminderDepositReceiver.kt b/app/src/main/java/com/starry/greenstash/reminder/receivers/ReminderDepositReceiver.kt index e615a4c7..d5e54ce8 100644 --- a/app/src/main/java/com/starry/greenstash/reminder/receivers/ReminderDepositReceiver.kt +++ b/app/src/main/java/com/starry/greenstash/reminder/receivers/ReminderDepositReceiver.kt @@ -41,6 +41,7 @@ import com.starry.greenstash.database.transaction.TransactionDao import com.starry.greenstash.database.transaction.TransactionType import com.starry.greenstash.reminder.ReminderManager import com.starry.greenstash.reminder.ReminderNotificationSender +import com.starry.greenstash.utils.Utils import dagger.hilt.android.AndroidEntryPoint import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers @@ -95,7 +96,7 @@ class ReminderDepositReceiver : BroadcastReceiver() { ownerGoalId = it.goal.goalId, type = TransactionType.Deposit, timeStamp = System.currentTimeMillis(), - amount = depositAmount, + amount = Utils.roundDecimal(depositAmount), notes = "" ) )