up
This commit is contained in:
parent
39b70c7b42
commit
655d3a9373
1 changed files with 3 additions and 3 deletions
|
|
@ -24,7 +24,7 @@ export class LiquidityProvider {
|
|||
invoicePaidCb: InvoicePaidCb
|
||||
connecting = false
|
||||
readyInterval: NodeJS.Timeout
|
||||
queue: { res: (usable: boolean) => void }[] = []
|
||||
queue: ((usable: boolean) => void)[] = []
|
||||
// make the sub process accept client
|
||||
constructor(pubDestination: string, invoicePaidCb: InvoicePaidCb) {
|
||||
if (!pubDestination) {
|
||||
|
|
@ -55,7 +55,7 @@ export class LiquidityProvider {
|
|||
return true
|
||||
}
|
||||
return new Promise<boolean>(res => {
|
||||
this.queue.push({ res })
|
||||
this.queue.push(res)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -70,7 +70,7 @@ export class LiquidityProvider {
|
|||
if (this.latestMaxWithdrawable === null) {
|
||||
return
|
||||
}
|
||||
this.queue.forEach(q => q.res(true))
|
||||
this.queue.forEach(q => q(true))
|
||||
this.log("subbing to user operations")
|
||||
this.client.GetLiveUserOperations(res => {
|
||||
console.log("got user operation", res)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue