1
0

qml: support create & save transaction on watch-only wallet, refactor showExport and supply

relevant help text when sharing a transaction
This commit is contained in:
Sander van Grieken
2023-03-30 12:26:28 +02:00
parent 6bec498560
commit c08ca94591
6 changed files with 90 additions and 43 deletions

View File

@@ -328,6 +328,10 @@ class QEWallet(AuthMixin, QObject, QtEventListener):
def walletType(self):
return self.wallet.wallet_type
@pyqtProperty(bool, notify=dataChanged)
def isMultisig(self):
return isinstance(self.wallet, Multisig_Wallet)
@pyqtProperty(bool, notify=dataChanged)
def hasSeed(self):
return self.wallet.has_seed()
@@ -723,3 +727,12 @@ class QEWallet(AuthMixin, QObject, QtEventListener):
self._seed = ''
self.dataChanged.emit()
@pyqtSlot(str, result=str)
@pyqtSlot(str, bool, result=str)
def getSerializedTx(self, txid, for_qr=False):
tx = self.wallet.db.get_transaction(txid)
if for_qr:
return tx.to_qr_data()
else:
return str(tx)