stratisproject / Breeze

Project Breeze Repository
MIT License
88 stars 47 forks source link

[Priority: Low] Add sending all coins #205

Open nopara73 opened 7 years ago

nopara73 commented 7 years ago

A user cannot send all its coins out of the wallet without leaving some small amount in, because of the fee calculation, it should be supported.

Illustration:

bokobza commented 7 years ago

This is already implemented in the wallet back-end. There is a method called GetMaximumSpendableBalance in the WalletController. I think @dev0tion will add it to the UI when he's done with the TumbleBit work.

nopara73 commented 7 years ago

Is it exposed to the HTTP API? If yes, could you insert the call here?

Are you sure it'll work correctly?
He might gets the maximum spendable balance, then makes a build transaction and it throws an error: not enough fee?
It should've be rather build-transaction, parameter amount: all.

dev0tion commented 7 years ago

Max balance function added to the frontend logic in #279 Have yet to figure out a way to display it in the current coin unit. Should be resolved in the next sprint.