Electric-Coin-Company / zcash-swift-wallet-sdk

iOS light client Framework proof-of-concept
MIT License
37 stars 33 forks source link

Transaction history entries for shielding transactions are showing incorrect amounts #1293

Closed tw0po1nt closed 8 months ago

tw0po1nt commented 8 months ago

Describe the issue

Please provide a general summary of the issue you're experiencing In Nighthawk, I autoshield my funds and expect to see a wallet event for it. I see an outgoing txn with the proper memo, but the amounts are wrong.

Can you reliably reproduce the issue?

If so, please list the steps to reproduce below:

  1. Launch Nighthawk 2.0
  2. Import a wallet with transparent funds or create a new wallet and send transparent funds to it
  3. When the transparent funds are available to spend, swipe to the transparent balance tab in the home balance carousel.
  4. Observe the "Shield now". Press it.
  5. Tap the "Great!" button to confirm shielding
  6. Observe that your transparent balance is now correct at 0 ZEC (or TAZ if using testnet)
  7. Find the outgoing transaction in the list of recent events, or navigate to the full transaction history by tapping "View transaction history"
  8. Observe the transaction details

Expected behaviour

Tell us what should happen

I expect to see the correct net value delta of the transaction at the top, as well as in a line item at the bottom.

Actual behaviour + errors

Tell us what happens instead including any noticeable error output (any messages displayed on-screen when e.g. a crash occurred)

Instead of the correct amount, I see what appears to be only the fee.

Any extra information that might be useful in the debugging process.

Simulator Screenshot - iPhone 15 Pro Max - 2023-09-28 at 08 17 06

Simulator Screenshot - iPhone 15 Pro Max - 2023-09-28 at 08 27 09

nuttycom commented 8 months ago

The value of the transaction you see is the net delta to the account, which is indeed just the fee. Your overall wallet balance hasn't changed by the value of the amount being shielded.

nuttycom commented 8 months ago

If you need to see the value of the shielded output, this is available from the transaction outputs. But I think it would be confusing to show the full shielded amount as received.

nuttycom commented 8 months ago

@tw0po1nt given what I've described above, is there any action that needs to be taken here, or can this be closed?

tw0po1nt commented 8 months ago

This can be closed. How to resolve the UX confusion can be discussed further in Discord