0

I am trying to send all the available funds using polkadot.js how does one do that?

I have seen in the polkadot-ui one can purge the sender account or send all available funds and am wondering how can i translate that into code so I don't have little funds leftover and burned due to minimal extrinsic deposits.

1 Answer 1

3

You have the balances.transferAll method that you should call with a keep_alive = false so it doesn't leave the existential deposit.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.