electrum

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

commit 0b54ed02430533ab4c054feeac60988d53674f91
parent 9efbb57766bb0ed8e92e470528bfc07036b647c4
Author: ThomasV <thomasv@electrum.org>
Date:   Tue,  2 Feb 2016 07:18:18 +0100

follow up 0d529115612434b29b30e5d11714fc7625fe4d6c

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

diff --git a/lib/paymentrequest.py b/lib/paymentrequest.py @@ -40,6 +40,7 @@ import transaction import x509 import rsakey +from bitcoin import TYPE_ADDRESS REQUEST_HEADERS = {'Accept': 'application/bitcoin-paymentrequest', 'User-Agent': 'Electrum'} ACK_HEADERS = {'Content-Type':'application/bitcoin-payment','Accept':'application/bitcoin-paymentack','User-Agent':'Electrum'} @@ -96,7 +97,7 @@ class PaymentRequest: self.outputs = [] for o in self.details.outputs: addr = transaction.get_address_from_output_script(o.script)[1] - self.outputs.append(('address', addr, o.amount)) + self.outputs.append((TYPE_ADDRESS, addr, o.amount)) self.memo = self.details.memo self.payment_url = self.details.payment_url @@ -211,7 +212,7 @@ class PaymentRequest: paymnt.transactions.append(raw_tx) ref_out = paymnt.refund_to.add() - ref_out.script = transaction.Transaction.pay_script('address', refund_addr) + ref_out.script = transaction.Transaction.pay_script(TYPE_ADDRESS, refund_addr) paymnt.memo = "Paid using Electrum" pm = paymnt.SerializeToString() @@ -253,7 +254,7 @@ def make_unsigned_request(req): if amount is None: amount = 0 memo = req['memo'] - script = Transaction.pay_script('address', addr).decode('hex') + script = Transaction.pay_script(TYPE_ADDRESS, addr).decode('hex') outputs = [(script, amount)] pd = pb2.PaymentDetails() for script, amount in outputs: