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

Wallet send+recv status derived from logs #1559

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from
Draft

Conversation

ekzyis
Copy link
Member

@ekzyis ekzyis commented Nov 8, 2024

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:

Screenshots

2024-11-13-220522_1920x1080_scrot

2024-11-13-222833_1920x1080_scrot

Video

2024-11-14.03-25-12.mp4

Additional Context

  1. I like the grey background for the icons in this:

2024-11-13-223506_173x199_scrot

more than this:

382002204-ecc2d9aa-2781-4eda-a4f8-1af5dfa81552

even though it started as an accident.

  1. I am setting context.recv = true in the walletLogger (the function) such that every log in the db will have recv: true inserted in the database. We could instead rely on !context.send or simply add context.recv to all logs before returning them to the client.

  2. 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. So

Checklist

Are your changes backwards compatible? Please answer below:

yes, context.send or context.recv is only used to derive wallet status

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:

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

@ekzyis ekzyis added feature new product features that weren't there before wallets labels Nov 8, 2024
@ekzyis ekzyis marked this pull request as draft November 8, 2024 21:23
@ekzyis 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 ekzyis force-pushed the wallet-logs-status branch 2 times, most recently from 2ed4391 to fc316a6 Compare November 12, 2024 16:18
@ekzyis ekzyis force-pushed the wallet-logs-status branch 3 times, most recently from c1ccff1 to ce852dd Compare November 13, 2024 16:44
@ekzyis ekzyis marked this pull request as ready for review November 14, 2024 02:38
@ekzyis ekzyis requested a review from huumn November 14, 2024 02:45
@@ -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
Copy link
Member Author

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 &&
Copy link
Member Author

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')
Copy link
Member Author

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

@ekzyis ekzyis marked this pull request as draft November 14, 2024 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature new product features that weren't there before wallets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wallet status derived from wallet logs
1 participant