* refactor: move lock/unlock wallet api calls from child component to parent
* refactor: control Wallet component appearance from parent
* fix: prevent state update on an unmounted component on Settings page
* dev: add simple fidelity bond screen in advanced mode
* dev: add link to fidelity form page in CurrentWalletAdvanced
* dev: fix build errors and remove 'as' tag of translation elements
* refactor: move FidelityBondAdvanced component to own file
* ui: highlight expiry date of fidelity bond address
* dev: display Fidelity Bond create form regardless if FBs already exist
* dev: avoid flickering when loading new fb address
* fix: rename Locktime to Lockdate
* dev: add translation strings to section 'global'
* wip: FidelityBondSimple
* review: distinct simple and dev mode Fidelity Bond screens
* review: fix dev FB view in dark mode
* refactor: rename FidelityBondAdvanced to FidelityBondDevOnly
* dev: add link to default view to FidelityBondDevOnly
* dev: sort utxo by value
* dev: reset user confirmation on data change
* dev: create fidelity bond with collaborative transaction WIP
* dev: wait for collaborative transaction to finish
* dev: unfreeze utxos after creating sweep tx
* review: render whitespace only when necessary in FB alert
* review: do not provide time related values to Date.UTC for FB
* Update src/components/FidelityBondDevOnly.tsx
Co-authored-by: Daniel <10026790+dnlggr@users.noreply.github.com>
* review: do not duplicate 'initialLockdate' values
* dev: allow lockdates in the past in dev mode
* dev: display percentage of utxo to total value in account
* dev: style percentage bar
* dev: display percentage bar in account selector
* dev: i18n for 'time elapsed' phrase
* dev: externalize components UtxoSelector and UtxoCheckbox
* dev: externalize components AccountSelector and AccountCheckbox
* dev: externalize LockdateForm
* dev: externalize FidelityBondDetailsSetupForm
* dev: display all accounts by default in FB form
* refactor: remove unused vars and imports
* dev: fix comments and add todos
* dev: minimal i18n for FB form
* ui: remove account/utxo checkbox overlay
* dev: add checkbox-card component
* dev: show unit of funds according to settings in FB form
* dev: allow already expired lockdates in dev mode
* dev: use minimum makers to create fb
* refactor: combine FidelityBond and FidelityBondSimple
* dev: undo coin control setup on errors
* dev: perform coin control actions sequentially
* dev: use direct-send when renewing an expired fidelity bond
* review: improve code readability
* review: do not return value from function 'sweepToFidelityBond'
* dev: log timelocked address to console in dev mode
* review: remove FidelityBondDevOnly component
* review: use dropdowns in lockdate form
* Update src/components/FidelityBond.tsx
Co-authored-by: Daniel <10026790+dnlggr@users.noreply.github.com>
* dev: add debug feature 'allowCreatingExpiredFidelityBond'
* review: fix var naming
* review: fix comment
* Update src/components/FidelityBond.tsx
Co-authored-by: Daniel <10026790+dnlggr@users.noreply.github.com>
* Update src/components/FidelityBond.tsx
Co-authored-by: Daniel <10026790+dnlggr@users.noreply.github.com>
* dev: unfreeze sequentially after fidelity bond tx was created
* review: remove ability to select multiple jars
* review: add tests for fb utils
* review: remove coin control
* review: reflect missing coin control in account checkbox
* review: remove time elapsed string from fb summary
* dev: add taker started alert to FB screen
* dev: reset lockdate form if date is invalid
* dev: reload after taker operation
* dev: add calculated total balance to useBalanceSummary hook
* dev: handle expired timelocked funds in useBalanceSummary hook
* dev: use isLocked to detect if freeze/unfreeze is enabled
* dev: fix build
* refactor: proper var names
* dev: show success msg only if fb has been created successfully
* dev: do not wait for collaborative tx to finish
* dev: direct-send if renewing FB
* dev: utilize 'isLocked' in CurrentWalletAdvanced and Jam view
* dev: link to FB view in Cheatsheet
* dev: utilize 'calculatedTotalBalanceInSats' where possible
* Update src/components/FidelityBond.tsx
Co-authored-by: Daniel <10026790+dnlggr@users.noreply.github.com>
* review: adapt error handling style on FB sweep tx
sorry @dnlggr for letting this slip in _again_
* review: always show all accounts in FB form
* review: initial lockdate should be 3 month from now
* review: move YearsRange and initialLockdate to fb_utils
* review: display month names
* review: wrap rows in container
* review: remove unnecessary comment
* review: left-align confirmation toggle in FB form
* review: turn accountBalances from array to object
* Update src/i18n/locales/en/translation.json
Co-authored-by: Gigi <109058+dergigi@users.noreply.github.com>
* Update src/components/FidelityBond.tsx
Co-authored-by: Gigi <109058+dergigi@users.noreply.github.com>
* review: remove initializing flag
* review: show timelocked address in confirmation step
* test: add test for LockdateForm component
* test: add test for _minMonth
* test: add test for _selectableYears
* test: add test for _selectableMonths
* ui: fix table in light theme
Co-authored-by: Daniel <10026790+dnlggr@users.noreply.github.com>
Co-authored-by: Gigi <109058+dergigi@users.noreply.github.com>
* feat(footer): show Jam version
link will lead to GitHub releases (tags)
* Update src/components/App.jsx
Co-authored-by: Daniel <10026790+dnlggr@users.noreply.github.com>
* refactor: use Formik in Wallet component
* fix: handle lock attempt of currently unactive wallet
* fix: let Formik know that onSubmit handlers are async
* chore: remove unused utils function 'serialize'
* fix: remove redundant comment
* feat: add cheatsheet
* show cheatsheet only when wallet is active
* display cheatsheat in dev mode only for now
* add close button to cheatsheet overlay (for mobile users)
* ui: visualize upcoming features in cheatsheet
* ui: show cheatsheet once after first wallet was created
* feat: add simple feature flags
Co-authored-by: Đorđe Spasić <34274884+Djo1e@users.noreply.github.com>
Co-authored-by: Gigi <109058+dergigi@users.noreply.github.com>
* feat: add api call to get timelock address
* refactor: reset wallet info in WalletProvider
* refactor: move wallet info loading into WalletProvider
* review: inline function in CurrentWalletAdvanced component
* review: add comment on error handling in auto-reloading wallet info
* ui: adapt info alert color to match figma more closely
* ui: adapt connection indicator icon to match figma more closely
* ui: better visibility of disabled input fields in dark-mode
* ui: reorder form fields on send page to match figma
* ui: default to sending as collaborative transaction
* ui: add icons to receive/withdraw buttons in CurrentWalletMagic
* review: use Send/Receive instead of Deposit/Withdraw
* fix: spacing on send screen
* fix: make collapsed accordion buttons visible in dark mode
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.
* 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
* 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
* 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>
* 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>
* refactor: get current wallet from context on wallets page
* refactor: pass className to Wallet component
* refactor: remove row/col from Wallet layout
* ui: use PageTitle on Wallets page
* ui: increase Create Wallet button size if no wallet exists
* refactor: remove duplicate class names from wallet
* review: center 'Your wallets' heading
* fix: fix wallet list form on mobile
* always display yielgen report with max width
* lowercase 'sats' to be consistent with 'send' page
* display success alert when service is running
* fix: display info text if taker is running
* feat: add table footer to report and reduce lines
* review: keep feeRel state as factor
Co-authored-by: Daniel <10026790+dnlggr@users.noreply.github.com>
* refactor: collect api requests in single file
* refactor: use JmWalletApi for all api requests
* cleanup: remove unused varin JmWalletApi
* refactor: adhere to http_method+resource naming for api methods
* cleanup: more consistent use of walletName var
* Convert logo into sprite
* Add theme basics
* Extract Sprite component
* Add some more overrides
* Update src/components/App.jsx
Co-authored-by: Daniel <eggerdnl@gmail.com>
* Move switch to settings view
Co-authored-by: Daniel <eggerdnl@gmail.com>