Commit Graph

2635 Commits

Author SHA1 Message Date
ekzyis 15fb7f446b
Wallet Logs (#994)
* nwc wallet logs

* persist logs in IndexedDB

* Potential fix for empty error message

* load logs limited to 5m ago from IDB

* load logs from past via query param

* Add 5m, 1h, 6h links for earlier logs

* Show end of log

* Clamp to logStart

* Add log.module.css

* Remove TODO about persistence

* Use table for logs

* <table> fixes bad format with fixed width and message overflow into start of next row
* also using ---start of log--- instead of ---end of log--- now
* removed time string in header nav

* Rename .header to .logNav

* Simply load all logs and remove navigation

I realized the code for navigation was most likely premature optimization which even resulted in worse UX:
Using the buttons to load logs from 5m, 1h, 6h ago sometimes meant that nothing happened at all since there were no logs from 5m, 1h, 6h ago.
That's why I added a time string as "start of logs" so it's at least visible that it changed but that looked bad so I removed it.

But all of this was not necessary: I can simply load all logs at once and then the user can scroll around however they like.

I was worried that it would be bad for performance to load all logs at once since we might store a lot of logs but as mentioned, that's probably premature optimization.

WHEN a lot of logs are stored AND this becomes a problem (What problem even? Slow page load?), THEN we can think about this.

If page load ever becomes slow because of loading logs, we could probably simply not load the logs at page load but only when /wallet/logs is visited.

But for now, this works fine.

* Add follow checkbox

* Create WalletLogs component

* Embed wallet logs

* Remove test error

* Fix level padding

* Add LNbits logs

* Add logs for attaching LND and lnAddr

* Use err.message || err.toString?.() consistently

* Autowithdrawal logs

* Use details from LND error

* Don't log test invoice individually

* Also refetch logs on error

* Remove obsolete and annoying toasts

* Replace scrollIntoView with scroll

* Use constant embedded max-height

* Fix missing width: 100% for embedded logs

* Show full payment hash and preimage in logs

* Also parse details from LND errors on autowithdrawal failures

* Remove TODO

* Fix accidental removal of wss:// check

* Fix alignment of start marker and show empty if empty

* Fix sendPayment loop

* Split context in two
2024-04-03 17:27:21 -05:00
JP a7105b90f2
Fix title from draft being dismissed (#718) (#991)
* Fix title from draft being dismissed

Add a way to bypass the title generation query when the url change is from local storage (draft) and not user interaction.

* Check draft title from storage

* Remove unused
2024-04-03 16:13:20 -05:00
SatsAllDay 4b77e7a1a9
Limit scope of API Keys (#989)
* first pass of disallowing certain APIs with API keys

Disallow the following APIs:
* item.act (zap)
* create withdrawal
* unlink auth method
* link unverified email

* disallow creating lnauths via API key to stop the flow of linking via lnauth

* undo the limitation on donating to rewards

* revert the assertion on createAuth

* assert no api key on createWithdrawal and sendToLNAddr

* incorporate PR feedback by adding API Key negative assertion to more mutations:

* `createInvite`
* `createAuth`
* `upsertWalletLND` by way of `upsertWallet`
* `upsertWalletLNAddr` by way of `upsertWallet`
2024-04-03 15:11:06 -05:00
Anis Khalfallah 0c0f303a11
Add capture's container from /capture (#1001)
* Modified docker-compose.yml to include capture from /capture

Signed-off-by: Anis Khalfallah <khafallah.anis@hotmail.com>

* Update capture's container to include health checks via /health api

* refine capure docker service

---------

Signed-off-by: Anis Khalfallah <khafallah.anis@hotmail.com>
Co-authored-by: Anis Khalfallah <khafallah.anis@hotmail.com>
Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
2024-04-03 14:28:51 -05:00
Keyan 5a1f39d076
Merge pull request #1008 from stackernews/territory-header-createdAt
Add founding date to territory header
2024-04-03 13:00:00 -05:00
Keyan e1e512deb7
Merge pull request #1009 from stackernews/refinv
Fix all known problems with invite and referral links
2024-04-03 10:10:16 -05:00
keyan ffa86abdb3 fix referrer logic to work with lnauth/nostr auth 2024-04-02 20:25:35 -05:00
keyan a764837776 update redirection logic for invites 2024-04-02 19:51:30 -05:00
keyan f2589efc94 fix invite link parameter type 2024-04-02 19:14:06 -05:00
ekzyis 3cd80a54f6 Add createdAt to territory header 2024-04-03 01:17:32 +02:00
keyan e2c7f4aa58 sndev logs command 2024-04-02 15:00:45 -05:00
keyan 77080f5acd use lnd event emitter from correct scope 2024-04-02 14:36:00 -05:00
keyan d0e15eb887 give invite links a default limit 2024-04-02 10:09:21 -05:00
keyan b997c19cf0 time is a bitch doc 2024-04-02 09:29:56 -05:00
keyan 6d55753eed fix daylight savings times issues in rewards 2024-04-01 20:56:09 -05:00
keyan 10a08f28f3 fix total rewards 2024-04-01 09:05:39 -05:00
keyan 302f5b5dfc refine copy for april msm 2024-04-01 08:56:13 -05:00
keyan 2c9e668177 april million sat madness 2024-04-01 08:56:13 -05:00
Keyan 6cc4f29382
Update README.md 2024-03-31 15:22:09 -05:00
keyan b12cf53630 specify non-reward days better 2024-03-31 14:21:08 -05:00
keyan 1e3a836fbc update reward notification for msm 2024-03-30 18:46:01 -05:00
keyan 45f90bd3f9 update newsletter script with new search filters 2024-03-30 15:27:51 -05:00
Keyan 044cd19401
Merge pull request #1003 from stackernews/pr-template-headers
Use headers for sections in PR template
2024-03-30 12:20:04 -05:00
ekzyis 78f2a2cedf Use headers for section 2024-03-30 15:26:46 +01:00
Keyan c0ffbc401a
Merge pull request #990 from stackernews/pr-template
Add PR template
2024-03-29 10:11:51 -05:00
Keyan 57b862431e
Merge pull request #997 from stackernews/996-qr-scanner-broken
Fix QR scanner collapsed to no width
2024-03-29 10:07:27 -05:00
Keyan 8a9e4b7472
Merge pull request #998 from stackernews/fix-middleware-csp-disabled
Fix CSP commented out in middleware
2024-03-29 10:06:34 -05:00
ekzyis 0434045f22 Refactor dev CSP logic
always uses string concatentation now
2024-03-29 15:35:25 +01:00
ekzyis b7893634ac Fix CSP commented out in middleware 2024-03-29 15:27:51 +01:00
ekzyis 3a1ff7027e Fix QR scanner collapsed to no width 2024-03-29 12:50:57 +01:00
keyan ef5a92dff4 match offcanvas nym position to navbar 2024-03-28 18:57:42 -05:00
keyan 9820055aee refine hiding bottom navbar when virtual keyboard opens 2024-03-28 18:18:44 -05:00
keyan 176d0e2e77 fix weird ios sticky behavior with virtual keyboard 2024-03-28 17:35:08 -05:00
ekzyis 009b09ece2 Add PR template 2024-03-28 23:14:50 +01:00
keyan 43ebb44866 consitent top padding settings, profiles, satistics 2024-03-28 17:09:57 -05:00
keyan b577a4f4af account for sticky on clickToContext 2024-03-28 16:43:44 -05:00
keyan b2616bdfdb change order of bell and post button for symettry 2024-03-28 16:35:21 -05:00
keyan 7dac5e79a6 prioritize showing wallet balance over price carousel 2024-03-28 16:32:53 -05:00
keyan 79b894514b fix sticky gap on some android devices 2024-03-28 16:17:05 -05:00
keyan d5a018e48d hide bottom navigation when virtual keyboard is shown 2024-03-28 16:03:45 -05:00
keyan ff37adba90 fix safari bottom inset problem 2024-03-28 15:00:23 -05:00
keyan ce5d01037a use safe-area-inset-bottom for bottom nav padding 2024-03-28 12:57:27 -05:00
keyan 97927c1f9a consistent sticky search spacing 2024-03-28 12:37:26 -05:00
keyan f08bd4ffc8 make api key nullable 2024-03-28 12:34:14 -05:00
keyan dfc3d7dfa6 fix nav spacing 2024-03-28 12:33:58 -05:00
Keyan 5b18c1ff5b
Merge pull request #985 from stackernews/fix-modal-alignment
Fix alignment in modal
2024-03-28 11:22:43 -05:00
ekzyis dcb7205278 Fix alignment in modal 2024-03-28 17:10:05 +01:00
Keyan 690d2849e9
Update awards.csv 2024-03-28 10:47:12 -05:00
Keyan 4c2fcec69b
Merge pull request #982 from stackernews/nav
Improved navigation with dedicated mobile navigation
2024-03-27 16:53:19 -05:00
keyan 6054afa10c simplify logic determining if territory select is shown 2024-03-27 16:29:04 -05:00