From ff33102b917bce67a1b79effd09b4c73f6178a19 Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Mon, 4 Apr 2022 17:18:49 +0200 Subject: [PATCH] use qint64 for sats, not int, as it will overflow --- electrum/gui/qml/qeconfig.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/electrum/gui/qml/qeconfig.py b/electrum/gui/qml/qeconfig.py index 16205359a..ec9c27904 100644 --- a/electrum/gui/qml/qeconfig.py +++ b/electrum/gui/qml/qeconfig.py @@ -78,8 +78,8 @@ class QEConfig(QObject): self.config.set_key('currency', currency) self.fiatCurrencyChanged.emit() - @pyqtSlot(int, result=str) - @pyqtSlot(int, bool, result=str) + @pyqtSlot('qint64', result=str) + @pyqtSlot('qint64', bool, result=str) def formatSats(self, satoshis, with_unit=False): if with_unit: return self.config.format_amount_and_units(satoshis) @@ -93,7 +93,7 @@ class QEConfig(QObject): def max_precision(self): return self.decimal_point() + 0 #self.extra_precision - @pyqtSlot(str, result=int) + @pyqtSlot(str, result='qint64') def unitsToSats(self, unitAmount): # returns amt in satoshis try: