diff --git a/electrum/gui/qml/qetxfinalizer.py b/electrum/gui/qml/qetxfinalizer.py index 61a46b7a4..85e7a462e 100644 --- a/electrum/gui/qml/qetxfinalizer.py +++ b/electrum/gui/qml/qetxfinalizer.py @@ -74,7 +74,7 @@ class QETxFinalizer(QObject): def amount(self, amount): if self._amount != amount: self._logger.debug(str(amount)) - self._amount = amount + self._amount.copyFrom(amount) self.amountChanged.emit() effectiveAmountChanged = pyqtSignal() @@ -90,7 +90,7 @@ class QETxFinalizer(QObject): @fee.setter def fee(self, fee): if self._fee != fee: - self._fee = fee + self._fee.copyFrom(fee) self.feeChanged.emit() feeRateChanged = pyqtSignal() diff --git a/electrum/gui/qml/qetypes.py b/electrum/gui/qml/qetypes.py index 52344ed28..d7a972c72 100644 --- a/electrum/gui/qml/qetypes.py +++ b/electrum/gui/qml/qetypes.py @@ -77,6 +77,11 @@ class QEAmount(QObject): def isEmpty(self): return not(self._is_max or self._amount_sat or self._amount_msat) + def copyFrom(self, amount): + self.satsInt = amount.satsInt + self.msatsInt = amount.msatsInt + self.isMax = amount.isMax + def __eq__(self, other): if isinstance(other, QEAmount): return self._amount_sat == other._amount_sat and self._amount_msat == other._amount_msat and self._is_max == other._is_max