qml: qeinvoice: don't use wallet.get_balance() for NotEnoughFunds checks
related https://github.com/spesmilo/electrum/issues/8835
This commit is contained in:
@@ -395,10 +395,7 @@ class QEInvoice(QObject, QtEventListener):
|
|||||||
self._wallet.pay_lightning_invoice(self._effectiveInvoice, amount_msat)
|
self._wallet.pay_lightning_invoice(self._effectiveInvoice, amount_msat)
|
||||||
|
|
||||||
def get_max_spendable_onchain(self):
|
def get_max_spendable_onchain(self):
|
||||||
spendable = self._wallet.confirmedBalance.satsInt
|
return self._wallet.wallet.get_spendable_balance_sat()
|
||||||
if not self._wallet.wallet.config.WALLET_SPEND_CONFIRMED_ONLY:
|
|
||||||
spendable += self._wallet.unconfirmedBalance.satsInt
|
|
||||||
return spendable
|
|
||||||
|
|
||||||
def get_max_spendable_lightning(self):
|
def get_max_spendable_lightning(self):
|
||||||
return self._wallet.wallet.lnworker.num_sats_can_send() if self._wallet.wallet.lnworker else 0
|
return self._wallet.wallet.lnworker.num_sats_can_send() if self._wallet.wallet.lnworker else 0
|
||||||
|
|||||||
Reference in New Issue
Block a user