Commit Graph

2830 Commits

Author SHA1 Message Date
Keyan 0bff478d39
direct receives and send paid action (#1650)
* direct receives and send paid action

* remove withdrawl->invoiceForward has many relationship

* fix formatMsats implicit type expectations

* ui + dropping direct payment bolt11s

* squash migrations

* fix bolt11 dropping and improve paid action wallet logging

* remove redundant sender id

* fix redirect when funding account over threshold

* better logging
2024-11-27 07:39:05 -06:00
ekzyis 8b5e13236b
Fix inconsistent actionArgs on retry (#1651) 2024-11-26 07:39:05 -06:00
ekzyis b0207a2906
Create useWalletStatus and useWalletSupport (#1646) 2024-11-23 20:19:22 -06:00
ekzyis f5569d7444
Only fetch logs when we need them (#1638)
* Don't fetch logs as anon

* Only fetch logs if we need them on the current page

* Wait for poll to finish with setTimeout

This makes sure that we wait for the pending poll to finish before we poll again. This prevents running multiple polls at the same time on slow connections.

I noticed we don't need to queue a new poll ourselves since a poll updates effect dependencies so we will cleanup and run the effect again anyway.

* Fix polling via useEffect abuse
2024-11-23 18:37:30 -06:00
ekzyis cb9947e4f2
refactor: Check darkmode in useWallets (#1640)
* Check darkmode in useWallets

* Check darkmode in useWalletImage
2024-11-23 17:59:59 -06:00
ekzyis 3023d8a5d3
Remove unused function usePayment (#1641) 2024-11-23 12:21:39 -06:00
Riccardo Balbo a7ea380476
fix LNC attachment and docs (#1639) 2024-11-22 18:03:02 -06:00
Riccardo Balbo 83341d5b7d
add in error message how high are estimated fees when too high (#1634) 2024-11-22 08:26:18 -06:00
ekzyis 923ddb74ca
Use invoice.cancelledAt to determine if invoice expired or was canceled by user (#1631)
* Set and resolve invoice.cancelledAt

* Don't close modal if invoice expired
2024-11-22 08:25:20 -06:00
k00b 96e5c6c51c fix #1628 2024-11-21 08:52:24 -06:00
Riccardo Balbo eb3efbef57
HOTFIX: restore missing link between lnurlp and nip57 (#1630)
* restore missing link between lnurlp and nip57

* pass noteStr as receive action arg

* make sure the desc field is not updated if noteStr is unset
2024-11-21 08:46:28 -06:00
ekzyis 277f8a20fb
Fix lnaddr not returning payment request (#1626) 2024-11-20 19:57:16 -06:00
ekzyis 7448cef932
Fix wallet status ignoring failed requests to create invoices (#1624) 2024-11-20 16:26:50 -06:00
Riccardo Balbo d238eafdde
fix typo signular -> singular (#1623) 2024-11-20 16:26:18 -06:00
k00b 09bacdc016 catch wrap invoice error as noninvoiceable 2024-11-20 14:47:22 -06:00
Keyan 67a0565c04
Update awards.csv 2024-11-20 13:58:55 -06:00
Keyan cfbb274d8f
Update awards.csv 2024-11-20 13:58:25 -06:00
Keyan b012f7670e
Update awards.csv 2024-11-20 13:57:17 -06:00
Riccardo Balbo 21207184dd
refresh cln certs (#1622) 2024-11-20 12:48:03 -06:00
ekzyis f45144cb1c
Always check res.ok and content-type header (#1621)
* Always check res.ok and content-type header

* Fix blink body consumed before we use it

* Always consume response body to avoid memory leaks
2024-11-20 12:46:39 -06:00
Simone Cervino c88afc5aae
fix can't upload mp4 on safari (#1617) 2024-11-20 07:06:05 -06:00
ekzyis 6bae1f1a89
Fix account switching anon login (#1618)
* Always switch to user we just logged in as

If we're logged in and switch to anon and then use login to get into our previous account instead of using 'switch accounts', we only updated the JWT but we didn't switch to the user.

* Fix getToken unaware of multi-auth middleware

If we use login with new credentials while switched to anon (multi_auth.user-id === 'anonymous'), we updated the pubkey because getToken wasn't aware of the switch and thus believed we're logged in as a user.

This is fixed by applying the middleware before calling getToken.
2024-11-20 07:05:42 -06:00
ekzyis 82fead60f1
Fix mentions for pessimistic actions (#1615)
* Fix mentions for pessimistic actions

* (item)mentions should use tx not models

---------

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
Co-authored-by: k00b <k00b@stacker.news>
2024-11-19 19:28:21 -06:00
k00b 5dac2f2ed0 fix #1566 2024-11-19 19:12:18 -06:00
Keyan 9179688abc
Merge pull request #1614 from stackernews/wallet-fixes
Wallet fixes
2024-11-19 15:49:12 -06:00
k00b 66ec5d5da8 dark/light mode images on wallet pages 2024-11-19 15:46:11 -06:00
k00b f3cc0f9e1d make recv optional 2024-11-19 15:38:27 -06:00
k00b aa4c448999 fix account switch disconnect 2024-11-19 14:58:48 -06:00
Keyan 8441e04d3e
Update awards.csv 2024-11-19 12:55:55 -06:00
ekzyis bcd229af93
Fix 'Cannot mix BigInt and other types' on zaps (#1609)
* Fix 'Cannot mix BigInt and other types' on zaps

* Also add sybilFeePercent to context in worker

* add paymentMethod to context

---------

Co-authored-by: k00b <k00b@stacker.news>
2024-11-19 09:31:26 -06:00
ekzyis c2dc0be1c1
Always use custom PTR on Android (#1607) 2024-11-18 19:13:52 -06:00
k00b 5d71e57839 fix ptr interfering with layout container 2024-11-18 17:33:45 -06:00
ekzyis 570c842934
Wallet send+recv status derived from logs (#1559)
* Derive wallet status from logs

* Add send/recv icons

* Set status individually for send and recv

* Move status logic into own function

* Add LNbits, Blink, CLN, LND, phoenixd logo

* Fix wallet.status.any not using Status enum

* Fix WebLN being weird

* Use phoenixd logo with text

* Also use wallet logo on config page

* Also poll logs for wallet status

* Use logger.info for logs not relevant for wallet status

* Remove no longer used wallet badges

* Crop LND logo like other logos

* Fix all wallets show 'configure'

* Fix wallet status not respecting enabled

* Fix wallet.def.requiresConfig undefined

* Fix banner shown for WebLN

* Fix attach shown when configured

* Filter by context.status to determine wallet status

* Fix +- shown without context

* Fix missing theme support for wallet logos
2024-11-18 16:46:24 -06:00
Keyan 62cf5b9c34
Merge pull request #1603 from stackernews/fix-dark-mode-update
Fix missing useDarkMode update
2024-11-18 16:09:16 -06:00
ekzyis 120dd4122f Fix missing useDarkMode update 2024-11-18 23:01:12 +01:00
Keyan c3b7ad3fdd
Merge pull request #1599 from Soxasora/feat_pwa_pull_to_refresh
feat: PWA pull to refresh
2024-11-18 13:11:56 -06:00
k00b d2b5d23af5 add body margin on ptr 2024-11-18 13:05:51 -06:00
Soxasora a992426058 enhance: cleanup, ux/ui changes, safer approach to android's ptr 2024-11-18 15:49:54 +01:00
Keyan cce7195652
Merge pull request #1600 from stackernews/update-pr-template
Also ask if tested on light/dark mode in pull request template
2024-11-17 16:16:10 -06:00
ekzyis deccb0fea9 Also ask if tested on light/dark mode 2024-11-17 22:58:28 +01:00
Soxasora 5a359feeed test: togglable Android's native PTR 2024-11-17 21:58:40 +01:00
Simone Cervino c08088bdbe
fix uploaded videos don't load on safari (#1593)
* fix uploaded videos don't load on safari

* fix safari loading video as image, min-content restored

* refinements for ssr and skip load check for images

---------

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
Co-authored-by: k00b <k00b@stacker.news>
2024-11-17 13:38:11 -06:00
Soxasora eea121e30c feat: pull-to-refresh for PWA without native refresh 2024-11-17 20:23:26 +01:00
Lorenzo 83e72e21cc
fix: reply storage is updated with the new content on file upload (#1585)
* fix: reply storage is updated with the new content on file upload

* Revert "fix: reply storage is updated with the new content on file upload"

This reverts commit 350931fd0c7a47ffe59716722755ab294c481b71.

* chore: reworked image draft save by using events

* chore: helpers.setValue called just after setNativeValue

* chore: updated setNativeValue function to be more use-case specific
2024-11-16 17:23:07 -06:00
Lorenzo 8a2bd84f69
fix: upvote widget not rendered when comment is collapsed (#1583)
* fix: upvote widget not rendered when comment is collapsed

* fix: restored missing conditional on handleShortPress

* chore: icon horizontal space maintained even if the comment is collapsed

* chore: 'rendered' argument renamed to 'visible'

* chore: collapsed condition merged with the 'disabled' variable

* reduce unecessary code

---------

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
Co-authored-by: k00b <k00b@stacker.news>
2024-11-16 17:04:49 -06:00
k00b 73df5e0308 improve newsletter import 2024-11-16 16:52:08 -06:00
ekzyis 5631d6acf6
Fix #undefined in downzap invoice description (#1597) 2024-11-16 14:58:33 -06:00
ekzyis 79ada2ab58
Fix unpaid items are counted (#1595)
* Fix unpaid items are counted

* Also fix for ncomments

* Never count unpaid items
2024-11-15 20:02:15 -06:00
Riccardo Balbo 9c55f1ebe2
Implement deposit as receive paidAction (#1570)
* lnurlp paid action

* lnurlp has 10% sybil fee

* fix merge issue

* Update pages/settings/index.js

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>

* fix notifications

* fix destructure

* pass lud18Data to lnurlp action

* minor cleanup

* truncate invoice description to permitted length

* remove redundant targetUserId

* lnurlp paidAction -> receive paidAction

* remove redundant user query

* improve determining if peer is invoiceable

* fix inconsistent relative imports

* prevent paying self-proxied invoices and better held invoice cancellation

* make gun/horse streak zap specific

* unique withdrawal hash should apply to confirmed payments too

* prevent receive from exceeding wallet limits

* notifications

* fix notifications & enhance invoice/withdrawl page

* notification indicator, proxy receive based on threshold, refinements

---------

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
Co-authored-by: k00b <k00b@stacker.news>
2024-11-15 18:38:14 -06:00
ekzyis 8c43caed80
Fix TypeError if local storage is cleared (#1594) 2024-11-15 12:02:02 -06:00