Commit Graph

810 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 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
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 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
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
Keyan c31cf97288
fix precedence of op for not full hot sort (#1564) 2024-11-09 14:25:52 -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
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 08b160d663
Merge branch 'master' into tordev 2024-11-03 14:52:21 -06:00
k00b fb65ea3ace fix removing server config on unsynced client vault 2024-11-03 01:09:45 -05:00
k00b 25facad5d9 merge master 2024-11-02 19:15:44 -05:00
Riccardo Balbo 5924de6172
Merge branch 'master' into tordev 2024-11-02 11:43:59 +01:00
k00b 7b4a33b354 fix wallet creation without vaultEntries 2024-10-31 17:54:47 -05:00
k00b 3cfbaf4638 validate generated fields 2024-10-30 22:26:45 -05:00
k00b b1fc341017 sync/desync from localstorage on vault connect/disconnect 2024-10-30 18:37:45 -05:00
k00b dce5762f63 get vault working 2024-10-30 13:49:57 -05:00
k00b e96982c353 refactor wallet validation 2024-10-30 13:49:57 -05:00
k00b 57603a936f reorder priority 2024-10-30 13:49:57 -05:00
k00b ccdf346954 server side config saves 2024-10-30 13:49:47 -05:00
k00b 4826ae5a7b wip upsertWallet 2024-10-30 13:45:09 -05:00
k00b 48640cbed6 pages load *kazoo* 2024-10-30 13:45:05 -05:00
k00b da020cf899 complete fantasy scaffolding 2024-10-30 13:44:18 -05:00
Riccardo Balbo 6a23aac6f9 Update api/resolvers/vault.js 2024-10-30 13:42:55 -05:00
Riccardo Balbo de0eb8a52c ensure that wallets are configured to send and/or receive 2024-10-30 13:42:55 -05:00
Riccardo Balbo 0263aa8372 do not test invoice when disabling wallets 2024-10-30 13:42:50 -05:00
Riccardo Balbo bb91b629f7 make sorting optional 2024-10-30 13:41:41 -05:00
Riccardo Balbo 2ef7651421 optimize api calls, remove useless effects 2024-10-30 13:41:41 -05:00
Riccardo Balbo f438b278bc fix priority sorting 2024-10-30 13:41:41 -05:00
Riccardo Balbo d30502a011 fix wallet filtering 2024-10-30 13:41:41 -05:00
Riccardo Balbo 6f1113636f fix: await in transaction 2024-10-30 13:41:41 -05:00
Riccardo Balbo b70dbeb6d6 user vault and server side client wallets 2024-10-30 13:41:09 -05:00
Riccardo Balbo 96e1f86bca use patched authenticatedLndGrpc instead of privoxy to handle non onion grpc traffic 2024-10-26 20:06:22 +02:00
ekzyis 383272f1c2 Fix description of wrapped invoices don't respect privacy setting 2024-10-24 21:48:44 +02:00
ekzyis c97ce2627b Rename to autoWithdrawMaxFeeTotal 2024-10-20 15:14:31 +02:00
ekzyis 596d67fc68 Add max base fee setting 2024-10-20 15:14:31 +02:00
ekzyis 50e153df7c Fix territory unarchive schema validation 2024-10-20 01:25:25 +02:00
k00b 01580d9ee8 delete primage when invoice is deleted 2024-10-19 09:51:24 -05:00
k00b bcd8adae45 fix interval in sql template 2024-10-18 20:20:45 -05:00
ekzyis ab1104e115 Fix lnaddr withdrawals 2024-10-18 14:19:40 +02:00
k00b 6aac9eeed4 update breaking change in estimateRouteFee 2024-10-17 13:25:49 -05:00
k00b 1645c2aabf avoid dev refresh of lnd 2024-10-16 14:43:00 -05:00
k00b 4b18498651 hide cowboy hat -> essentials 2024-10-14 17:52:40 -05:00
Keyan 245419185f
wallet streaks (#1468)
* wallet streaks backend

* notifications and badges

* reuseable streak fragment

* squash migrations

* push notifications

* update cowboy notification setting label text
2024-10-11 19:14:18 -05:00
k00b ce2d7e5791 try to fix apollo leak 2024-10-10 16:03:21 -05:00