1
0

wallet.get_max_amount method, used by qt and kivy

This commit is contained in:
ThomasV
2015-10-30 14:10:41 +01:00
parent 525e08af54
commit 2a3c97813d
4 changed files with 24 additions and 16 deletions

View File

@@ -440,6 +440,11 @@ class ElectrumWindow(App):
status_card.uncomfirmed = unconfirmed.strip()
def get_max_amount(self):
inputs = self.wallet.get_spendable_coins(None)
amount, fee = self.wallet.get_max_amount(self.electrum_config, inputs, None)
return self.format_amount(amount)
def update_amount(self, amount, c):
if c == '<':
return amount[:-1]

View File

@@ -22,8 +22,9 @@ Popup:
Button:
size_hint_x: 1
height: '48dp'
text: ''
on_release: a.value = "max"
amount: app.get_max_amount()
text: self.amount + ' ' + app.base_unit
on_release: a.amount = self.amount
BoxLayout:
size_hint: 1, None