zingolabs / zingolib

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

Fee erroneous to have balance in Sapling and Orchard and Send all. #1233

Closed Edicksonjga closed 2 weeks ago

Edicksonjga commented 3 weeks ago

In the last tests made to the Beta RC version I could see that the fee calculation with the ZIP 317 is working quite well, but there is a problem, when you have balance in Sapling and Orchard and you try to Send everything having activated the option Donate to ZingoLabs, the fee calculation gives error.

Requirements:

Steps to reproduce the error:

  1. Click on Send
  2. Paste a unified address that has Orchard receiver.
  3. Click on Send All

Current behavior:

You will be able to see that tapping on Send All causes the fee calculation to error (shown in red).

Expected behavior:

The fee calculation should be correct since when Send all the fee deduction should be made according to the inputs and outputs of the transaction.

IMPORTANT:

This error only occurs when the address is unified with Orchard receiver (Zingo sends funds to Orchard by default), with Z (Sapling) and T (Transparent) address the fee calculation is correct.

Demo:

https://github.com/zingolabs/zingolib/assets/37910384/e14e78e0-91a6-4e87-95df-04558ee45cc1

zancas commented 3 weeks ago

This is in the case of the Zennies for Zingo donation option being turned on?

Oscar-Pepper commented 3 weeks ago

its important to note this is not really a bug, this is just not implemented. i will discuss the correct fix at codeshare

juanky201271 commented 3 weeks ago

This is in the case of the Zennies for Zingo donation option being turned on?

Yes, this is the case. As @Oscar-Pepper said the spendablebalance command only works with one receiver (address), the sendall command only works for one receiver as well, but the send (proposal) command return the fee for 1 or more receivers (addresses). It is just not implemented.