stacker.news/fragments
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
..
comments.js Allow zapping, posting and commenting without funds or an account (#336) 2023-08-11 18:50:57 -05:00
invites.js hide cowboy hat setting 2023-05-01 16:52:02 -05:00
items.js hide zap bolt for forward users (#445) 2023-08-28 09:40:29 -05:00
notifications.js allow viewing reward ranges 2023-08-29 19:13:21 -05:00
price.js Add proxy with cache for coinbase API requests (#226) 2023-01-27 17:20:33 -06:00
rewards.js allow viewing reward ranges 2023-08-29 19:13:21 -05:00
subs.js Revert "Revert "shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades"" 2023-07-23 10:08:43 -05:00
users.js fix closure stacker bug 2023-08-30 19:03:05 -05:00
wallet.js Use HODL invoices (#432) 2023-08-30 21:48:49 -05:00