payment requests: cmdline fixes
This commit is contained in:
parent
fbc23a61a3
commit
da55d9ed6e
|
@ -319,7 +319,7 @@ def sign_request_with_alias(pr, alias, alias_privkey):
|
|||
return pr
|
||||
|
||||
|
||||
def sign_request_with_x509(pr, alias, alias_privkey):
|
||||
def sign_request_with_x509(pr, key_path, cert_path):
|
||||
import tlslite
|
||||
with open(key_path, 'r') as f:
|
||||
rsakey = tlslite.utils.python_rsakey.Python_RSAKey.parsePEM(f.read())
|
||||
|
@ -355,7 +355,7 @@ def make_request(config, req, alias=None, alias_privkey=None):
|
|||
|
||||
if key_path and cert_path:
|
||||
sign_request_with_x509(pr, key_path, cert_path)
|
||||
requestor = pr.requestor
|
||||
requestor = 'x'
|
||||
|
||||
elif alias and alias_privkey:
|
||||
requestor = alias
|
||||
|
|
|
@ -1280,10 +1280,10 @@ class Abstract_Wallet(object):
|
|||
src = os.path.join(os.path.dirname(__file__), 'www', 'index.html')
|
||||
shutil.copy(src, index)
|
||||
key = req.get('id', addr)
|
||||
pr = paymentrequest.make_request(config, req)
|
||||
pr, requestor = paymentrequest.make_request(config, req)
|
||||
path = os.path.join(rdir, key + '.bip70')
|
||||
with open(path, 'w') as f:
|
||||
f.write(pr)
|
||||
f.write(pr.SerializeToString())
|
||||
# reload
|
||||
req = self.get_payment_request(addr, config)
|
||||
with open(os.path.join(rdir, key + '.json'), 'w') as f:
|
||||
|
|
Loading…
Reference in New Issue