Concordium / concordium-reference-wallet-android

Reference Android wallet for the Concordium blockchain
Apache License 2.0
12 stars 2 forks source link

Fix amounts overflow #221

Closed Radiokot closed 1 year ago

Radiokot commented 1 year ago

Purpose

This PR migrates all the amount-related long fields to BigInteger.

Currently, all the amounts are stored in long which is a 64-bit signed integer in Java. While it does the thing for small CCD amounts a typical user can face, CIS-2 tokens break it. In testnet, we have ETH.eth token with precision of 18. Having 100 ETH.eth on the balance overflows long and causes the wallet to crash.

Changes

Checklist

CLA acceptance

_Remove if not applicable.

By submitting the contribution I accept the terms and conditions of the Contributor License Agreement v1.0

czerwix commented 1 year ago

please rebase PR

Radiokot commented 1 year ago

Conflicts with CIS-2 have been resolved