Add a hover info button that explains to the user what is going on in the transactions and how it works ( the numbers ) for a better understanding of the technology.
transaction structure (m1) sends money (-->) to (m2)
Amount sent (m1) = total amount in UTXOs used for that transaction from (m1) --> adr1 + adr2 + adr3... etc
calculate fees and subtract it from the amount sent = coin left (coin left = amount sent - fee)
save fees and add them to the total amount fees for the base coin transaction
from coin left set the amount (m2) is receiving (the actual payment) = amount sent
calculate how much change back hast to go to (m1) amount left = coin left - received money
Add a hover info button that explains to the user what is going on in the transactions and how it works ( the numbers ) for a better understanding of the technology.
transaction structure (m1) sends money (-->) to (m2)
Amount sent (m1) = total amount in UTXOs used for that transaction from (m1) --> adr1 + adr2 + adr3... etc
AMOUNT_SENT(m1) = COIN_RECEIVED(m2) + LEFT_OVER(m1) + FEE