stacker.news/components
Keyan ca11ac9fb8
backend payment optimism (#1195)
* wip backend optimism

* another inch

* make action state transitions only happen once

* another inch

* almost ready for testing

* use interactive txs

* another inch

* ready for basic testing

* lint fix

* inches

* wip item update

* get item update to work

* donate and downzap

* inchy inch

* fix territory paid actions

* wip usePaidMutation

* usePaidMutation error handling

* PENDING_HELD and HELD transitions, gql paidAction return types

* mostly working pessimism

* make sure invoice field is present in optimisticResponse

* inches

* show optimistic values to current me

* first pass at notifications and payment status reporting

* fix migration to have withdrawal hash

* reverse optimism on payment failure

* Revert "Optimistic updates via pending sats in item context (#1229)"

This reverts commit 93713b33df.

* add onCompleted to usePaidMutation

* onPaid and onPayError for new comments

* use 'IS DISTINCT FROM' for NULL invoiceActionState columns

* make usePaidMutation easier to read

* enhance invoice qr

* prevent actions on unpaid items

* allow navigation to action's invoice

* retry create item

* start edit window after item is paid for

* fix ux of retries from notifications

* refine retries

* fix optimistic downzaps

* remember item updates can't be retried

* store reference to action item in invoice

* remove invoice modal layout shift

* fix destructuring

* fix zap undos

* make sure ItemAct is paid in aggregate queries

* dont toast on long press zap undo

* fix delete and remindme bots

* optimistic poll votes with retries

* fix retry notifications and invoice item context

* fix pessimisitic typo

* item mentions and mention notifications

* dont show payment retry on item popover

* make bios work

* refactor paidAction transitions

* remove stray console.log

* restore docker compose nwc settings

* add new todos

* persist qr modal on post submission + unify item form submission

* fix post edit threshold

* make bounty payments work

* make job posting work

* remove more store procedure usage ... document serialization concerns

* dont use dynamic imports for paid action modules

* inline comment denormalization

* create item starts with median votes

* fix potential of serialization anomalies in zaps

* dont trigger notification indicator on successful paid action invoices

* ignore invoiceId on territory actions and add optimistic concurrency control

* begin docs for paid actions

* better error toasts and fix apollo cache warnings

* small documentation enhancements

* improve paid action docs

* optimistic concurrency control for territory updates

* use satsToMsats and msatsToSats helpers

* explictly type raw query template parameters

* improve consistency of nested relation names

* complete paid action docs

* useEffect for canEdit on payment

* make sure invoiceId is provided when required

* don't return null when expecting array

* remove buy credits

* move verifyPayment to paidAction

* fix comments invoicePaidAt time zone

* close nwc connections once

* grouped logs for paid actions

* stop invoiceWaitUntilPaid if not attempting to pay

* allow actionState to transition directly from HELD to PAID

* make paid mutation wait until pessimistic are fully paid

* change button text when form submits/pays

* pulsing form submit button

* ignore me in notification indicator for territory subscription

* filter unpaid items from more queries

* fix donation stike timing

* fix pending poll vote

* fix recent item notifcation padding

* no default form submitting button text

* don't show paying on submit button on free edits

* fix territory autorenew with fee credits

* reorg readme

* allow jobs to be editted forever

* fix image uploads

* more filter fixes for aggregate views

* finalize paid action invoice expirations

* remove unnecessary async

* keep clientside cache normal/consistent

* add more detail to paid action doc

* improve paid action table

* remove actionType guard

* fix top territories

* typo api/paidAction/README.md

Co-authored-by: ekzyis <ek@stacker.news>

* typo components/use-paid-mutation.js

Co-authored-by: ekzyis <ek@stacker.news>

* Apply suggestions from code review

Co-authored-by: ekzyis <ek@stacker.news>

* encorporate ek feeback

* more ek suggestions

* fix 'cost to post' hover on items

* Apply suggestions from code review

Co-authored-by: ekzyis <ek@stacker.news>

---------

Co-authored-by: ekzyis <ek@stacker.news>
2024-07-01 12:02:29 -05:00
..
nav Allow SN users to edit special items forever (#1204) 2024-06-03 11:26:19 -05:00
webln backend payment optimism (#1195) 2024-07-01 12:02:29 -05:00
accordian-item.js Close related section (#1207) 2024-05-31 10:20:52 -05:00
action-dropdown.js Use module path aliases (#938) 2024-03-19 19:37:31 -05:00
action-tooltip.js give 1 sat fee button overlay but not button text 2024-04-17 14:22:31 -05:00
adv-post-form.js more accordian show states 2024-05-13 10:14:35 -05:00
adv-post-form.module.css fix height of foward percent on validation err 2023-09-12 17:04:49 -05:00
autowithdraw-shared.js less confusing expression for the hint of when the autowithdraw will be initiated (#1015) 2024-04-04 09:18:41 -05:00
avatar.js Use module path aliases (#938) 2024-03-19 19:37:31 -05:00
banners.js Use <Alert> for auth banner in /settings (#1238) 2024-06-12 18:16:54 -05:00
banners.module.css Add new visitor welcome banner (#418) 2023-09-11 16:29:45 -05:00
block-height.js add halving to price carousel 2024-04-16 17:58:26 -05:00
bolt11-info.js add lnc attached wallet (#1104) 2024-04-26 21:22:30 -05:00
bookmark.js Toast (#431) 2023-08-25 18:21:51 -05:00
bounty-form.js backend payment optimism (#1195) 2024-07-01 12:02:29 -05:00
cancel-button.js make fee button less of a hack 2023-11-10 18:18:10 -06:00
chain-fee.js env vars for polling intervals (#1038) 2024-04-08 09:13:12 -05:00
charts-skeletons.js remove duplicative styles 2024-03-25 15:35:32 -04:00
charts.js Use module path aliases (#938) 2024-03-19 19:37:31 -05:00
comment-edit.js backend payment optimism (#1195) 2024-07-01 12:02:29 -05:00
comment.js backend payment optimism (#1195) 2024-07-01 12:02:29 -05:00
comment.module.css refine bounty icon margin for wrapping in comments 2024-03-06 14:20:03 -06:00
comments.js backend payment optimism (#1195) 2024-07-01 12:02:29 -05:00
countdown.js backend payment optimism (#1195) 2024-07-01 12:02:29 -05:00
dark-mode.js dark-mode needs to block block 2023-08-04 20:45:12 -05:00
delete.js backend payment optimism (#1195) 2024-07-01 12:02:29 -05:00
discussion-form.js backend payment optimism (#1195) 2024-07-01 12:02:29 -05:00
dont-link-this.js backend payment optimism (#1195) 2024-07-01 12:02:29 -05:00
error-boundary.js Use module path aliases (#938) 2024-03-19 19:37:31 -05:00
fee-button.js backend payment optimism (#1195) 2024-07-01 12:02:29 -05:00
fee-button.module.css small receipt styling 2023-11-10 09:22:14 -06:00
footer-rewards.js env vars for polling intervals (#1038) 2024-04-08 09:13:12 -05:00
footer.js Use njump.me for nostr links (#1120) 2024-04-28 17:25:25 -05:00
footer.module.css Bottom nav uses fixed position to fix firefox bug (#1011) 2024-04-04 18:50:52 -05:00
form.js backend payment optimism (#1195) 2024-07-01 12:02:29 -05:00
form.module.css backend payment optimism (#1195) 2024-07-01 12:02:29 -05:00
hat.js Allow SN users to edit special items forever (#1204) 2024-06-03 11:26:19 -05:00
header.module.css refine hiding bottom navbar when virtual keyboard opens 2024-03-28 18:18:44 -05:00
hidden-wallet-summary.js fix hidden wallet balance layout shift 2024-04-17 17:22:17 -05:00
hoverable-popover.js Item popover (#1162) 2024-05-15 12:05:50 -05:00
hoverable-popover.module.css Item popover (#1162) 2024-05-15 12:05:50 -05:00
image.js Fix images from media domain not loaded if imgproxyOnly enabled (#1153) 2024-05-06 16:39:20 -05:00
info.js Use module path aliases (#938) 2024-03-19 19:37:31 -05:00
invite.js add NEXT_PUBLIC_URL 2024-04-08 17:54:39 -05:00
invoice-status.js backend payment optimism (#1195) 2024-07-01 12:02:29 -05:00
invoice.js backend payment optimism (#1195) 2024-07-01 12:02:29 -05:00
invoice.module.css ready for invoices 2021-05-06 16:15:22 -05:00
item-act.js backend payment optimism (#1195) 2024-07-01 12:02:29 -05:00
item-full.js Handle Peertube Embeds (#1223) 2024-06-20 11:28:25 -05:00
item-info.js backend payment optimism (#1195) 2024-07-01 12:02:29 -05:00
item-job.js Use module path aliases (#938) 2024-03-19 19:37:31 -05:00
item-popover.js Item popover (#1162) 2024-05-15 12:05:50 -05:00
item.js backend payment optimism (#1195) 2024-07-01 12:02:29 -05:00
item.module.css fix item skeleton 2024-05-23 10:07:33 -05:00
items.js turn #1063 logic into a component for use in all comment lists 2024-04-15 16:23:26 -05:00
items.module.css working search 2022-01-27 13:18:48 -06:00
job-form.js backend payment optimism (#1195) 2024-07-01 12:02:29 -05:00
layout.js navigation -> nav 2024-03-26 19:49:10 -05:00
layout.module.css more spacing consistency 2024-03-27 14:04:04 -05:00
lightning-auth.js env vars for polling intervals (#1038) 2024-04-08 09:13:12 -05:00
lightning-auth.module.css Notifications with nostr info (#368) 2023-08-08 13:19:31 -05:00
lightning.js Use module path aliases (#938) 2024-03-19 19:37:31 -05:00
link-form.js backend payment optimism (#1195) 2024-07-01 12:02:29 -05:00
link-to-context.js turn #1063 logic into a component for use in all comment lists 2024-04-15 16:23:26 -05:00
link-to-context.module.css turn #1063 logic into a component for use in all comment lists 2024-04-15 16:23:26 -05:00
log-message.js CLN autowithdrawal (#1042) 2024-04-14 17:34:21 -05:00
log-message.module.css Wallet Logs (#994) 2024-04-03 17:27:21 -05:00
logger.js Fix unintended sharing of wallets and logs (#1127) 2024-05-03 16:42:00 -05:00
login-button.js Use module path aliases (#938) 2024-03-19 19:37:31 -05:00
login.js Use module path aliases (#938) 2024-03-19 19:37:31 -05:00
login.module.css more invite work 2021-10-15 13:05:34 -05:00
long-pressable.js Fix first zap when modal closed (#771) (#1055) 2024-04-12 18:37:04 -05:00
me.js env vars for polling intervals (#1038) 2024-04-08 09:13:12 -05:00
modal.js backend payment optimism (#1195) 2024-07-01 12:02:29 -05:00
more-footer.js search/related posts refinements 2024-01-17 17:39:48 -06:00
mute.js honor mutes when sending push notifications (#1145) 2024-05-12 13:55:56 -05:00
nostr-auth.js Use module path aliases (#938) 2024-03-19 19:37:31 -05:00
notifications.js backend payment optimism (#1195) 2024-07-01 12:02:29 -05:00
notifications.module.css Add autowithdrawal badge in notifications (#1078) 2024-04-16 10:53:05 -05:00
page-loading.js Use module path aliases (#938) 2024-03-19 19:37:31 -05:00
past-bounties.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
pay-bounty.js backend payment optimism (#1195) 2024-07-01 12:02:29 -05:00
pay-bounty.module.css upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
payer-data.js LUD-18 Service Support (#518) 2023-10-03 14:35:53 -05:00
payment.js backend payment optimism (#1195) 2024-07-01 12:02:29 -05:00
poll-form.js backend payment optimism (#1195) 2024-07-01 12:02:29 -05:00
poll.js backend payment optimism (#1195) 2024-07-01 12:02:29 -05:00
poll.module.css increase poll choice length to 40 chars 2023-09-28 16:52:11 -05:00
post.js enhance navigation 2024-03-26 18:36:31 -05:00
price.js [1124] - Use Mempool For Fee Rate (#1171) 2024-05-15 10:26:49 -05:00
qr.js backend payment optimism (#1195) 2024-07-01 12:02:29 -05:00
recent-header.js more spacing consistency 2024-03-27 14:04:04 -05:00
related.js Use module path aliases (#938) 2024-03-19 19:37:31 -05:00
reply.js backend payment optimism (#1195) 2024-07-01 12:02:29 -05:00
reply.module.css add spacing to comment reply button 2023-10-26 12:17:43 -05:00
root.js improve comment performance 2023-05-06 16:51:17 -05:00
search.js fix: custom calendar dark theme (#1123) 2024-05-11 20:32:44 -05:00
search.module.css search all territories by default + more intuitive search filters 2024-03-26 18:37:40 -05:00
seo.js Use module path aliases (#938) 2024-03-19 19:37:31 -05:00
serviceworker.js Wallet Logs (#994) 2024-04-03 17:27:21 -05:00
share.js dont use broken navigator.share on desktop safari 2024-06-14 13:44:36 -05:00
snl.js Use module path aliases (#938) 2024-03-19 19:37:31 -05:00
snow.js Use module path aliases (#938) 2024-03-19 19:37:31 -05:00
sub-select.js env vars for polling intervals (#1038) 2024-04-08 09:13:12 -05:00
sub-select.module.css enhance navigation 2024-03-26 18:36:31 -05:00
subscribe.js Toast (#431) 2023-08-25 18:21:51 -05:00
subscribeUser.js honor mutes when sending push notifications (#1145) 2024-05-12 13:55:56 -05:00
table-of-contents.js Use module path aliases (#938) 2024-03-19 19:37:31 -05:00
territory-form.js backend payment optimism (#1195) 2024-07-01 12:02:29 -05:00
territory-header.js Add missing space in front of founding date (#1027) 2024-04-05 11:52:11 -05:00
territory-list.js Use module path aliases (#938) 2024-03-19 19:37:31 -05:00
territory-payment-due.js backend payment optimism (#1195) 2024-07-01 12:02:29 -05:00
territory-transfer.js Use module path aliases (#938) 2024-03-19 19:37:31 -05:00
text.js don't import css into /lib 2024-06-25 17:18:21 -05:00
text.module.css Added support for <sub> <sup> in markdown (#1215) 2024-06-25 14:23:18 -05:00
toast.js Frontend payment UX cleanup (#1194) 2024-05-28 12:18:54 -05:00
toast.module.css backend payment optimism (#1195) 2024-07-01 12:02:29 -05:00
top-header.js fix: custom calendar dark theme (#1123) 2024-05-11 20:32:44 -05:00
upvote.js backend payment optimism (#1195) 2024-07-01 12:02:29 -05:00
upvote.module.css Frontend payment UX cleanup (#1194) 2024-05-28 12:18:54 -05:00
usage-header.js fix: custom calendar dark theme (#1123) 2024-05-11 20:32:44 -05:00
use-crossposter.js Add context field to crossposted link if present 2024-03-25 17:16:45 -05:00
use-data.js remove list jitter by initially preferring ssr 2023-08-06 13:04:25 -05:00
use-debounce-callback.js remove unused debounce callback deps 2023-10-06 16:34:16 -05:00
use-has-new-notes.js env vars for polling intervals (#1038) 2024-04-08 09:13:12 -05:00
use-item-submit.js backend payment optimism (#1195) 2024-07-01 12:02:29 -05:00
use-no-initial-effect.js reuse debounce hook more places 2023-10-06 15:01:51 -05:00
use-paid-mutation.js backend payment optimism (#1195) 2024-07-01 12:02:29 -05:00
use-quote-reply.js Use module path aliases (#938) 2024-03-19 19:37:31 -05:00
user-header.js backend payment optimism (#1195) 2024-07-01 12:02:29 -05:00
user-header.module.css Don't hide self in top even if hidden (#905) 2024-03-13 19:26:59 -05:00
user-list.js fix missing embellishment in rewards leaderboard 2024-05-06 11:41:02 -05:00
user-popover.js Item popover (#1162) 2024-05-15 12:05:50 -05:00
wallet-card.js unattach -> detach 2024-04-27 18:37:57 -05:00
wallet-logs.js Allow deletion of wallet logs (#1101) 2024-05-03 14:14:33 -05:00