1
0

qt tx dialog: show_qr to warn if QR code is missing data

When exporting a tx as qr code, the prev txs are omitted to save space.
This causes problems with offline signers: software electrum signers will
just warn and then proceed, but hw devices will typically error.
This commit is contained in:
SomberNight
2023-03-30 14:32:31 +00:00
parent 4647fda04f
commit 0a3e286f1d
6 changed files with 25 additions and 12 deletions

View File

@@ -5,7 +5,7 @@ from PyQt5.QtCore import pyqtProperty, pyqtSignal, pyqtSlot, QObject
from electrum.i18n import _
from electrum.logging import get_logger
from electrum.util import format_time, AddTransactionException, TxMinedInfo
from electrum.transaction import tx_from_any
from electrum.transaction import tx_from_any, Transaction
from electrum.network import Network
from .qewallet import QEWallet
@@ -31,7 +31,7 @@ class QETxDetails(QObject, QtEventListener):
self._rawtx = ''
self._label = ''
self._tx = None
self._tx = None # type: Optional[Transaction]
self._status = ''
self._amount = QEAmount()
@@ -396,6 +396,6 @@ class QETxDetails(QObject, QtEventListener):
def getSerializedTx(self, for_qr=False):
tx = self._tx
if for_qr:
return tx.to_qr_data()
return tx.to_qr_data()[0]
else:
return str(tx)