electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 2c6cf7f80cda5ee78fa1b8d670ae53de169b99f9
parent d994d27704934d7bad4fc483b31172a2e70e0bf9
Author: SomberNight <somber.night@protonmail.com>
Date:   Sat, 10 Mar 2018 08:00:41 +0100

careful with exceptions..

Diffstat:
Mlib/wallet.py | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/wallet.py b/lib/wallet.py @@ -1939,14 +1939,15 @@ class Imported_Wallet(Simple_Wallet): try: txin_type, pubkey = self.keystore.import_privkey(sec, pw) except Exception: - raise BaseException('Invalid private key', sec) + neutered_privkey = str(sec)[:3] + '..' + str(sec)[-2:] + raise BaseException('Invalid private key', neutered_privkey) if txin_type in ['p2pkh', 'p2wpkh', 'p2wpkh-p2sh']: if redeem_script is not None: - raise BaseException('Cannot use redeem script with', txin_type, sec) + raise BaseException('Cannot use redeem script with', txin_type) addr = bitcoin.pubkey_to_address(txin_type, pubkey) elif txin_type in ['p2sh', 'p2wsh', 'p2wsh-p2sh']: if redeem_script is None: - raise BaseException('Redeem script required for', txin_type, sec) + raise BaseException('Redeem script required for', txin_type) addr = bitcoin.redeem_script_to_address(txin_type, redeem_script) else: raise NotImplementedError(txin_type)