* feat: add password confirmation on create screen
* fix: labels and feedback in create form according to figma
* test: verify password confirm validation message
* fix: remove unnecessary escape character
* fix: do not escape '-'
* refactor: comments and better name for escape function
* deps: add Formik form validation library
* refactor: use Formik for CreateWallet form validation
* refactor: remove 'isCreating' flag in favor of 'onFinished' callback
* test: adapt tests to be compatible with Formik
see https://github.com/jaredpalmer/formik/issues/1543
* ui: move seed phrase on settings page to modal
* custom btn-close style only inside modal-header
* better name for i18n key of seed modal info text
* review: remove unnecessary 'preventDefault' on settings page
* review: remove angle brackets from modal header
Co-authored-by: Daniel <10026790+dnlggr@users.noreply.github.com>
Co-authored-by: Daniel <10026790+dnlggr@users.noreply.github.com>
* refactor: always extract api error message with Api.Helper
* refactor: port WalletContext from jsx to tsx
* fix: do not hide CreateWallet component on connection errors
* chore: remove deprecated 'exact' property of index route
'exact' has been removed in react-router v6 and is not needed anymore.
* dev: enable engine-strict to enforce specified npm/node min versions
* dev: update npm min version from v7.0.0 to v8.0.0
* dev: update node min version from v16.0.0 to v16.11.0
* fix: show skip button on quiz screen only in dev mode
* chore: externalize styles for Seedphrase and CreateWallet components
* fix: slightly increase container width of seedword
* feat: prevent users from leaving page with seedphrase on it by mistake
* feat: prevent leaving page while wallet is being created
* test: verify 'skip' button is not present in test env
* fix: Warning: 'value' prop on 'input' should not be null
* cleanup: use AbortController to remove websocket event listener
* dev: enable React.StrictMode globally
* feat: add ServiceInfoContext
* use ServiceInfo in Navbar component
* move updating ServiceInfo with websocket data from App to ServiceInfoProvider
* use sessionConnectionError in App component
* use taker/maker info from ServiceInfo in App component
* move resetting wallet/walletInfo from App to ServiceInfoProvider
* fix: display wallet active state according to server session state
* always sort wallet array list by name starting with active wallet
* hide wallet list when reloading wallet data
* feat: add activity indicators to wallet list screen
* externalize JoiningIndicator component
* ui: hide unlock option for inactive wallets if maker/taker service is running
* refactor: use WalletContext and ServiceInfoContext consistently
* chore: use statusText as fallbackReason in Api.Helper
* fix: pass correct request body in send requests
* fix: pass sat value of utxos as strings in advanced view
* fix: show config warning after failed send only if necessary
* Add seed phrase backup confirmation during wallet creation
* Refactor to use 12 inputs, add skip button and more improvements
* Add reset for no match message
* Move backup confirmation into own component
* Remove verify button, make reactive, disable on correct word and more
* Fix build error
* Fix declaration order
* Remove not needed prop and remove input feedback
* Add slashed zeroes styling and remove input padding
* Dry up code using daniels suggestions
* Remove unused callback
* Make seedword index fixed width
* Run npm install
* Run prettier
* Fix key locations
* Add more translations
* Update src/i18n/locales/en/translation.json
* Update src/components/CreateWallet.jsx
* Update src/i18n/locales/en/translation.json
* Update src/components/CreateWallet.jsx
* Apply suggestions from code review
Co-authored-by: Daniel <10026790+dnlggr@users.noreply.github.com>
* fix: receive address copy button not working
* fix: handle new addresses and mobile devices
this also re-adds the previous functionality and uses document.execCommand as a fallback
* test: verify current behaviour of Wallet component
* fix: assume websocket is healthy only if connection is stable
* test: verify successful locking/unlocking
* fix: clear UI wallet state if locking fails with state 401
Co-authored-by: Daniel <10026790+dnlggr@users.noreply.github.com>
* fix: prevent updated on unmounted components
* fix: initialize and set wallet immediately
* Update src/context/WalletContext.jsx
Co-authored-by: Daniel <10026790+dnlggr@users.noreply.github.com>
* refactor: rename 'initialWalletFromSession' to 'restoreWalletFromSession'
* fix: remove obsolete wallet initialization in App component
wallet is restored from session right away before App is invoked
Co-authored-by: Daniel <10026790+dnlggr@users.noreply.github.com>
* test: add basic test for App component
* test: add basic test for Wallets component
* Debug log only in dev env (spare test environment)
* ci: enable tests in GitHub build workflow
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
* feat: readd websocket connection
* add WebsocketProvider
* feat: update taker/maker state based on websocket data
* update connection indicator based on websocket state
* reconnect with linear backoff on websocket errors
the backend is not happy with a second instance in another browser tab
that send invalid tokens (e.g. because the previously used wallet was
locked in another tab). This introduces a linear increase to a max
of 10 seconds. Seems to ease the problem in the active tab.
* send keepalive message periodically
some webservers will close connections on inactivity rather
soon by default (e.g. nginx is 60s). this commit contains
sending a keepalive message periodically every 30 seconds.
Co-authored-by: d11n <mail@dennisreimann.de>