Thanks to visit codestin.com
Credit goes to github.com

Skip to content

REF: lightning wallet minor refactor#8006

Merged
GladosBlueWallet merged 12 commits into
masterfrom
ref-ln
Aug 6, 2025
Merged

REF: lightning wallet minor refactor#8006
GladosBlueWallet merged 12 commits into
masterfrom
ref-ln

Conversation

@Overtorment

@Overtorment Overtorment commented Jul 13, 2025

Copy link
Copy Markdown
Member

I carved out all refactorings from #7961 to deliver separately

additionally, refactoreed Transaction type, got rid of .receive in favour of .timestamp. we used to have both, but now we have only one and its definately an integer representing seconds, way less mess. @marcosrdz i also changed all occurances in native code without uderstanding whats going on, so you might want to review those changes extra carefully.

i also tried to refactor Transaction & LightningTransaction types and make everything correctly, but this led to a lot of ts complaints all over the codebase so Ill leave it for later

@Overtorment Overtorment marked this pull request as ready for review July 13, 2025 10:28
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@Overtorment Overtorment requested a review from marcosrdz July 13, 2025 17:37
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@limpbrains limpbrains left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about Transactions that are alreay in the real store? What existing user will see ?

Comment thread class/wallets/lightning-custodian-wallet.ts
Comment thread class/wallets/legacy-wallet.ts Outdated
Comment thread components/WalletsCarousel.tsx
Comment thread screen/lnd/lndViewInvoice.tsx
Comment thread screen/wallets/WalletDetails.tsx
@Overtorment Overtorment requested a review from limpbrains August 5, 2025 14:32
@Overtorment

Copy link
Copy Markdown
Member Author

@limpbrains very good findings, thanks!
i fixed it and set to re-review

const currentDate = new Date();
const now = (currentDate.getTime() / 1000) | 0; // eslint-disable-line no-bitwise
const invoiceExpiration = updatedUserInvoice.timestamp + updatedUserInvoice.expire_time;
const invoiceExpiration = (updatedUserInvoice.timestamp ?? 0) + (updatedUserInvoice.expire_time ?? 0);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Invoice Polling Fails on String Prop

The invoice status polling useEffect has two issues: it incorrectly starts when the invoice prop is a string (not yet decoded), as !(invoice as LightningTransaction).ispaid evaluates to true for strings. Furthermore, if an invoice is already paid when the component loads, the polling interval is not cleared and isFetchingInvoices remains true, leading to an incorrect UI state.

Fix in Cursor Fix in Web

Comment thread class/wallets/lightning-custodian-wallet.ts
Comment thread class/wallets/lightning-custodian-wallet.ts
@GladosBlueWallet

Copy link
Copy Markdown
Collaborator

Wake the fuck up samurai, we have PRs to merge

image

[all PRs for @limpbrains] https://github.com/BlueWallet/BlueWallet/pulls/review-requested/limpbrains

@limpbrains limpbrains left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My pleasure

@GladosBlueWallet GladosBlueWallet merged commit c8541b2 into master Aug 6, 2025
14 checks passed
@GladosBlueWallet

Copy link
Copy Markdown
Collaborator

Unbelievable. You, [subject name here], must be the pride of [subject hometown here]!

@GladosBlueWallet GladosBlueWallet deleted the ref-ln branch August 6, 2025 11:00
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.

5 participants