-
Notifications
You must be signed in to change notification settings - Fork 138
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
chore: prevent WalletInvoice deletion #3557
Conversation
4c1e047
to
455dec5
Compare
f21ea22
to
416b895
Compare
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.
looks good, just few comments
@@ -302,6 +316,7 @@ const updatePendingInvoiceBeforeFinally = async ({ | |||
"invoices.finalRecipient": JSON.stringify(recipientWalletDescriptor), | |||
}) | |||
|
|||
// Is this crossing the lock boundary? |
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.
please remove, also not sure... what you mean? this can be done outside the lock but need to be done previous to ledger record (that must be inside lock)
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 will remove it, but lnInvoiceLookup
is populated before the lock, so its state could change by the time the lock is acquired.
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.
ahh I thought you referred to settle... you are right, feel free to move it
@@ -69,6 +69,7 @@ interface WalletInvoiceRecord { | |||
currency: string | |||
timestamp: Date | |||
selfGenerated: boolean | |||
processingCompleted?: boolean |
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.
why do we need to add it as optional? isnt default value working?
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.
Isn't default value only used on write? I have a database migration that will go back and populate this field and then i will make it non optional.
416b895
to
6a13d19
Compare
processingCompleted
field to replace deleting canceled invoicesTo Do:
processingCompleted
fields totrue
processingCompleted
field to be non-optional