stacker.news/lib
ekzyis 93713b33df
Optimistic updates via pending sats in item context (#1229)
* Use context for pending sats

* Fix sats going negative on zap undo

We already handle undoing pending sats by wrapping the payment+mutation with try/finally.

* Remove unnecessary ItemContextProvider

* Rename to parentCtx

* Fix hierarchy of ItemContextProvider

If a comment was root and it was zapped, the pending sats contributed to the sats shown in <CommentsHeader>.

This was caused by <CommentsHeader> accessing the root item context for all comments, even for the root comment.

So even if the root comment was zapped, the pending sats contributed to the sats for the comment section.

This wasn't the case for posts since their item context was above the context used by <CommentsHeader>.

This was fixed by moving <ItemProviderContext> down into <Comments> and <Item> instead of declaring it at <ItemFull> which wraps the root item and all comments.

* Optimistic update for poll votes

* prevent twice optimistic zap

* enhance client notifications with skeleton and no redudant queries

* enlarge nwc amount limits

* Disable max amount and daily limit in NWC container

---------

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
2024-06-12 08:34:24 -05:00
..
apollo.js Optimistic updates via pending sats in item context (#1229) 2024-06-12 08:34:24 -05:00
badge.js check both `navigator.permissions.query` and `Notification.permission` for permissions (#655) 2023-11-25 11:32:41 -06:00
bip39-words.js add lnc attached wallet (#1104) 2024-04-26 21:22:30 -05:00
bolt11.js add lnc attached wallet (#1104) 2024-04-26 21:22:30 -05:00
clicks.js Revert "Revert "shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades"" 2023-07-23 10:08:43 -05:00
cln.js Allow HTTP and HTTPS over Tor for LNbits (#1176) 2024-05-16 08:41:49 -05:00
constants.js Allow SN users to edit special items forever (#1204) 2024-06-03 11:26:19 -05:00
crypto.js Store hashed and salted email addresses (#1111) 2024-05-04 18:06:15 -05:00
currency.js reuse validation on server 2023-02-08 13:39:53 -06:00
cursor.js use keyset pagination for notifications (#899) 2024-03-06 13:53:13 -06:00
fancy-names.json Add setting to send diagnostics back to SN (#463) 2023-09-18 18:00:16 -05:00
form.js @remindme bot support (#1159) 2024-05-19 15:52:02 -05:00
format.js handle other possible base64-like string encodings 2024-02-18 15:08:55 -06:00
item.js @remindme bot support (#1159) 2024-05-19 15:52:02 -05:00
lnurl.js add NEXT_PUBLIC_URL 2024-04-08 17:54:39 -05:00
macaroon-id.js LND autowithdraw (#806) 2024-02-13 13:17:56 -06:00
macaroon-id.proto LND autowithdraw (#806) 2024-02-13 13:17:56 -06:00
macaroon.js handle other possible base64-like string encodings 2024-02-18 15:08:55 -06:00
madness.js reintroduce daily rewards (#1134) 2024-05-01 09:30:36 -05:00
md.js remove debug loggin for rehype plugin 2023-10-23 18:16:06 -05:00
new-comments.js subtle highlight of new comments 2023-08-06 14:18:40 -05:00
nostr.js Nostr crossposting all item types (#779) 2024-02-21 19:18:36 -06:00
package.json Convert worker to ESM (#500) 2023-09-23 20:19:35 -05:00
proxy.js Use proxy agents for CLNRest over Tor (#1136) 2024-05-03 17:00:28 -05:00
rainbow.js undo zap/downzap and improve downzap ux 2023-12-19 19:55:19 -06:00
rand.js use rand lightning animation when not logged in 2021-07-16 11:47:18 -05:00
remark-mention.js fix mdast find and replace imports 2023-07-24 20:03:56 -05:00
remark-sub.js fix markdown inline code and headings 2023-10-23 17:14:37 -05:00
rss.js Use module path aliases (#938) 2024-03-19 19:37:31 -05:00
territory.js fix #951 also retroactively 2024-03-20 20:56:40 -05:00
time.js Monthly rewards (#890) 2024-03-01 10:28:55 -06:00
timedate-scraper.js Attempt to get publication year when auto-titling links (#520) 2023-10-20 19:23:50 -05:00
url.js Embed youtube shorts (#1225) 2024-06-05 09:08:27 -05:00
url.spec.js Fix missing commentId parsing for item mentions (#1219) 2024-06-03 21:54:42 -05:00
user.js honor mutes when sending push notifications (#1145) 2024-05-12 13:55:56 -05:00
validate.js Fix inverted lnbitsSchema env check (#1185) 2024-05-18 10:14:12 -05:00
webPush.js Item mention notifications (#1208) 2024-06-03 12:12:42 -05:00