zingolib icon indicating copy to clipboard operation
zingolib copied to clipboard

LightWallet::transactions() returns transactions with spends reported twice

Open AArnott opened this issue 1 year ago • 5 comments

I used Zingolib to create a transaction that spent 0.1 TAZ via a UA with 3 receivers. On the receiving wallet, it all looks good. 0.1 TAZ was received exclusively to the orchard pool.

But the sending wallet is showing an unexpected transaction history. In particular, for the outbound TransactionMetadata it has outgoing_tx_data with two entries in it. Both are for 0.1 TAZ, but one has the original 3-receiver UA as the to_address and the other has the orchard-receiver UA as the to_address.

I'm a little surprised to see the multi-receiver UA in the to_address at all, but I suppose this comes from the trickery that ZingoLib plays with the memo in the change note.

As it is, I don't know how to tell programmatically that I should ignore one OutgoingTxData and read the other. Why is it being represented this way, and how should I parse this so I can show the user what spends were in the transaction without showing the same spend twice?

image

AArnott avatar Oct 05 '23 15:10 AArnott