commit
a8455b8799
2 changed files with 4 additions and 4 deletions
|
|
@ -211,11 +211,10 @@ export class Unlocker {
|
||||||
throw new Error("node pub not found")
|
throw new Error("node pub not found")
|
||||||
}
|
}
|
||||||
const encrypted = await this.storage.liquidityStorage.GetNoodeSeed(this.nodePub)
|
const encrypted = await this.storage.liquidityStorage.GetNoodeSeed(this.nodePub)
|
||||||
if (!encrypted || !encrypted.seed) {
|
if (!encrypted) {
|
||||||
throw new Error("seed not found")
|
throw new Error("seed not found")
|
||||||
}
|
}
|
||||||
|
const decrypted = this.DecryptWalletSeed(JSON.parse(encrypted))
|
||||||
const decrypted = this.DecryptWalletSeed(JSON.parse(encrypted.seed))
|
|
||||||
return { seed: decrypted }
|
return { seed: decrypted }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,8 @@ export class LiquidityStorage {
|
||||||
}
|
}
|
||||||
|
|
||||||
async GetNoodeSeed(pubkey: string) {
|
async GetNoodeSeed(pubkey: string) {
|
||||||
return this.dbs.FindOne<LndNodeInfo>('LndNodeInfo', { where: { pubkey, seed: Not(IsNull()) } })
|
const node = await this.dbs.FindOne<LndNodeInfo>('LndNodeInfo', { where: { pubkey/* , seed: Not(IsNull()) */ } })
|
||||||
|
return node?.seed
|
||||||
}
|
}
|
||||||
|
|
||||||
async SaveNodeSeed(pubkey: string, seed: string) {
|
async SaveNodeSeed(pubkey: string, seed: string) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue