Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --subtract-fee flag to include the gas fee in the amount #247

Open
matevz opened this issue Jun 3, 2024 · 0 comments
Open

Add --subtract-fee flag to include the gas fee in the amount #247

matevz opened this issue Jun 3, 2024 · 0 comments
Labels
enhancement New feature or request wallet Wallet-related operations

Comments

@matevz
Copy link
Member

matevz commented Jun 3, 2024

Currently, there is no simple way to empty the account, because you will always need to leave some tokens to pay for the gas fee. Add --subtract-fee flag to transfer, withdraw, deposit commands which subtracts the required gas fee from the entered amount. By using this flag, you can check the account balance and then copy&paste it into the transfer command to empty it.

An alternative flag would be --all, but then the amount parameter would become optional which complicates things. Also, it allows you to completely empty the account and not leave, for example, some predetermined number of tokens in there.

The flag was inspired by the subtractfeefromamount argument used in bitcoin rpc: https://developer.bitcoin.org/reference/rpc/sendtoaddress.html

@matevz matevz added enhancement New feature or request wallet Wallet-related operations labels Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wallet Wallet-related operations
Projects
None yet
Development

No branches or pull requests

1 participant