stacker.news/pages
ekzyis ac45fdc234
Use HODL invoices (#432)
* Use HODL invoices

* Fix expiry check comparing string with Date

* Fix unconfirmed user balance for HODL invoices

This is done by syncing the data from LND to the Invoice table.

If the columns is_held and msatsReceived are set, the frontend is told that we're ready to execute the action.

We then update the user balance in the same tx as the action.

We need to still keep checking the invoice for expiration though.

* Fix worker acting upon deleted invoices

* Prevent usage of invoice after expiration

* Use onComplete from <Countdown> to show expired status

* Remove unused lnd argument

* Fix item destructuring from query

* Fix balance added to every stacker

* Fix hmac required

* Fix invoices not used when logged in

* refactor: move invoiceable code into form

* renamed invoiceHash, invoiceHmac to hash, hmac since it's less verbose all over the place
* form now supports `invoiceable` in its props
* form then wraps `onSubmit` with `useInvoiceable` and passes optional invoice options

* Show expired if expired and canceled

* Also use useCallback for zapping

* Always expire modal invoices after 3m

* little styling thing

---------

Co-authored-by: ekzyis <ek@stacker.news>
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
2023-08-30 21:48:49 -05:00
..
[name] fix closure stacker bug 2023-08-30 19:03:05 -05:00
api Fix negative maxWithdrawable (#438) 2023-08-23 15:32:42 -05:00
auth upgrade to next-auth 4 (bonus: improve error pages) 2023-07-29 14:38:20 -05:00
invites fix conditional nextFetchPolicy overriding cache-only on SSR and suppress time hydration warnings 2023-07-31 14:54:30 -05:00
invoices Allow zapping, posting and commenting without funds or an account (#336) 2023-08-11 18:50:57 -05:00
items/[id] redirect to login on pages that require auth (#269) 2023-08-28 12:52:15 -05:00
referrals redirect to login on pages that require auth (#269) 2023-08-28 12:52:15 -05:00
rewards allow viewing reward ranges 2023-08-29 19:13:21 -05:00
stackers redirect to login on pages that require auth (#269) 2023-08-28 12:52:15 -05:00
withdrawals Singular/Plural "Sats" labels (#380) 2023-08-08 16:04:06 -05:00
~ redirect to login on pages that require auth (#269) 2023-08-28 12:52:15 -05:00
404.js upgrade to next-auth 4 (bonus: improve error pages) 2023-07-29 14:38:20 -05:00
500.js upgrade to next-auth 4 (bonus: improve error pages) 2023-07-29 14:38:20 -05:00
_app.js Use HODL invoices (#432) 2023-08-30 21:48:49 -05:00
_document.js Make the web manifest dynamic to incorporate preferred color scheme (#398) 2023-08-15 12:58:27 -05:00
_error.js upgrade to next-auth 4 (bonus: improve error pages) 2023-07-29 14:38:20 -05:00
email.js upgrade to next-auth 4 (bonus: improve error pages) 2023-07-29 14:38:20 -05:00
live.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
login.js show errors on settings during auth linking 2023-07-30 15:39:18 -05:00
notifications.js remove stray log statement 2023-08-30 20:08:38 -05:00
offline.js improve service worker asset precaching and offline page 2023-07-28 10:57:12 -05:00
satistics.js redirect to login on pages that require auth (#269) 2023-08-28 12:52:15 -05:00
settings.js redirect to login on pages that require auth (#269) 2023-08-28 12:52:15 -05:00
share.js Service worker rework, Web Target Share API & Web Push API (#324) 2023-07-04 14:36:07 -05:00
signup.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
wallet.js redirect to login on pages that require auth (#269) 2023-08-28 12:52:15 -05:00