1
0

qml: port over 'show_qr to warn if QR code is missing data'

This commit is contained in:
Sander van Grieken
2023-03-31 10:49:36 +02:00
parent ea46d3c318
commit df44a5c361
5 changed files with 33 additions and 24 deletions

View File

@@ -728,11 +728,8 @@ class QEWallet(AuthMixin, QObject, QtEventListener):
self.dataChanged.emit()
@pyqtSlot(str, result=str)
@pyqtSlot(str, bool, result=str)
def getSerializedTx(self, txid, for_qr=False):
@pyqtSlot(str, result='QVariantList')
def getSerializedTx(self, txid):
tx = self.wallet.db.get_transaction(txid)
if for_qr:
return tx.to_qr_data()[0]
else:
return str(tx)
txqr = tx.to_qr_data()
return [str(tx), txqr[0], txqr[1]]