mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-25 15:10:41 +01:00
Merge remote-tracking branch 'origin/diagon-alley' into diagon-alley
This commit is contained in:
commit
dae9db7042
2 changed files with 5 additions and 5 deletions
|
@ -336,13 +336,13 @@
|
|||
this.user = null
|
||||
})
|
||||
},
|
||||
async generateKeys(payment_hash) {
|
||||
async generateKeys() {
|
||||
//check if the keys are set
|
||||
if ('publickey' in this.user.keys && 'privatekey' in this.user.keys)
|
||||
return
|
||||
|
||||
return await LNbits.api
|
||||
.request('GET', `/diagonalley/api/v1/keys/${payment_hash}`, null)
|
||||
.request('GET', `/diagonalley/api/v1/keys`, null)
|
||||
.then(response => {
|
||||
if (response.data) {
|
||||
let data = {
|
||||
|
@ -457,7 +457,7 @@
|
|||
}
|
||||
} else {
|
||||
// generate keys
|
||||
this.generateKeys(order_id)
|
||||
this.generateKeys()
|
||||
// populate user data
|
||||
this.user.orders = {
|
||||
[`${order_id}`]: this.products
|
||||
|
|
|
@ -481,8 +481,8 @@ async def api_diagonalley_stall_create(
|
|||
## KEYS
|
||||
|
||||
|
||||
@diagonalley_ext.get("/api/v1/keys/{payment_hash}")
|
||||
async def api_diagonalley_generate_keys(payment_hash: str):
|
||||
@diagonalley_ext.get("/api/v1/keys")
|
||||
async def api_diagonalley_generate_keys():
|
||||
private_key = PrivateKey()
|
||||
public_key = private_key.pubkey.serialize().hex()
|
||||
while not public_key.startswith("02"):
|
||||
|
|
Loading…
Add table
Reference in a new issue