From 11b8d5e2f0b35883c3a9c8a20a2d2bb143db0e30 Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Tue, 20 Sep 2022 19:14:36 +0200 Subject: [PATCH] qml: work around qeamount copy from None --- electrum/gui/qml/qetypes.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/electrum/gui/qml/qetypes.py b/electrum/gui/qml/qetypes.py index d7a972c72..18ce4f207 100644 --- a/electrum/gui/qml/qetypes.py +++ b/electrum/gui/qml/qetypes.py @@ -78,6 +78,9 @@ class QEAmount(QObject): return not(self._is_max or self._amount_sat or self._amount_msat) def copyFrom(self, amount): + if not amount: + self._logger.warning('copyFrom with None argument. assuming 0') # TODO + amount = QEAmount() self.satsInt = amount.satsInt self.msatsInt = amount.msatsInt self.isMax = amount.isMax