-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
Wallet send+recv status derived from logs #1559
Open
ekzyis
wants to merge
20
commits into
master
Choose a base branch
from
wallet-logs-status
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+236
−80
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ekzyis
changed the title
Wallet status derived from logs, separate status for send and recv
Wallet send+recv status derived from logs
Nov 8, 2024
ekzyis
force-pushed
the
wallet-logs-status
branch
2 times, most recently
from
November 12, 2024 16:18
2ed4391
to
fc316a6
Compare
1 task
ekzyis
force-pushed
the
wallet-logs-status
branch
3 times, most recently
from
November 13, 2024 16:44
c1ccff1
to
ce852dd
Compare
ekzyis
force-pushed
the
wallet-logs-status
branch
from
November 14, 2024 02:07
3d10b62
to
e6d84d0
Compare
ekzyis
commented
Nov 14, 2024
ekzyis
commented
Nov 14, 2024
@@ -11,7 +11,7 @@ export default function WalletButtonBar ({ | |||
return ( | |||
<div className={`mt-3 ${className}`}> | |||
<div className='d-flex justify-content-between'> | |||
{isConfigured(wallet) && | |||
{isConfigured(wallet) && wallet.def.requiresConfig && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like that WebLN always showed detach
. This fixes it by only showing it if there's actually something to delete.
ekzyis
commented
Nov 14, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
For now, this simply uses the most recent log that has
context.status
set to derive the status.context.status
is set ifcontext.bolt11
is set to make sure only payments affect status.Close #1490 Based on #1588 Related to #1495
TODO:
refactor workaround for conditional polling of wallet logs viauseInterval
maybe it's not as dumb as I initially thought since alternatives look dumberno longer neededfix logging payments (see Fix first IDB operation never executed #1588 (comment))I decided to simply also use polling logs for wallet status so no code change needed.Screenshots
Video
2024-11-15.01-08-14.mp4
Additional Context
more than this:
even though it started as an accident.
I am setting
context.recv = true
in thewalletLogger
(the function) such that every log in the db will haverecv: true
inserted in the database. We could instead rely on!context.send
or simply addcontext.recv
to all logs before returning them to the client.Aspect ratio of logos are different but all images use
width='100%'
which means that an image with a higher height/width ratio appears bigger. Good example is the LND logo on the config page since it's more a square.Checklist
Are your changes backwards compatible? Please answer below:
yes,
context.status
+context.send
orcontext.recv
is only used to derive wallet status. If no log has this set, the wallet status for send/recv only depends on if the wallet is configured.On a scale of 1-10 how well and how have you QA'd this change and any features it might affect? Please answer below:
8
. See video for Q&A of LNbits. I also tested NWC. I also tested reordering and saving combinations of send/recv.For frontend changes: Tested on mobile? Please answer below:
n/a
Did you introduce any new environment variables? If so, call them out explicitly here:
no