Skip to content

Conversation

@Overtorment
Copy link
Member

@Overtorment Overtorment commented Jul 13, 2025

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.

Copy link
Collaborator

@limpbrains limpbrains left a comment

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 ?

@Overtorment Overtorment requested a review from limpbrains August 5, 2025 14:32
@Overtorment
Copy link
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

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

@GladosBlueWallet
Copy link
Collaborator

Copy link
Collaborator

@limpbrains limpbrains left a comment

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

6 participants