diff --git a/lib/transaction.py b/lib/transaction.py index 2c31c397d..18f4733ee 100644 --- a/lib/transaction.py +++ b/lib/transaction.py @@ -597,8 +597,6 @@ class Transaction: def is_complete(self): for i, txin in enumerate(self.inputs): - #redeem_script = txin.get('redeemScript') - #num, redeem_pubkeys = parse_redeemScript(redeem_script) if redeem_script else (1, [txin.get('redeemPubkey')]) pubkeys = txin['pubkeys'] signatures = txin.get("signatures",{}) if len(signatures) == txin['num_sig']: @@ -614,15 +612,9 @@ class Transaction: for i, txin in enumerate(self.inputs): - # if the input is multisig, parse redeem script - #redeem_script = txin.get('redeemScript') - #num, redeem_pubkeys = parse_redeemScript(redeem_script) if redeem_script else (1, [txin.get('redeemPubkey')]) redeem_pubkeys = txin['pubkeys'] num = len(redeem_pubkeys) - # add pubkeys - ### txin["pubkeys"] = redeem_pubkeys - # get list of already existing signatures signatures = txin.get("signatures",{}) # continue if this txin is complete diff --git a/lib/wallet.py b/lib/wallet.py index e1adcd7bd..abc2a5859 100644 --- a/lib/wallet.py +++ b/lib/wallet.py @@ -1592,28 +1592,6 @@ class OldWallet(Deterministic_Wallet): s = self.get_seed(password) return ' '.join(mnemonic.mn_encode(s)) - - def add_keypairs_from_KeyID(self, tx, keypairs, password): - # first check the provided password - for txin in tx.inputs: - keyid = txin.get('KeyID') - if keyid: - m = re.match("old\(([0-9a-f]+),(\d+),(\d+)", keyid) - if not m: continue - mpk = m.group(1) - if mpk != self.storage.get('master_public_key'): continue - for_change = int(m.group(2)) - num = int(m.group(3)) - account = self.accounts[0] - addr = account.get_address(for_change, num) - txin['address'] = addr # fixme: side effect - pk = account.get_private_key((for_change, num), self, password) - for sec in pk: - pubkey = public_key_from_private_key(sec) - keypairs[pubkey] = sec - - - def check_pending_accounts(self): pass