cln-application icon indicating copy to clipboard operation
cln-application copied to clipboard

Fetch and Process Balance Sheet data

Open evansmj opened this issue 1 year ago • 1 comments

This commit uses the sql rpc command to fetch the data for the Balance Sheet.

getBalanceSheet() was added to use-http.ts as a standalone function instead of getting it via AppContext so that we can pass parameters more easily to it. TimeGranularity represents the way we should group the data e.g. Monthly, Weekly, Daily.

The sql needs to be transformed for the balance sheet, this was done in a new file bookkeeper-transform.ts since it takes some effort. Future transform functions such as for Sats Flow would go in this file. transformToBalanceSheet() is complex because we are limited in what methods we can use in the sql rpc call, so I need to do things like grouping and aggregation of credits - debits.

evansmj avatar Apr 27 '24 00:04 evansmj

hey @ShahanaFarooqui no rush on this pr. but for this one i am wondering what you think of the way i handle fetching the sql data and sending it to the components. in the meantime i'll keep tweaking the design.

evansmj avatar Jun 11 '24 03:06 evansmj

using new branch evansmj/satsflow

evansmj avatar Sep 07 '24 11:09 evansmj