1
0

allow to save unbroadcasted transactions in wallet

This commit is contained in:
ThomasV
2018-01-18 11:56:21 +01:00
parent 6f843a7bb6
commit e6dd3e6ad8
4 changed files with 46 additions and 32 deletions

View File

@@ -629,6 +629,15 @@ class Commands:
out = self.wallet.get_payment_request(addr, self.config)
return self._format_request(out)
@command('w')
def addtransaction(self, tx):
""" Add a transaction to the wallet history """
#fixme: we should ensure that tx is related to wallet
tx = Transaction(tx)
self.wallet.add_transaction(tx.txid(), tx)
self.wallet.save_transactions()
return tx.txid()
@command('wp')
def signrequest(self, address, password=None):
"Sign payment request with an OpenAlias"