Commit graph

676 commits

Author SHA1 Message Date
Thebora Kompanioni
0c019db742
feat: confirm password on Create Wallet screen (#210)
* 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
2022-04-07 12:07:26 +02:00
Thebora Kompanioni
33b35f7ba9
fix: force-close pending websockets connections (#200)
* fix: force-close pending websockets connections

* review: change websocket close frame status from 1000 to 1001
2022-04-06 15:43:29 +02:00
Thebora Kompanioni
0addb967e2
ui: move seed phrase on settings page to modal (#206)
* 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>
2022-04-06 15:18:44 +02:00
Thebora Kompanioni
963dc49e72
fix: do not hide CreateWallet component on connection errors (#199)
* 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.
2022-04-06 12:59:07 +02:00
Thebora Kompanioni
ad58b99aa4
ui: enhance error message on bad request errors (#202) 2022-04-04 09:31:26 +02:00
Thebora Kompanioni
f32e95ac8e
dev: enable npm config engine-strict (#197)
* 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
2022-04-04 09:30:42 +02:00
Thebora Kompanioni
6c5e149516
fix: Remove skip button quiz screen (#198)
* 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
2022-04-04 09:27:54 +02:00
Gigi
6fb5b1a896
chore(release): prepare v0.0.5 (#195)
* chore(release): prepare v0.0.5

* build: npm install

* build: npm install

using npm version 8.5.5
2022-03-29 12:54:38 +02:00
Thebora Kompanioni
39019ccbb6
fix: make websocket health state work across browsers (#186)
* fix: Warning: 'value' prop on 'input' should not be null

* cleanup: use AbortController to remove websocket event listener

* dev: enable React.StrictMode globally
2022-03-28 15:10:07 +02:00
dependabot[bot]
591377b654
build(deps): bump minimist from 1.2.5 to 1.2.6 (#194)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-28 15:03:17 +02:00
Thebora Kompanioni
e5d97d148d
chore: update dependencies (#193)
* build(deps): bump node-forge from 1.2.1 to 1.3.0

Bumps [node-forge](https://github.com/digitalbazaar/forge) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/digitalbazaar/forge/releases)
- [Changelog](https://github.com/digitalbazaar/forge/blob/main/CHANGELOG.md)
- [Commits](https://github.com/digitalbazaar/forge/compare/v1.2.1...v1.3.0)

---
updated-dependencies:
- dependency-name: node-forge
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: update dependencies

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-28 14:49:14 +02:00
Daniel
81876b7214
feat: sweep mixdepths (#184)
* feat: sweep mixdepths

* Add sweep amount breakdown
2022-03-23 12:53:25 +01:00
Thebora Kompanioni
228c92ee55
Improve lock/unlock mechanism (#175)
* 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
2022-03-21 17:31:31 +01:00
Thebora Kompanioni
a096b2ba92
chore: fix linter config (#185) 2022-03-21 10:43:42 +01:00
Thebora Kompanioni
182b09c359
fix: pass correct request body in send-direct request (#180)
* 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
2022-03-17 14:44:51 +01:00
Thebora Kompanioni
80e5da78e5
Add typescript support (#176)
* init typescript support

* chore: update dependencies

@popperjs/core              ^2.11.2  →   ^2.11.4
@testing-library/jest-dom   ^5.16.1  →   ^5.16.2
@testing-library/react      ^12.1.2  →   ^12.1.4
http-proxy-middleware        ^2.0.1  →    ^2.0.4
i18next                    ^21.6.12  →  ^21.6.14
lint-staged                 ^12.3.1  →   ^12.3.6
prettier                     ^2.5.1  →    ^2.6.0
react-bootstrap              ^2.1.1  →    ^2.2.1
react-i18next              ^11.15.5  →  ^11.15.7
react-router-bootstrap      ^0.26.0  →   ^0.26.1
react-router-dom             ^6.2.1  →    ^6.2.2
2022-03-17 12:44:01 +01:00
secondl1ght
0719dc6235
feat: add seed phrase backup confirmation during wallet creation (#156)
* 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>
2022-03-17 09:24:28 +01:00
Thebora Kompanioni
f8aa3e786b
Update regtest env (#178)
* dev: interact with regtest env via npm scripts

* dev: use default jm_gaplimit in regtest env

* dev: remove tor config from primary regtest container
2022-03-16 13:49:39 +01:00
Thebora Kompanioni
5a17252612
chore: fix typo in en/translation.json (#177)
* chore: fix typo in en/translation.json

* fix translation string in DisplayAccountUTXOs.jsx
2022-03-16 13:32:47 +01:00
Daniel
63018ac96b
feat: translate screens (#174)
* Translate onboarding

* Translate navbar, app, footer

* Translate wallet card

* Translate wallet creation form

* Translate wallet confirmation

* Rename wallets.wallet key

* Translate current wallet

* Translate settings

* Translate send

* Translate receive

* Translate earn

* Fix linter warnings

* Fix tests

* Update src/components/Earn.jsx

Co-authored-by: Thebora Kompanioni <theborakompanioni@users.noreply.github.com>

* Update src/i18n/locales/en/translation.json

Co-authored-by: Thebora Kompanioni <theborakompanioni@users.noreply.github.com>

* Update src/components/CurrentWalletAdvanced.jsx

Co-authored-by: Thebora Kompanioni <theborakompanioni@users.noreply.github.com>

* Update src/components/Earn.jsx

Co-authored-by: Thebora Kompanioni <theborakompanioni@users.noreply.github.com>

* Update src/i18n/locales/en/translation.json

Co-authored-by: Thebora Kompanioni <theborakompanioni@users.noreply.github.com>

* Update src/i18n/locales/en/translation.json

Co-authored-by: Thebora Kompanioni <theborakompanioni@users.noreply.github.com>

* Remove dead code

* Parametrize num collaborators

* Added fallback for branch type

Co-authored-by: Thebora Kompanioni <theborakompanioni@users.noreply.github.com>
2022-03-15 14:01:04 +01:00
Daniel
fe94945f2a
feat: satscomma formatting for bitcoin balances (#171)
* Use satscomma for btc formatting

* Harden balance parsing (a bit)

* Add tests for large values
2022-03-11 14:29:06 +01:00
Gigi
022f884d29
chore(release): prepare v0.0.4 (#170)
* chore(release): prepare v0.0.4

* build: npm install

* Clean up changelog

Co-authored-by: Daniel <10026790+dnlggr@users.noreply.github.com>
2022-03-10 11:01:47 +01:00
secondl1ght
7fb76ff5d5
feat: add display seed phrase option to settings (#160)
* Initial draft

* Add display seed phrase in settings

* Fix bug

* Remove not needed code

* Update src/components/Settings.jsx

Co-authored-by: Daniel <10026790+dnlggr@users.noreply.github.com>

* Add error message to UI when API fails, only call API once, update state

* Fix conflict

* Update src/components/Seedphrase.jsx

Co-authored-by: Daniel <10026790+dnlggr@users.noreply.github.com>

* Update src/libs/JmWalletApi.js

Co-authored-by: Daniel <10026790+dnlggr@users.noreply.github.com>

* Update src/libs/JmWalletApi.js

Co-authored-by: Daniel <10026790+dnlggr@users.noreply.github.com>

* Update src/components/Settings.jsx

Co-authored-by: Daniel <10026790+dnlggr@users.noreply.github.com>

* Update src/components/Settings.jsx

Co-authored-by: Daniel <10026790+dnlggr@users.noreply.github.com>

* Variable name updates

* Run prettier

* Remove break

* Update public/sprite.svg

Co-authored-by: Daniel <10026790+dnlggr@users.noreply.github.com>
2022-03-10 10:37:38 +01:00
Thebora Kompanioni
514bc5a96d
fix: display message if utxos are empty (#166)
* ui: display message if utxos are empty

* Update src/components/CurrentWalletAdvanced.jsx
2022-03-10 10:15:12 +01:00
Thebora Kompanioni
b38f7e840e
fix: use resolvedLanguage in language picker (#168)
* fix: use resolvedLanguage in language picker

* test for default language in Settings component
2022-03-09 19:56:08 +01:00
neb_b
34f8d2dc2b
fix: address copy button on http sites (#165)
* 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
2022-03-09 17:58:49 +01:00
Thebora Kompanioni
13f0ac3803
fix: clear UI wallet if locking fails with status 401 (#158)
* 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>
2022-03-09 17:34:37 +01:00
Daniel
8fc8c2d691
Reverse misdepth order (#167) 2022-03-09 17:22:05 +01:00
Thebora Kompanioni
78d15a1a30
fix: page reloads (#162)
* 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>
2022-03-09 16:54:06 +01:00
Daniel
cc168eb49f
feat: i18n (#153)
* Add basic i18n with i18next

* Add transifex config

* Add translation strings for wallets screen

* Delete transifex config for now

* Remove suspension

* Add exemplary german translation

* Add language switcher

* Add link to telegram group for translations

* Update tests

* Fix hook deps

* Add tx config

* Move i18n code to subfolder

* Update i18n usage in tests

* Remove unused call

* Pull de translation from transifex

* Add npm scripts for pushing and pulling

* Put back deps

* Put deps into dev

* Add tx gh config

* Add readme

* test: add empty new lang

* Remove test langs

* Remove cli integration

* Update src/i18n/README.md

Co-authored-by: Thebora Kompanioni <theborakompanioni@users.noreply.github.com>

* Update src/i18n/README.md

Co-authored-by: Thebora Kompanioni <theborakompanioni@users.noreply.github.com>

* Update src/i18n/README.md

Co-authored-by: Thebora Kompanioni <theborakompanioni@users.noreply.github.com>

* Update public/sprite.svg

Co-authored-by: Thebora Kompanioni <theborakompanioni@users.noreply.github.com>

* Change link

* Run npm install

* Update readme

* Update readme again

Co-authored-by: Thebora Kompanioni <theborakompanioni@users.noreply.github.com>
2022-03-09 16:47:17 +01:00
Daniel
26ffe8cdeb
fix: update suggested number of collaborators (#150)
* fix: update suggested number of colaborators

* Remove fallback

* Redo calculation

* Update initial calc
2022-03-07 15:29:50 +01:00
Thebora Kompanioni
3180103da6
fix: warn on missing config vars (#152)
* prevent update 'isReportLoaded' when Earn component is not mounted

* fix: better error message for missing fee_rel/fee_abs config values

* review: Update src/components/Send.jsx

Co-authored-by: Daniel <10026790+dnlggr@users.noreply.github.com>

* review: Update src/components/Send.jsx

Co-authored-by: Daniel <10026790+dnlggr@users.noreply.github.com>

* review: try enhance error message on all 409 errors

Co-authored-by: Daniel <10026790+dnlggr@users.noreply.github.com>
2022-03-07 11:46:20 +01:00
secondl1ght
8415108ddb
docs: fix readme links (#154) 2022-03-04 19:52:34 +01:00
Daniel
ad90d1b754
Run npm install (#151) 2022-03-04 12:12:06 +01:00
Thebora Kompanioni
87299b3268
fix: use own qrcode component to display addresses (#146) 2022-03-03 15:47:27 +01:00
Thebora Kompanioni
41648c4728
chore: check for dependencies in dev setup scripts (#147)
* chore: check for dependencies in dev setup scripts

* chore: fix some shellcheck warnings in setup scripts

* chore: fix SC2155 shellcheck warnings
2022-03-03 14:16:21 +01:00
Thebora Kompanioni
57a563e97c
fix: fix tests after rename of app to Jam (#148) 2022-03-03 13:56:00 +01:00
Daniel
1343271c64
refactor: rename to Jam (#131)
* refactor: dry up app layout (#126)

* Rename and update readme

* Fix typos

* Run npm install

* Use html for header

* Update package name

* Add back alt texts

* Update title

* Add note about buggy raspiblitz

* Remove raspiblitz gotchas

* Update src/components/App.jsx

Co-authored-by: Max Hillebrand <30683012+MaxHillebrand@users.noreply.github.com>

* Update src/components/Onboarding.jsx

Co-authored-by: Max Hillebrand <30683012+MaxHillebrand@users.noreply.github.com>

* Run prettier

* Update CONTRIBUTING.md

Co-authored-by: d11n <mail@dennisreimann.de>

* Update README.md

Co-authored-by: d11n <mail@dennisreimann.de>

* Fix wording

* Update title

Co-authored-by: Max Hillebrand <30683012+MaxHillebrand@users.noreply.github.com>
Co-authored-by: d11n <mail@dennisreimann.de>
2022-03-03 12:07:45 +01:00
Thebora Kompanioni
90fa57374b
test: add basic test suite (#130)
* 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>
2022-03-03 11:04:31 +01:00
Daniel
07621266ae
docs: update integrations in readme (#144) 2022-03-02 15:57:14 +01:00
d11n
c022c205bb
feat: allow for deployment in subdirectory (#129)
* feat: allow for deployment in subdirectory

* Fix sprite path

* Basepath fix

* Update proxy and websocket paths

* Add nginx for testing deployment in subdirectory

* Update docker/regtest/docker-compose.yml

Co-authored-by: Thebora Kompanioni <theborakompanioni@users.noreply.github.com>

* nginx: Move file and add websocket connection

Co-authored-by: Thebora Kompanioni <theborakompanioni@users.noreply.github.com>
2022-03-02 12:37:29 +01:00
Daniel
4fa0d182a6
docs: update raspiblitz install instructions (#143) 2022-03-02 11:49:37 +01:00
secondl1ght
1852eca5c9
feat: remove privacy levels on receive screen in magic mode (#141) 2022-03-02 11:25:05 +01:00
Thebora Kompanioni
7fb425fd48
fix: add bottom spacing to onboarding screen (#128)
* fix: add bottom spacing to onboarding screen

* Update src/components/App.jsx

Co-authored-by: Daniel <10026790+dnlggr@users.noreply.github.com>

Co-authored-by: Daniel <10026790+dnlggr@users.noreply.github.com>
2022-02-28 18:27:21 +01:00
Thebora Kompanioni
03e58c9059
feat: readd websocket connection (#122)
* 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>
2022-02-28 13:23:44 +01:00
Thebora Kompanioni
bb186fdf54
Revert "feat: allow for deployment in subdirectory (#124)" (#127)
This reverts commit 4a3b16847e.
2022-02-28 13:21:57 +01:00
d11n
4a3b16847e
feat: allow for deployment in subdirectory (#124)
* feat: allow for deployment in subdirectory

* Fix sprite path
2022-02-28 10:37:31 +01:00
Daniel
539175e096
refactor: dry up app layout (#126) 2022-02-25 12:12:28 +01:00
Daniel
198a741a4e
fix: set state on mounted component only (#125) 2022-02-23 18:15:29 +01:00
d11n
d4c7a49d5d
fix: react classname markup (#123) 2022-02-23 13:00:50 +01:00