Commit Graph

2801 Commits

Author SHA1 Message Date
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
ekzyis b7fc0e0e74
Fix fee added to received amount (#1582) 2024-11-12 19:50:15 -06:00
ekzyis 08c29b9f10
Fix missing sorting of wallet logs (#1581) 2024-11-12 19:48:21 -06:00
ekzyis 3044c2e98f
Fix outlawed can show up on front page (#1565)
If an item has a lot of comments, it gets ranked higher.

When an item is now downzapped, it can become outlawed but still show up on the front page because of the comments.

This fixes it by filtering outlawed items out instead of relying on the ranking to make them not show up.
2024-11-12 19:47:14 -06:00
Keyan a44d0daf09
paid action payment methods as an array (#1584)
* introduce fee credits & allow paid actions to specify payment method priority

* fix merge issue

* express supported paid action payment methods as an array

* log force payment method skipping methods

* fix stuff

* immutable context

* immutable paidAction context and other fixes

---------

Co-authored-by: Riccardo Balbo <riccardo0blb@gmail.com>
2024-11-12 19:00:51 -06:00
k00b d1c770dbbc noop walletLogger if wallet isn't provided 2024-11-12 09:22:51 -06:00
k00b cb8cce77f0 don't let args overwrite withdrawal/deposit checking params 2024-11-12 08:50:54 -06:00
Riccardo Balbo 7e5a8310df
fix lnd hostname (#1580) 2024-11-11 17:52:15 -06:00
Riccardo Balbo 18700b4201
configurable sybil fee (#1577)
* configurable sybil fee

* document getSybilFeePercent

* fixes

* remove null check

* refine at the margins

---------

Co-authored-by: k00b <k00b@stacker.news>
2024-11-11 16:59:52 -06:00
ekzyis fdd34b2eb3
Fix edit countdown on deleted items (#1571)
* Clarify conditions to show edit countdown

* Fix edit countdown shown for deleted items

* refactor: Minimize canEdit state

I noticed that only anonEdit requires state because it needs to use useEffect to fetch from local storage.

The other conditions can simply be checked during render.

* refactor: Use datePivot for edit countdown
2024-11-11 09:23:08 -06:00
ekzyis 406ae81693
Fixes around account switching / authentication (#1575)
* Fix missing page reload after account switch on logout

* Fix missing key

* Explain why we set multi_auth cookies on login/signup

* Fix 500 if multi_auth cookie missing
2024-11-11 09:16:32 -06:00
Keyan 4675a2c29d
sndev cleanup (#1563)
* begin sndev cleanup

* cleanup sndev

* fix posix shell compliance

* add tests to sndev
2024-11-09 15:52:04 -06:00
Keyan c31cf97288
fix precedence of op for not full hot sort (#1564) 2024-11-09 14:25:52 -06:00
ekzyis d06f4ae70d
Fix offcanvas not closed before showing logout prompt (#1561) 2024-11-09 14:00:36 -06:00
ekzyis afb71012af
Only send push notification if referrer was updated (#1562) 2024-11-09 14:00:07 -06:00
ekzyis 72e2d19433
supercharged wallet logs (#1516)
* Inject wallet logger interface

* Include method in NWC logs

* Fix wrong page total

* Poll for new logs every second

* Fix overlapping pagination

* Remove unused total

* Better logs for incoming payments

* Use _setLogs instead of wrapper

* Remove inconsistent receive log

* Remove console.log from wallet logger on server

* Fix missing 'wallet detached' log

* Fix confirm_withdrawl code

* Remove duplicate autowithdrawal log

* Add context to log

* Add more context

* Better table styling

* Move CSS for wallet logs into one file

* remove unused logNav class
* rename classes

* Align key with second column

* Fix TypeError if context empty

* Check content-type header before calling res.json()

* Fix duplicate 'failed to create invoice'

* Parse details from LND error

* Fix invalid DOM property 'colspan'

* P2P zap logs with context

* Remove unnecessary withdrawal error log

* the code assignment was broken anyway
* we already log withdrawal errors using .catch on payViaPaymentRequest

* Don't show outgoing fee to receiver to avoid confusion

* Fix typo in comment

* Log if invoice was canceled by payer

* Automatically populate context from bolt11

* Fix missing context

* Fix wrap errors not logged

* Only log cancel if client canceled

* Remove unused imports

* Log withdrawal/forward success/error in payment flow

* Fix boss not passed to checkInvoice

* Fix TypeError

* Fix database timeouts caused by logger

The logger shares the same connection pool with any currently running transaction.

This means that we enter a classic deadlock when we await logger calls: the logger call is waiting for a connection but the currently running transaction is waiting for the logger call to finish before it can release a connection.

* Fix cache returning undefined

* Fix typo in comment

* Add padding-right to key in log context

* Always use 'incoming payment failed:'

---------

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
2024-11-08 13:26:40 -06:00
k00b f1b2197d31 find lightning module relative to project directory 2024-11-08 09:37:45 -06:00
ekzyis d6916fa3f4
Merge pull request #1557 from stackernews/fix-invoice-waiting
fix invoice waiting
2024-11-08 05:25:05 +01:00
k00b dcab8e1365 fix invoice waiting 2024-11-07 19:55:34 -06:00
Keyan e9a5925c50
Merge pull request #1556 from stackernews/fix-1544
fix invoice status display
2024-11-07 19:25:06 -06:00
k00b 544a54399c fix invoice status display 2024-11-07 19:17:50 -06:00
Keyan 0891e51c9e
fix passphrase scanning (#1553) 2024-11-07 16:24:41 -06:00
Keyan a67ef43f6e
listen for local storage wallet changes (#1552) 2024-11-07 13:15:39 -06:00
Keyan d117549348
fix lightning module resolution (#1551)
* fix tsx usage

* Revert "Revert "Merge pull request #1521 from riccardobl/tordev""

This reverts commit 4cc3780eca.

* lightning module resolution

* fix our one test
2024-11-07 09:03:54 -06:00
k00b 4cc3780eca Revert "Merge pull request #1521 from riccardobl/tordev"
This reverts commit 3112fc30d8, reversing
changes made to 803daed2df.
2024-11-05 20:08:33 -06:00
Keyan 4ad93cd4ab
Merge pull request #1546 from stackernews/fix-1543
fix vault key changes not seen by all instances of useVault
2024-11-05 19:45:16 -06:00
k00b f0a5bc4f27 fix vault key changes not seen by all instances of useVault 2024-11-05 17:25:18 -06:00
Keyan 281757dd81
Merge pull request #1545 from riccardobl/passhide
Use -webkit-text-security to hide passphrase
2024-11-05 12:59:11 -06:00
Riccardo Balbo 49caec5b63 do not override passed style 2024-11-05 18:06:45 +01:00
Riccardo Balbo 4d8f85508a Use -webkit-text-security to hide passphrase 2024-11-05 17:16:27 +01:00