Merge branch 'diagon-alley' of https://github.com/lnbits/lnbits-legend into diagon-alley

This commit is contained in:
ben 2022-11-30 12:47:29 +00:00
commit 8edcb25eee
2 changed files with 5 additions and 3 deletions

View file

@ -1443,7 +1443,7 @@
LNbits.api
.request(
'GET',
'/diagonalley/api/v1/keys',
'/diagonalley/api/v1/keys/merchant',
this.g.user.wallets[0].adminkey
)
.then(response => {

View file

@ -489,8 +489,10 @@ async def api_diagonalley_generate_keys():
private_key = PrivateKey()
public_key = private_key.pubkey.serialize().hex()
# set pubkey in order
await set_diagonalley_order_pubkey(payment_hash, pubkey=public_key[2:])
# if the call is made from merchant's side skip adding pubkey to order
if(payment_hash != "merchant"):
# set pubkey in order
await set_diagonalley_order_pubkey(payment_hash, pubkey=public_key[2:])
return {"privkey": private_key.serialize(), "pubkey": public_key[2:]}