wallet.get_max_amount method, used by qt and kivy
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user