Concordium / concordium-reference-wallet-android

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

Total balances are incorrectly added up #102

Closed mh-concordium closed 2 years ago

mh-concordium commented 2 years ago

ISSUE UPDATED ON MARCH 2ND TO AVOID CONFUSION

Bug Description

  1. In Accounts overview:

    • Balance on top will add all the public balances of the accounts
    • At disposal on top will add the at disposal balances of the accounts
    • Each row will show the public balance + at disposal balance
  2. In Accounts details:

    • the total will show the public balance (finalised public balance minus the pending transactions on public balance) = no change in calculation of public balance)
    • the at Disposal will show the (total - max(stakedAmount, releaseScheduleTotal)) = no change in calculation of atDisposal
    • add burger menu for shielded balance
    • rename address to receive
  3. The shielded top total will show the shielded balance (= finalised shielded balance minus pending transactions on shielded balance)

  4. Send funds

    • if we send fund from the public balance we show public balance and at disposal
    • if we send funds from the shielded balance we show at disposal of public balance + shielded balance

!!!! Delegation stake will NOT be included in March release

Versions

mh-concordium commented 2 years ago

Aligned solution between Android and iOS: https://github.com/Concordium/concordium-reference-wallet-ios/issues/190

mh-concordium commented 2 years ago

At disposal sum is wrong when looking at simple and shielded transaction pages.

Create account and request 2000 CCDs Shield 500 Attempt to send simple transaction -> At disposal = 999 Attempt to send shielded transaction -> At disposal = 999

https://user-images.githubusercontent.com/98821384/157401945-4ad90933-45e4-4cd2-88aa-c6c16ba6e8d4.mp4

concordium-cl commented 2 years ago

Only partly fixed in CCD app Android v. 2.0.3 (73).

In the above scenario, now

Attempt to send simple transaction -> Total & At disposal = 1499,509034 --> correct Attempt to send shielded transaction -> Balance (at disposal) = 999,509034 --> wrong -> Shielded balance = 500 --> correct

concordium-cl commented 2 years ago

Verified in CCD app v. 2.0.0 (74), Huawei Y6s, Android 9.