zingolabs / zingolib

An API and test-app that exposes zcash functionality for app consumption
MIT License
15 stars 19 forks source link

Value transfer rewrite #1244

Closed Oscar-Pepper closed 2 weeks ago

Oscar-Pepper commented 2 weeks ago

we are still seeing bugs associated with displaying value transfer kinds correctly in zingo mobile. this PR aims to solve an issue that has come to light where value transfers are attempted to be used to reconstruct transactions as the value transfer abstraction was not functional or well-defined. the major change here is that value transfers are now constructed by first calling transaction_summaries() which already contains stable "from foundational truth" logic that determines key building blocks for value transfers such as whether the tx was created by the capability and if so, whether this was a shielding tx or not. This helps us not only separate concerns but also not repeat logic and DRY the code.