remove payment_hash from generate keys
This commit is contained in:
parent
610814f0d0
commit
8e649501cf
2 changed files with 5 additions and 5 deletions
|
|
@ -336,13 +336,13 @@
|
||||||
this.user = null
|
this.user = null
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async generateKeys(payment_hash) {
|
async generateKeys() {
|
||||||
//check if the keys are set
|
//check if the keys are set
|
||||||
if ('publickey' in this.user.keys && 'privatekey' in this.user.keys)
|
if ('publickey' in this.user.keys && 'privatekey' in this.user.keys)
|
||||||
return
|
return
|
||||||
|
|
||||||
return await LNbits.api
|
return await LNbits.api
|
||||||
.request('GET', `/diagonalley/api/v1/keys/${payment_hash}`, null)
|
.request('GET', `/diagonalley/api/v1/keys`, null)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
let data = {
|
let data = {
|
||||||
|
|
@ -457,7 +457,7 @@
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// generate keys
|
// generate keys
|
||||||
this.generateKeys(order_id)
|
this.generateKeys()
|
||||||
// populate user data
|
// populate user data
|
||||||
this.user.orders = {
|
this.user.orders = {
|
||||||
[`${order_id}`]: this.products
|
[`${order_id}`]: this.products
|
||||||
|
|
|
||||||
|
|
@ -481,8 +481,8 @@ async def api_diagonalley_stall_create(
|
||||||
## KEYS
|
## KEYS
|
||||||
|
|
||||||
|
|
||||||
@diagonalley_ext.get("/api/v1/keys/{payment_hash}")
|
@diagonalley_ext.get("/api/v1/keys")
|
||||||
async def api_diagonalley_generate_keys(payment_hash: str):
|
async def api_diagonalley_generate_keys():
|
||||||
private_key = PrivateKey()
|
private_key = PrivateKey()
|
||||||
public_key = private_key.pubkey.serialize().hex()
|
public_key = private_key.pubkey.serialize().hex()
|
||||||
while not public_key.startswith("02"):
|
while not public_key.startswith("02"):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue