bitshares / bitshares-ui

Fully featured Graphical User Interface / Reference Wallet for the BitShares Blockchain
https://wallet.bitshares.org
MIT License
517 stars 570 forks source link

[0.75] Prevent BTS balance button from spending all BTS #2697

Open froooze opened 5 years ago

froooze commented 5 years ago

Is your feature request related to a problem? Please describe. By clicking the BTS balance link all BTS are inserted for trade and no BTS are left for paying fees.

Describe the solution you'd like The number, which is inserted to the trading form should be reduced by 10 time of the actual transaction fee, to have enough for paying fees.

Additional context We already have this in the margin trading for max collateral.

Spending

abitmore commented 5 years ago

IIRC we have a form somewhere leaves 10 BTS. I think we can apply the same logic to all forms.

startailcoon commented 5 years ago

Good thinking, it really shouldn't use all BTS when clicking the balance. If the user really wants to use all balance they can edit the form by hand.

startailcoon commented 5 years ago
froooze commented 5 years ago

And also the balance button for Send BTS?

sschiessl-bcp commented 5 years ago

The amount of minimum BTS left in account should be a Settings value. Furthermore I'd like to see some kind of more sophisticated UX in AmountSelector component. If selected asset is BTS, and some props flag is on, then user needs double click to send full amount. One click fills in amount - buffer amount and displays a yellow notifcation (popup or something) that says "Some BTS have been reserved to pay for future transaction fees. Click again to fill in full amount".

froooze commented 5 years ago

@sschiessl-bcp: Good idead, but we one dialog is enough, with an extra option Full Send next to Send, to overwrite protection.

The Send function is the only thing where it makes sense, to ask the user. For trading or margin position, this is not needed.

I think 10BTS is already to much for fee reserve. 10 times the TRANSFER fee (4.5BTS now) should be enough as a standard value.

startailcoon commented 5 years ago

The amount of minimum BTS left in account should be a Settings value.

Agree

Furthermore I'd like to see some kind of more sophisticated UX in AmountSelector component. If selected asset is BTS, and some props flag is on, then user needs double click to send full amount. One click fills in amount - buffer amount and displays a yellow notifcation (popup or something) that says "Some BTS have been reserved to pay for future transaction fees. Click again to fill in full amount".

Either this, or a "Use all" text after that doesn't limit the amount. But this only makes sense when doing ops with BTS, so I'm more for the "Double Click" with warning you describe.

I think 10BTS is already to much for fee reserve. 10 times the TRANSFER fee (4.5BTS now) should be enough as a standard value.

No real objection to this. We can set default value to 4.5 BTS. An optional extra task would be to make the default value, if the user hasn't set one by herself, dynamic to 10 x the current Transfer Fee amount.

abitmore commented 5 years ago

The "Send" button is a bit different. The old logic there was for people who trying to empty an account. Leaving 10 BTS would be annoying in that case.

startailcoon commented 5 years ago

Perhaps we should limit the scope of this issue to only be the exchange for the moment. The "Send" operation could go into a new issue if we want to make something for that one as well.

We should probably add a setting as default usage, if and when it's used elsewhere.

OpenLedgerApp commented 5 years ago

@startailcoon , I can take this one. But as first I want to clarify the folowing: -Where should this setting be displayed?(in general settings?) -What is the default value?(10 x Transfer Fee?) -How should this select ['0 (off)', '10 x Transfer Fee', 'user defined'] be displayed? Could you provide the example please?

sschiessl-bcp commented 5 years ago

Please hold.off for a bit, this might have nice synergies with the upcoming default fee select mechanics. Possibly put the reserve balance amount in that new modal

Am 12. Juni 2019 15:05:49 schrieb OpenLedger notifications@github.com:

@startailcoon , I can take this one. But as first I want to clarify the folowing: -Where should this setting be displayed?(in general settings?) -What is the default value?(10 x Transfer Fee?) -How should this select ['0 (off)', '10 x Transfer Fee', ''] be displayed? Could you provide the example please?— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

froooze commented 5 years ago

Clicking on the BUY/SELL order should also respect the max. portfolio balance from each asset and default fee protection.