From cf20f142a06a5cf9d58b406fec0dd01a60c37ea1 Mon Sep 17 00:00:00 2001 From: elraphty Date: Mon, 9 Oct 2023 23:25:15 +0100 Subject: [PATCH] changed int to flaot64 for invoice response amount --- db/structs.go | 10 +++++----- handlers/invoiceCron.go | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/db/structs.go b/db/structs.go index d254b9c99..b19ddd216 100644 --- a/db/structs.go +++ b/db/structs.go @@ -277,11 +277,11 @@ type InvoiceResult struct { } type InvoiceCheckResponse struct { - Settled bool `json:"settled"` - Payment_request string `json:"payment_request"` - Payment_hash string `json:"payment_hash"` - Preimage string `json:"preimage"` - Amount int `json:"amount"` + Settled bool `json:"settled"` + Payment_request string `json:"payment_request"` + Payment_hash string `json:"payment_hash"` + Preimage string `json:"preimage"` + Amount float64 `json:"amount"` } type DeleteBountyAssignee struct { diff --git a/handlers/invoiceCron.go b/handlers/invoiceCron.go index a5ce0b441..2c07c90c7 100644 --- a/handlers/invoiceCron.go +++ b/handlers/invoiceCron.go @@ -20,7 +20,7 @@ func InitInvoiceCron() { s := gocron.NewScheduler(time.UTC) msg := make(map[string]interface{}) - s.Every(1).Seconds().Do(func() { + s.Every(5).Seconds().Do(func() { invoiceList, _ := db.Store.GetInvoiceCache() invoiceCount := len(invoiceList) @@ -177,7 +177,7 @@ func InitInvoiceCron() { } }) - s.Every(1).Seconds().Do(func() { + s.Every(5).Seconds().Do(func() { invoiceList, _ := db.Store.GetBudgetInvoiceCache() invoiceCount := len(invoiceList)