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

Support relative amount for tokens and shares #176

Open
matevz opened this issue Dec 12, 2023 · 0 comments
Open

Support relative amount for tokens and shares #176

matevz opened this issue Dec 12, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@matevz
Copy link
Member

matevz commented Dec 12, 2023

Currently, there is no simple way to empty your account apart from copying and pasting the amount and subtracting the fee. One way to solve this is to support both the absolute number of tokens to transfer or the relative share of your account:

oasis account transfer <amount|share%> <to> [flags]

CLI would compute the correct amount by querying the account balance, compute the relative amount, compute the fee and subtract the fee from the relative amount.

In the case above, one could empty the account by invoking:

oasis account transfer 100% my_cold_wallet

The relative amount could as well be implemented for deposits, withdrawals, allowances, delegations and the same for the ParaTime-layer transactions. The undelegate command could also use the relative amount of shares.

@matevz matevz added enhancement New feature or request ui Improve user experience and removed ui Improve user experience labels Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant