Browse Source

Merge branch 'master' of https://github.com/spesmilo/electrum into showaccount

283
Tafelpoot 10 years ago
parent
commit
b6f0f8c02c
  1. 10
      gui/qt/main_window.py
  2. 11
      lib/wallet.py

10
gui/qt/main_window.py

@ -1243,6 +1243,7 @@ class ElectrumWindow(QMainWindow):
self.message_e.setText(message)
if amount:
self.amount_e.setAmount(amount)
self.amount_e.textEdited.emit("")
return
from electrum import paymentrequest
@ -1273,7 +1274,7 @@ class ElectrumWindow(QMainWindow):
self.payto_help.set_alt(None)
self.set_pay_from([])
self.update_status()
run_hook('do_clear')
def set_addrs_frozen(self,addrs,freeze):
@ -2722,7 +2723,7 @@ class ElectrumWindow(QMainWindow):
def plugins_dialog(self):
from electrum.plugins import plugins
d = QDialog(self)
self.pluginsdialog = d = QDialog(self)
d.setWindowTitle(_('Electrum Plugins'))
d.setModal(1)
@ -2773,15 +2774,12 @@ class ElectrumWindow(QMainWindow):
cb.clicked.connect(mk_toggle(cb,p,w))
grid.addWidget(HelpButton(p.description()), i, 2)
except Exception:
print_msg(_("Error: cannot display plugin"), p)
print_msg("Error: cannot display plugin", p)
traceback.print_exc(file=sys.stdout)
grid.setRowStretch(i+1,1)
vbox.addLayout(close_button(d))
d.exec_()
def show_account_details(self, k):
account = self.wallet.accounts[k]

11
lib/wallet.py

@ -786,7 +786,6 @@ class Abstract_Wallet(object):
x_pubkeys = tx.inputs_to_sign()
for x in x_pubkeys:
sec = self.get_private_key_from_xpubkey(x, password)
print "sec", sec
if sec:
keypairs[ x ] = sec
if keypairs:
@ -1026,10 +1025,12 @@ class Abstract_Wallet(object):
return self.get_private_key(addr, password)[0]
elif x_pubkey[0:2] == 'ff':
xpub, sequence = BIP32_Account.parse_xpubkey(x_pubkey)
for k, account in self.accounts.items():
if xpub in account.get_master_pubkeys():
pk = account.get_private_key(sequence, self, password)
return pk[0]
for k, v in self.master_public_keys.items():
if v == xpub:
xprv = self.get_master_private_key(k, password)
if xprv:
_, _, _, c, k = deserialize_xkey(xprv)
return bip32_private_key(sequence, k, c)
elif x_pubkey[0:2] == 'fe':
xpub, sequence = OldAccount.parse_xpubkey(x_pubkey)
for k, account in self.accounts.items():

Loading…
Cancel
Save