Commit Graph

798 Commits

Author SHA1 Message Date
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
k00b adcb80782b caching is hard 2024-10-08 19:26:29 -05:00
k00b 651053fd71 remove deprecated canonizeResults 2024-10-08 14:25:23 -05:00
Keyan fec7c92fd9
run noncritical side effects outside critical path of paid action (#1464)
* run noncritical side effects outside critical path of paid action

* fix item fetching of zap side effect

* fix vapid pubkey env var name in readme
2024-10-08 11:48:19 -05:00
k00b 4532e00085 Revert "Include extension in S3 key (#1426)"
This reverts commit b82641d1bd.
2024-10-07 13:22:01 -05:00
k00b 154c0e0a4a fix cache key bloat 2024-10-06 18:56:48 -05:00
k00b 153455983e Revert "Encrypted device sync (#1373)"
This reverts commit a9a566a79f.
2024-10-04 15:00:13 -05:00
Keyan 5543a0755a
paginating wallet logs (#1459)
* paginating wallet logs

* refine
2024-10-04 06:59:32 -05:00
Keyan f4382ad73e
better boost hints (#1441)
* better boost hints

* refine
2024-10-02 19:24:01 -05:00
k00b 65a7ef10d0 make bio work as paid action 2024-10-02 18:39:56 -05:00
k00b 5fab3abb82 fix bio quirks 2024-10-02 18:12:49 -05:00
Keyan 4ce395889d
Be kind to lnd (#1448)
* cache or remove unecessary calls to lnd

* avoid redundant grpc calls in state machine

* store preimage whenever available

* enhancements post self-code review

* small refinements

* fixes

* fix lnurl-verify

* prevent wallet logger throwing on idb close

* fix promise in race while waiting for payment
2024-10-02 15:03:30 -05:00
Riccardo Balbo a9a566a79f
Encrypted device sync (#1373)
* user vault

* code cleanup and fixes

* improve ui

* prevent name collisions between users on the same device

* some improvements

* implement storage migration

* comments and cleanup

* make connect button primary instead of warning

* move show passphrase in new line (improvement for small screen devices)

* make show passphrase field readOnly

* fixes

* fix vault key unsync

* implicit migration

* move device sync under  general tab

* fix locally disabled wallets and default wallet selection

* improve text

* remove useless SSR check

* add auth checks

* Rename variables

* Fix missing await

* Refactor local<>vault storage interface

I've changed quite some things here. Attempt of a summary:

* storageKey is now only controlled by useVaultStorageState

I've noticed that dealing with how storage keys are generated (to apply user scope) was handled in two places: the existing wallet code and in the new vault code.

This was confusing and error-prone. I've fixed that by completely relying on the new vault code to generate correct storage keys.

* refactored migration

Migration now simply encrypts any existing local wallets and sends them to the server. On success, the local unencrypted version is deleted.

The previous code seemed to unnecessarily generate new local entries prefixed by 'vault:'.

However, since we either use unencrypted local state OR use the encrypted vault on the server for the data, I didn't see any need for these.

Migration seems to work just as well as before.

* removed unnecessary state

In the <DeviceSync> component, enabled & connected were using a unnecessary combo of useState+useEffect.

They were only using variables that are always available during render so simple assignments were enough.

* other minor changes include:

  * early returns
  * remove unnecessary SSR checks in useEffect or useCallback
  * formatting, comments
  * remove unnecessary me? to expose possible bugs

* Fix missing dependency for useZap

This didn't cause any bugs because useWallet returns everything we need on first render.

This caused a bug with E2EE device sync branch though since there the wallet is loaded async.

This meant that during payment, the wallet config was undefined.

* Assume JSON during encryption and decryption

* Fix stale value from cache served on next fetches

* Add wallet.perDevice field

This adds 'perDevice' as a new wallet field to force local storage. For example, WebLN should not be synced across devices.

* Remove debug buttons

* Rename userVault -> vault

* Update console.log's

* revert some of the migration and key handling changes. restore debug buttons for testing

* Fix existing wallets not loaded

* Pass in localOnly and generate localStorageKey once

* Small refactor of migration

* Fix wallet drag and drop

* Add passphrase copy button

* Fix priorityOnly -> skipTests

* Disable autocompletion for reset confirmation prompt

* Show wrong passphrase as input error

* Move code into components/device-sync.js

* Import/export passphrase via QR code

* Fix modal back button invisible in light mode

* Fix modal closed even on connect error

* Use me-2 for cancel/close button

* Some rephrasing

* Fix wallet detach

* Remove debug buttons

* Fix QR code scan in dark mode

* Don't allow custom passphrases

* More rephrasing

* Only use schema if not enabled

* Fix typo in comment

* Replace 'generate passphrase' button with reload icon

* Add comment about IV reuse in GCM

* Use 600k iterations as recommended by OWASP

* Set extractable to false where not needed

* use-vault fallbacks to local storage only for anonymous users

* fix localStorage reset on logout

* add copy button

* move reset out of modals

* hide server side errors

* hardened passphrase storage

* do not show passphrase even if hardened storage is disabled (ie. indexeddb not supported)

* show qr code button on passphrase creation

* use toast for serverside error

* Move key (de)serialization burden to get/setLocalKey functions

* password textarea and remove qr

* don't print plaintext vault values into console

---------

Co-authored-by: ekzyis <ek@stacker.news>
Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
Co-authored-by: k00b <k00b@stacker.news>
2024-10-01 14:55:01 -05:00