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")
|
||||
}
|
||||
const encrypted = await this.storage.liquidityStorage.GetNoodeSeed(this.nodePub)
|
||||
if (!encrypted || !encrypted.seed) {
|
||||
if (!encrypted) {
|
||||
throw new Error("seed not found")
|
||||
}
|
||||
|
||||
const decrypted = this.DecryptWalletSeed(JSON.parse(encrypted.seed))
|
||||
const decrypted = this.DecryptWalletSeed(JSON.parse(encrypted))
|
||||
return { seed: decrypted }
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@ export class LiquidityStorage {
|
|||
}
|
||||
|
||||
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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue