Merge pull request #1192 from wintercooled/fix-pset-example

fix pset swap example
This commit is contained in:
Pablo Greco 2022-11-18 19:39:32 -03:00 committed by GitHub
commit 9c067622cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -210,9 +210,9 @@ for out in outputs:
elif out in decoded_c["vout"]:
blinder_idx = carol_idx
# The crappy rawtransaction API requires that we reconstruct blinded addresses,
# which are split between the "addresses" and "nonce" field
address = out["scriptPubKey"]["addresses"][0]
# The rawtransaction API requires that we reconstruct the blinded address,
# which is split between the "address" and "nonce" (blinding pubkey) fields
address = out["scriptPubKey"]["address"]
if "commitmentnonce" in out:
address = alice.createblindedaddress(address, out["commitmentnonce"])