1
0

define constants for tx output types

This commit is contained in:
ThomasV
2016-01-14 17:15:50 +01:00
parent d57af0db33
commit 0d52911561
14 changed files with 54 additions and 48 deletions

View File

@@ -5,7 +5,7 @@ from sys import stderr
from time import sleep
import electrum
from electrum.bitcoin import EncodeBase58Check, DecodeBase58Check, public_key_to_bc_address, bc_address_to_hash_160
from electrum.bitcoin import EncodeBase58Check, DecodeBase58Check, public_key_to_bc_address, bc_address_to_hash_160, TYPE_ADDRESS
from electrum.i18n import _
from electrum.plugins import BasePlugin, hook
from electrum.transaction import deserialize
@@ -203,7 +203,7 @@ class BTChipWallet(BIP44_Wallet):
if len(tx.outputs) > 2: # should never happen
self.give_error("Transaction with more than 2 outputs not supported")
for type, address, amount in tx.outputs:
assert type == 'address'
assert type == TYPE_ADDRESS
if self.is_change(address):
changePath = self.address_id(address)
changeAmount = amount