-
-
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
base: master
Are you sure you want to change the base?
Conversation
2ed4391
to
fc316a6
Compare
c1ccff1
to
ce852dd
Compare
3d10b62
to
e6d84d0
Compare
@@ -27,6 +27,14 @@ export default function LogMessage ({ showWallet, wallet, level, message, contex | |||
|
|||
const style = hasContext ? { cursor: 'pointer' } : { cursor: 'inherit' } | |||
const indicator = hasContext ? (show ? '-' : '+') : <></> | |||
const filteredCtx = context |
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.
we don't want to show send
or recv
in the context of a log message
@@ -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.
@@ -8,7 +8,7 @@ export async function testSendPayment ({ url, adminKey, invoiceKey }, { logger } | |||
url = url.replace(/\/+$/, '') | |||
await getWallet({ url, adminKey, invoiceKey }) | |||
|
|||
logger.ok('wallet found') | |||
logger.info('wallet found') |
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 didn't want this to affect the wallet status
Description
For now, this simply uses the most recent log that isn't just info to derive the 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-14.03-25-12.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 might appears bigger. Good example is the LND logo on the config page since it's more a square. SoChecklist
Are your changes backwards compatible? Please answer below:
yes,
context.send
orcontext.recv
is only used to derive wallet statusOn a scale of 1-10 how well and how have you QA'd this change and any features it might affect? Please answer below:
7
. See video for Q&A.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