Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encrypted device sync #1373

Merged
merged 72 commits into from
Oct 1, 2024
Merged

Encrypted device sync #1373

merged 72 commits into from
Oct 1, 2024

Commits on Sep 7, 2024

  1. user vault

    riccardobl committed Sep 7, 2024
    Configuration menu
    Copy the full SHA
    44604bc View commit details
    Browse the repository at this point in the history
  2. code cleanup and fixes

    riccardobl committed Sep 7, 2024
    Configuration menu
    Copy the full SHA
    071a67a View commit details
    Browse the repository at this point in the history
  3. improve ui

    riccardobl committed Sep 7, 2024
    Configuration menu
    Copy the full SHA
    0cfbbca View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4f3fbee View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2024

  1. some improvements

    riccardobl committed Sep 8, 2024
    Configuration menu
    Copy the full SHA
    33128cf View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2024

  1. Configuration menu
    Copy the full SHA
    f23f750 View commit details
    Browse the repository at this point in the history
  2. comments and cleanup

    riccardobl committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    99db743 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    aded982 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f17cb6c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    730ce9e View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2024

  1. Configuration menu
    Copy the full SHA
    6ed9cfa View commit details
    Browse the repository at this point in the history

Commits on Sep 13, 2024

  1. Configuration menu
    Copy the full SHA
    efbcac3 View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2024

  1. fixes

    riccardobl committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    93e6bd4 View commit details
    Browse the repository at this point in the history
  2. fix vault key unsync

    riccardobl committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    41a0c6b View commit details
    Browse the repository at this point in the history
  3. implicit migration

    riccardobl committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    d9b7277 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9213770 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8031bc3 View commit details
    Browse the repository at this point in the history
  6. improve text

    riccardobl committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    49b4a71 View commit details
    Browse the repository at this point in the history
  7. remove useless SSR check

    riccardobl committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    4b73171 View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2024

  1. Configuration menu
    Copy the full SHA
    8fcc7c5 View commit details
    Browse the repository at this point in the history
  2. add auth checks

    riccardobl committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    1ed8c2a View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2024

  1. Configuration menu
    Copy the full SHA
    8327269 View commit details
    Browse the repository at this point in the history
  2. Rename variables

    ekzyis committed Sep 21, 2024
    Configuration menu
    Copy the full SHA
    79e1821 View commit details
    Browse the repository at this point in the history
  3. Fix missing await

    ekzyis committed Sep 21, 2024
    Configuration menu
    Copy the full SHA
    51d8272 View commit details
    Browse the repository at this point in the history
  4. 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
    ekzyis committed Sep 21, 2024
    Configuration menu
    Copy the full SHA
    d03fda2 View commit details
    Browse the repository at this point in the history
  5. 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.
    ekzyis committed Sep 21, 2024
    Configuration menu
    Copy the full SHA
    d2450e9 View commit details
    Browse the repository at this point in the history

Commits on Sep 22, 2024

  1. Configuration menu
    Copy the full SHA
    afad3e4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7cf0466 View commit details
    Browse the repository at this point in the history
  3. 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.
    ekzyis committed Sep 22, 2024
    Configuration menu
    Copy the full SHA
    bc0fde5 View commit details
    Browse the repository at this point in the history
  4. Remove debug buttons

    ekzyis committed Sep 22, 2024
    Configuration menu
    Copy the full SHA
    330b7a6 View commit details
    Browse the repository at this point in the history
  5. Rename userVault -> vault

    ekzyis committed Sep 22, 2024
    Configuration menu
    Copy the full SHA
    3015e8e View commit details
    Browse the repository at this point in the history
  6. Update console.log's

    ekzyis committed Sep 22, 2024
    Configuration menu
    Copy the full SHA
    34c492d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    d982c96 View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2024

  1. Configuration menu
    Copy the full SHA
    253373f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c737845 View commit details
    Browse the repository at this point in the history
  3. Small refactor of migration

    ekzyis committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    59c8f1c View commit details
    Browse the repository at this point in the history

Commits on Sep 24, 2024

  1. Fix wallet drag and drop

    ekzyis committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    8631bc2 View commit details
    Browse the repository at this point in the history
  2. Add passphrase copy button

    ekzyis committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    2a283f5 View commit details
    Browse the repository at this point in the history
  3. Fix priorityOnly -> skipTests

    ekzyis committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    7f437ac View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    bc5bc8c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6361e93 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    92b987d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    213f652 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    fa0c066 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    9653ec0 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    f8ce344 View commit details
    Browse the repository at this point in the history
  11. Some rephrasing

    ekzyis committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    472c559 View commit details
    Browse the repository at this point in the history
  12. Fix wallet detach

    ekzyis committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    d40d997 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    2a880fa View commit details
    Browse the repository at this point in the history
  14. Remove debug buttons

    ekzyis committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    6a6981f View commit details
    Browse the repository at this point in the history
  15. Fix QR code scan in dark mode

    ekzyis committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    7907cdf View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2024

  1. Don't allow custom passphrases

    ekzyis committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    f0a27f7 View commit details
    Browse the repository at this point in the history
  2. More rephrasing

    ekzyis committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    4dbcde3 View commit details
    Browse the repository at this point in the history
  3. Only use schema if not enabled

    ekzyis committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    2a1c24b View commit details
    Browse the repository at this point in the history
  4. Fix typo in comment

    ekzyis committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    418bd0c View commit details
    Browse the repository at this point in the history

Commits on Sep 28, 2024

  1. Configuration menu
    Copy the full SHA
    a922010 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    614a1cc View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e56e530 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7b0fbf2 View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2024

  1. Configuration menu
    Copy the full SHA
    07ba619 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0688b07 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7f1efe4 View commit details
    Browse the repository at this point in the history

Commits on Oct 1, 2024

  1. add copy button

    riccardobl committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    b019e69 View commit details
    Browse the repository at this point in the history
  2. move reset out of modals

    riccardobl committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    b26c578 View commit details
    Browse the repository at this point in the history
  3. hide server side errors

    riccardobl committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    98089bd View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b181916 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    08c8996 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    6bf5ff2 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    7fb3a5b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ada65bc View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    3908547 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    1e5ca82 View commit details
    Browse the repository at this point in the history