I am new to stellar transaction. I have created the transaction for 10 XLM from A to B. Now I want to do cancel or approve from client side. for approve, working. for cancel, i don't have idea. how to cancel the transaction in backend?
The whole point of a block chain is that you cannot ever cancel the transaction after you submit it. So if you have submitted it to stellar, it's too late.
Solution: don't do that until after the user approves the transaction, which should include signing the transaction object you are creating client side. If they don't, do not submit that client side object. It does not exist in stellar until you do. There's nothing to remove/cancel from stellar because it was never there.