Wallet error sending 50%

I implemented a function to send a specified amount of funds from one wallet to another.
I added the calculation of fees and gas. Everything worked well when I sent the entire wallet balance.

However, when I sent only 50%, I encountered a situation where the remaining funds in the sender’s wallet disappeared.

3 Likes

Could you please share a code snippet to look at and the txns involved?

If you don’t specify the Change output, the remaining funds are burned.

If you want to send 50%, you can have one Output::Coin with 50% and another Output::Change to the sender.

1 Like