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.