ThomasV 5 years ago
parent
commit
cfdfbd2bfe
  1. 2
      electrum/daemon.py
  2. 10
      electrum/paymentrequest.py

2
electrum/daemon.py

@ -350,7 +350,7 @@ class PayServer(Logger):
async def get_bip70_request(self, r): async def get_bip70_request(self, r):
from .paymentrequest import make_request from .paymentrequest import make_request
key = r.match_info['key'] key = r.match_info['key']
request = self.wallet.get_formatted_request(key) request = self.wallet.get_request(key)
if not request: if not request:
return web.HTTPNotFound() return web.HTTPNotFound()
pr = make_request(self.config, request) pr = make_request(self.config, request)

10
electrum/paymentrequest.py

@ -317,17 +317,17 @@ class PaymentRequest:
def make_unsigned_request(req): def make_unsigned_request(req):
from .transaction import Transaction from .transaction import Transaction
addr = req['address'] addr = req.get_address()
time = req.get('time', 0) time = req.time
exp = req.get('exp', 0) exp = req.exp
if time and type(time) != int: if time and type(time) != int:
time = 0 time = 0
if exp and type(exp) != int: if exp and type(exp) != int:
exp = 0 exp = 0
amount = req['amount'] amount = req.amount
if amount is None: if amount is None:
amount = 0 amount = 0
memo = req['memo'] memo = req.message
script = bfh(address_to_script(addr)) script = bfh(address_to_script(addr))
outputs = [(script, amount)] outputs = [(script, amount)]
pd = pb2.PaymentDetails() pd = pb2.PaymentDetails()

Loading…
Cancel
Save