zingolabs / zingolib

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

remove is_outgoing_tx boolean #1204

Closed Oscar-Pepper closed 2 months ago

Oscar-Pepper commented 2 months ago

FIX: zip317 sends from shielded to transparent didn't create outgoing_tx_data due to change no longer containing ciphertext for OVK decryption. "send_to_transparent_and_sapling_maintain_balance" in #1205 now passes (when you remove/fix the wrong fee assertions).

replaces is_outgoing_transaction boolean with a "from foundational truth" call to the new transaction_is_received method after the tx has been decrypted and the transaction record has been created.

the new logic will check for either notes in the wallet that were spent in the transaction or if outgoing_tx_data was created when the OVK successfully decrpyted the outgoing ciphertext to a non-self address. then, it will go ahead and create outgoing_tx_data for transparent outputs sent to other capabilities (not send-to-selfs) as before.

previous places is_outgoing_tx was set true that have been replaced: