sign_tx hook
This commit is contained in:
parent
401c24e4ad
commit
2b0d92e767
|
@ -904,8 +904,6 @@ class ElectrumWindow(QMainWindow):
|
||||||
QMessageBox.warning(self, _('Error'), _("This transaction requires a higher fee, or it will not be propagated by the network."), _('OK'))
|
QMessageBox.warning(self, _('Error'), _("This transaction requires a higher fee, or it will not be propagated by the network."), _('OK'))
|
||||||
return
|
return
|
||||||
|
|
||||||
run_hook('send_tx', tx)
|
|
||||||
|
|
||||||
if label:
|
if label:
|
||||||
self.set_label(tx.hash(), label)
|
self.set_label(tx.hash(), label)
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@ from util import print_msg, print_error, format_satoshis
|
||||||
from bitcoin import *
|
from bitcoin import *
|
||||||
from account import *
|
from account import *
|
||||||
from transaction import Transaction
|
from transaction import Transaction
|
||||||
|
from plugins import run_hook
|
||||||
|
|
||||||
# AES encryption
|
# AES encryption
|
||||||
EncodeAES = lambda secret, s: base64.b64encode(aes.encryptData(secret,s))
|
EncodeAES = lambda secret, s: base64.b64encode(aes.encryptData(secret,s))
|
||||||
|
@ -652,7 +653,8 @@ class Wallet:
|
||||||
|
|
||||||
print txin
|
print txin
|
||||||
|
|
||||||
tx.sign( keypairs )
|
self.sign_tx(tx, keypairs)
|
||||||
|
|
||||||
|
|
||||||
def sign_message(self, address, message, password):
|
def sign_message(self, address, message, password):
|
||||||
keys = self.get_private_key(address, password)
|
keys = self.get_private_key(address, password)
|
||||||
|
@ -1217,7 +1219,13 @@ class Wallet:
|
||||||
for sec in private_keys:
|
for sec in private_keys:
|
||||||
pubkey = public_key_from_private_key(sec)
|
pubkey = public_key_from_private_key(sec)
|
||||||
keypairs[ pubkey ] = sec
|
keypairs[ pubkey ] = sec
|
||||||
|
|
||||||
|
self.sign_tx(tx, keypairs)
|
||||||
|
|
||||||
|
|
||||||
|
def sign_tx(self, tx, keypairs):
|
||||||
tx.sign(keypairs)
|
tx.sign(keypairs)
|
||||||
|
run_hook('sign_tx', tx)
|
||||||
|
|
||||||
|
|
||||||
def sendtx(self, tx):
|
def sendtx(self, tx):
|
||||||
|
|
Loading…
Reference in New Issue