electrum

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

commit 4f516dc08e4888b82b0fb43c6d30c3e4c9d11731
parent c3388d967723965ecaff9663ddc9ada50a5dbee6
Author: ThomasV <thomasv@electrum.org>
Date:   Sat, 18 Feb 2017 20:22:46 +0100

fixes for paymentrequests and python3

Diffstat:
Mlib/paymentrequest.py | 6+++---
Mlib/x509.py | 2+-
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/paymentrequest.py b/lib/paymentrequest.py @@ -42,7 +42,7 @@ from six.moves import urllib_parse try: - from . import paymentrequest_pb2 as pb2 + from . import paymentrequest_pb2_py3 as pb2 except ImportError: sys.exit("Error: could not find paymentrequest_pb2.py. Create it with 'protoc --proto_path=lib/ --python_out=lib/ lib/paymentrequest.proto'") @@ -188,7 +188,7 @@ class PaymentRequest: # verify the BIP70 signature pubkey0 = rsakey.RSAKey(x.modulus, x.exponent) sig = paymntreq.signature - paymntreq.signature = '' + paymntreq.signature = b'' s = paymntreq.SerializeToString() sigBytes = bytearray(sig) msgBytes = bytearray(s) @@ -473,7 +473,7 @@ class InvoiceStore(object): def load(self, d): for k, v in d.items(): try: - pr = bfh(PaymentRequest(v.get('hex'))) + pr = PaymentRequest(bfh(v.get('hex'))) pr.tx = v.get('txid') pr.requestor = v.get('requestor') self.invoices[k] = pr diff --git a/lib/x509.py b/lib/x509.py @@ -292,7 +292,7 @@ class X509(object): return self.AKI if self.AKI else repr(self.issuer) def get_common_name(self): - return self.subject.get('2.5.4.3', 'unknown') + return self.subject.get('2.5.4.3', 'unknown').decode() def get_signature(self): return self.cert_sig_algo, self.signature, self.data