Merge pull request #5628 from TheCharlatan/fixMultisigDigitalBitBox

Digital BitBox: Fix sending to self
This commit is contained in:
ghost43 2019-09-09 14:37:17 +00:00 committed by GitHub
commit ddcd77ab36
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -570,11 +570,12 @@ class DigitalBitbox_KeyStore(Hardware_KeyStore):
assert o.type == TYPE_ADDRESS assert o.type == TYPE_ADDRESS
info = tx.output_info.get(o.address) info = tx.output_info.get(o.address)
if info is not None: if info is not None:
index = info.address_index if info.is_change:
changePath = self.get_derivation() + "/%d/%d" % index index = info.address_index
changePubkey = self.derive_pubkey(index[0], index[1]) changePath = self.get_derivation() + "/%d/%d" % index
pubkeyarray_i = {'pubkey': changePubkey, 'keypath': changePath} changePubkey = self.derive_pubkey(index[0], index[1])
pubkeyarray.append(pubkeyarray_i) pubkeyarray_i = {'pubkey': changePubkey, 'keypath': changePath}
pubkeyarray.append(pubkeyarray_i)
# Special serialization of the unsigned transaction for # Special serialization of the unsigned transaction for
# the mobile verification app. # the mobile verification app.