up
This commit is contained in:
parent
eff1c204eb
commit
d5b6eb718c
1 changed files with 4 additions and 2 deletions
|
|
@ -69,7 +69,7 @@ export default class {
|
||||||
return res.response
|
return res.response
|
||||||
}
|
}
|
||||||
|
|
||||||
async Health(): Promise<void> {
|
async Health(): Promise<NodeInfo> {
|
||||||
if (!this.ready) {
|
if (!this.ready) {
|
||||||
throw new Error("not ready")
|
throw new Error("not ready")
|
||||||
}
|
}
|
||||||
|
|
@ -77,6 +77,7 @@ export default class {
|
||||||
if (!info.syncedToChain || !info.syncedToGraph) {
|
if (!info.syncedToChain || !info.syncedToGraph) {
|
||||||
throw new Error("not synced")
|
throw new Error("not synced")
|
||||||
}
|
}
|
||||||
|
return info
|
||||||
}
|
}
|
||||||
|
|
||||||
RestartStreams() {
|
RestartStreams() {
|
||||||
|
|
@ -188,7 +189,8 @@ export default class {
|
||||||
}
|
}
|
||||||
|
|
||||||
async PayInvoice(invoice: string, amount: number, feeLimit: number): Promise<PaidInvoice> {
|
async PayInvoice(invoice: string, amount: number, feeLimit: number): Promise<PaidInvoice> {
|
||||||
await this.Health()
|
const i = await this.Health()
|
||||||
|
console.log(i)
|
||||||
const abortController = new AbortController()
|
const abortController = new AbortController()
|
||||||
const req = PayInvoiceReq(invoice, amount, feeLimit)
|
const req = PayInvoiceReq(invoice, amount, feeLimit)
|
||||||
console.log("sending payment:", req)
|
console.log("sending payment:", req)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue