1
0
This commit is contained in:
ThomasV
2020-06-02 16:32:07 +02:00
parent 84a8b6af1f
commit cfdfbd2bfe
2 changed files with 6 additions and 6 deletions

View File

@@ -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)

View File

@@ -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()