Skip to content

Commit

Permalink
Fix double precision issue when depositing via reminder notification
Browse files Browse the repository at this point in the history
Signed-off-by: starry-shivam <[email protected]>
  • Loading branch information
starry-shivam committed Apr 5, 2024
1 parent 8690990 commit 9a11d25
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -95,7 +96,7 @@ class ReminderDepositReceiver : BroadcastReceiver() {
ownerGoalId = it.goal.goalId,
type = TransactionType.Deposit,
timeStamp = System.currentTimeMillis(),
amount = depositAmount,
amount = Utils.roundDecimal(depositAmount),
notes = ""
)
)
Expand Down

0 comments on commit 9a11d25

Please sign in to comment.