Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bookkeeper Dashboard #75

Open
wants to merge 71 commits into
base: Release-0.0.7
Choose a base branch
from

Conversation

evansmj
Copy link
Contributor

@evansmj evansmj commented Oct 1, 2024

This adds 4 new features:

bookkeeper/balancesheet
bookkeeper/satsflow
bookkeeper/volume
bookkeeper/terminal

todo:
balance sheet needs to skip unchanging bars similar to sats flow

ShahanaFarooqui and others added 30 commits October 26, 2023 14:42
zsh has an expansion with '='.
if you run `source ./env.sh` in zsh, it will error `zsh: = not found`.
Using [[ ]] in the if statement is safer and results in`=` evaluating
properly with [[ ]] conditionals.
Fix README.md typos
This commit adds react-router so that we can route to other pages, such as the upcoming Bookkeeper Dashboard page.
It is set up so that the Header is shared among both the initial aka /home screen and the /bookkeeper screen. A redirect for '/' to '/home/' was added to support this shared header. Tests were written in App.test.tsx for this.

There is no discernible difference to a user with this change, other than if they manually navigate to /bookkeeper they will see a blank page. There is no button navigating to /bookkeeper and will not be until it is ready for production. This is so that regular pull request reviews can be done vs having to review a giant pull request with the new bookkeeper dashboard feature.

Test dependencies were updated and ts-jest + axios-mock-adapter were added so that components that import axios could be rendered in tests.
- Broke CLNHome and Bookkeeper into their own components
- Keeping App smaller with Root component and root router only
- Undo typescript downgrade from v5 to v4.
- Adding env.sh to gitignore to avoid its future commits
The "no transactions helper text" displays two different strings depending on if the node has active channels or not.  This commit fixes a bug where these two are backwards and adds tests in CLNTransactionsList.test.tsx.
…tion-channels-text

Fix empty transactions channel helper text
Adds tests for many components.  npm run test should result in all tests passing.
- Fixed DateBox test with locale
- Fixed timer and canvas warnings
- Moved mock data into utilities/test-utilities
…n-fix

Adding local env.sh and indentation fixes
Renamed the type Channels to ChannelsDomain since it has extra fields added.  ChannelsDto is the response from the network.  This was done so it is clear what comes from the network and what is calculated, and to map fields from listpeerchannels into the previous Channel domain model.  Removed some fields that are not used and not available in listpeerchannels: direction, max_htlc_value_in_flight_msat, htlc_minimum_msat, last_tx_fee_msat.  Other fields were duplicates such as spendable_msatoshi and deleted since spendable_msat exists in listpeerchannels as well as in the original Channels object.

use-http sendRequestToStore is now able to handle multiple rpc methods and it bundles the responses together.  This allows for sending 2+ rpc calls to 1 state, such as for the new channels AppContextType.

Removed the controllers/lightning.ts behavior of checking if listpeers was called and adding node.alias to the response.  This was so that the domain layer would handle setting domain data.

channels was added as an AppContextType.  It combines listpeerchannels and listnodes so that the node aliases can be set to the channels.

Added comment to isCompatibleVersion to explain what it does.

Added Channels component tests.  Update mock store to use channels instead of listChannels.
The code is written as per newer version on CLN.

For older CLN nodes, we will collect channels arrays from listPeers.peers array and convert them into newer channels type by adding id as peer_id and connected and peer_connected. Remaining data stays the same.
For eg. changed `satoshi_to_us` to `to_us_sat`, `satoshi_to_them` to `to_them_sat` etc.
…listpeerchannels

Update to listpeerchannels
…data

Updated the mock data and checks with more realistic dataset
…emoval

Remove msatoshi_received, msatoshi, msatoshi_sent from Payments and I…
…-compatble

RC version compatibility check
@evansmj evansmj changed the base branch from Release-0.0.7 to Release-0.0.6 October 1, 2024 00:43
@evansmj evansmj changed the base branch from Release-0.0.6 to Release-0.0.7 October 1, 2024 00:44
@evansmj
Copy link
Contributor Author

evansmj commented Oct 21, 2024

Time granularity designs:
Screenshot 2024-10-20 at 10 45 56 PM
Screenshot 2024-10-20 at 10 43 54 PM
Screenshot 2024-10-20 at 10 45 45 PM
Screenshot 2024-10-20 at 10 44 03 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants