Commit graph

676 commits

Author SHA1 Message Date
Thebora Kompanioni
a98317b344
fix: encode wallet name param in url path (#389) 2022-07-11 13:56:50 +02:00
Thebora Kompanioni
e0f51faacb
fix: do not show FB create form when maker is running (#384)
* fix: do not show FB create form when maker is running

* fix: spacing

Co-authored-by: Daniel <10026790+dnlggr@users.noreply.github.com>
2022-07-08 11:24:32 +02:00
Daniel
72a3e8cff6
fix: reload utxos after creating a fidelity bond (#380)
* fix: reload utxos after creating a fidelity bondgst

* fix: remove unused import
2022-07-07 15:27:26 +02:00
Daniel
b4590c9be1
fix: change frozen icon (#379) 2022-07-07 13:11:20 +02:00
Thebora Kompanioni
0f7d590e35
fix: don not show expired fidelity bonds as locked (#378)
* refactor: move 'isLocked' from BalanceSummary to fb.utils

* fix: do not display 'locked' label for expired FB in utxo selector
2022-07-07 12:54:03 +02:00
Thebora Kompanioni
23f7383551
fix: pass body of confirm modal via child node (#377) 2022-07-07 12:01:37 +02:00
Thebora Kompanioni
21757e9588
fix: link to new fidelity bonds form in Cheatsheet component (#376) 2022-07-07 11:53:53 +02:00
Daniel
8608329f3e
feat: move fidelity bonds to earn screen (#361)
* feat: move fidelity bonds to earn screen

* feat: error handling

* fix: dark mode

* fix: consolidate old code

* fix: selection box ui

* fix: dark mode fix

* fix: remove cj-out testing rig

* fix: typos

Co-authored-by: Gigi <109058+dergigi@users.noreply.github.com>

* review: resuse settings from parent

* review: hide balance on existing fidelity bond

* review: clear alerts on successful requests

* review: do not compress selection box

* review: fix promise code

Co-authored-by: Gigi <109058+dergigi@users.noreply.github.com>
2022-07-06 14:54:19 +02:00
Thebora Kompanioni
004262deae
refactor: pass body of ConfirmModal as child node instead of parameter (#358)
* ui: harmonize modal button colors

* refactor: ConfirmModal from jsx to tsx

also use 'children' child node instead of 'body' property

* ui: remove border of buttons in footer of ConfirmModal

* Revert "ui: harmonize modal button colors"

This reverts commit c40b53007e.

* Revert "ui: remove border of buttons in footer of ConfirmModal"

This reverts commit 8ddd95eaf2.
2022-07-04 15:55:43 +02:00
Thebora Kompanioni
5796317294
ui: min-width for jar balances (#360) 2022-07-04 15:52:35 +02:00
Thebora Kompanioni
e3083b9c8b
fix: disable 'create wallet' link when unlocking wallet (#334)
* refactor: move lock/unlock wallet api calls from child component to parent

Wallet component should not make api calls; moved one level higher to Wallets component

* refactor: control Wallet component appearance from parent

* fix: prevent state update on an unmounted component on Settings page

* test: move lock/unlock wallet tests from Wallet.test to Wallets.test

* fix: disable 'create wallet' link when unlocking wallet
2022-06-28 14:39:00 +02:00
Thebora Kompanioni
cac503fb35
refactor: move lock/unlock requests from Wallet to Wallets (#351)
* 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
2022-06-28 13:14:50 +02:00
Gigi
a958ba6d88
chore(release): prepare v0.0.8 (#354) 2022-06-28 11:13:07 +02:00
Thebora Kompanioni
581184d92f
fix: Check preconditions before send request (#349)
* refactor: externalize CoinjoinPrecondition hook

* test: add test for CoinjoinPrecondition

* fix: check collaborative transaction precondition on Send page
2022-06-27 23:55:10 +02:00
Daniel
9fe84c8cda
fix: remove fidelity bond feature flag 2022-06-27 21:25:09 +02:00
Thebora Kompanioni
94d55a5316
ui: Receive screen advances (#347)
* ui: show sat symbol on amount input on Receive screen

* ui: style submit button on Receive screen
2022-06-27 15:49:27 +02:00
Thebora Kompanioni
911177c899
feat(jars): destination jar selector on receive screen (#346)
* feat(jars): display jar selector on receive screen

* ui: show placeholder while balance is loading

* refactor: rename 'account' to 'selectedJarIndex'

* Update src/components/Receive.jsx

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

* Update src/components/Receive.module.css

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

* Update src/components/Receive.module.css

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

* build: format code

* review: show jar selector in normal mode

Co-authored-by: Daniel <10026790+dnlggr@users.noreply.github.com>
2022-06-23 18:17:29 +02:00
Daniel
a08c584f5e
feat(jars): destination jar selector on send screen (#345) 2022-06-23 15:33:51 +02:00
Thebora Kompanioni
c9007f5428
fix: checked state of ToggleSwitch can be controlled by caller (#332)
* fix: checked state of ToggleSwitch can be controlled by caller

* review: sane property names for ToggleSwitch component
2022-06-23 12:04:13 +02:00
Thebora Kompanioni
7849862ed8
chore: Use routes where applicable (#333)
* refactor: simplify Wallets component

* fix: use routes instead of hardcoded values in Wallet and CreateWallet
2022-06-21 17:52:40 +02:00
Daniel
01afb88888
feat(jars): add receive shortcut if jar 0 is empty (#344) 2022-06-21 14:25:41 +02:00
Gigi
ff9801cb18
chore(release): prepare v0.0.7 (#335) 2022-06-20 10:32:09 +02:00
Daniel
95b3f09696
feat: make jars interactive (#331) 2022-06-15 18:31:23 +02:00
Thebora Kompanioni
c68e4c5c64
feat: basic fidelity bonds (#307)
* 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>
2022-06-15 15:17:51 +02:00
Daniel
9d0021287f
feat: improve wallet control in settings (#325)
* feat: add lock and new wallet controls
2022-06-15 13:33:01 +02:00
Daniel
f5e822743e
fix: styles (#329) 2022-06-15 12:44:21 +02:00
Daniel
216100a3b9
feat: first draft of jars on main wallet screen (#324)
* feat: add simple jar breakdown of wallet

* feat: add collapsible container for jars
2022-06-14 12:52:48 +02:00
Thebora Kompanioni
6f9953fa21
ui: Wallet Detail Overlay (#241)
* refactor: DisplayBranch from jsx to tsx

* ui: improve DisplayAccountsOverlay on mobile screens

* ui: show derivation path below branch title

* ui: abbreviate hd path in DisplayBranch component

* ui: add copy functionality to DisplayBranch

* ui: branches as accordion in DisplayAccountsOverlay

Co-authored-by: Daniel <10026790+dnlggr@users.noreply.github.com>
2022-06-14 11:07:15 +02:00
Daniel
53c88ce45a
ui: tab dividers (#321)
* ui: tab dividers

* fix: hide dividers on mobile
2022-06-10 09:38:09 +02:00
Gigi
da99a3e5ea
feat(navbar): remove wallets item (#316)
* feat(navbar): remove wallets item

Resolves #315

* feat(navbar): remove wallets item i18n strings
2022-06-09 17:12:26 +02:00
Gigi
d5fa5413b2
chore: pre-alpha -> beta (#313)
* chore: pre-alpha -> alpha

* alpha software -> beta software

* an alpha stage -> a beta stage

* alpha -> beta

* setShowAlphaWarning -> setShowBetaWarning

* showAlphaWarning -> showBetaWarning

* Revert Trans i18nKey
2022-06-09 16:57:43 +02:00
Daniel
ed03476766
feat: add share button to receive screen (#310) 2022-06-09 16:01:16 +02:00
Daniel
8f62a42302
fix: mobile layout issues (#311)
* fix: footer alignment

* fix: page titles

* fix: top padding on mobile

* fix: cheatsheet height

* linter: remove unused import
2022-06-09 15:52:03 +02:00
Thebora Kompanioni
e2d030e2b0
ui: Settings screen according to figma (#296)
* fix: align text in buttons on Settings screen

* fix: buttons and dropdowns should have same look and feel

* ui: add section titles 'Wallet' and 'Community' to settings page

* fix: open link to translation help page in new tab

* ui: add plus symbol to 'Create new wallet' button

Co-authored-by: Daniel <10026790+dnlggr@users.noreply.github.com>
2022-06-07 17:39:35 +02:00
Thebora Kompanioni
73078bf8e3
ui: Earn screen figma alignment (#304)
* ui: show config options on Earn screen only in advanced mode

* refactor: externalize AdvancedModeToggleButton component to own file

* refactor: ToggleSwitch from jsx to tsx

* refactor: pass api result down the promise chain on Earn page

* ui: center offertype toggle switch on Earn page

* ui: ability to add an 'off' label and subtitle to ToggleSwitch

* ui: add label to off state of offertype toggle switch on Earn page

* ui: add individual 'simple/advanced view' toggle to Earn screen

* ui: add prefix to inputs on Earn page

* fix: do not populate fee rel with zero when no input is given

* refactor: move styles for Earn page from global to module file

* Revert "ui: ability to add an 'off' label and subtitle to ToggleSwitch"

This reverts commit 04edc2914e.

* Revert "ui: add label to off state of offertype toggle switch on Earn page"

This reverts commit 3142131e47.

* Revert "ui: add individual 'simple/advanced view' toggle to Earn screen"

This reverts commit 0f850f3e28.

* Revert "refactor: externalize AdvancedModeToggleButton component to own file"

This reverts commit 6bf5445265.

* dev: move styles for Receive screen to module

* review: replace toggle with 'advanced' form dropdown in Earn screen

* review: add RadioTabs component

* review: use RadioTabs for offertype on Earn screen

* fix: title in RadioTab

* feedback: style updates

* feedback: rename control element

Co-authored-by: Daniel <10026790+dnlggr@users.noreply.github.com>
2022-06-07 11:19:21 +02:00
Thebora Kompanioni
69c4211b82
feat: enable report overlay (#305) 2022-06-06 13:14:12 +02:00
Thebora Kompanioni
141fb0c2b3
docs: update dev setup readme (#306) 2022-06-06 11:21:39 +02:00
Thebora Kompanioni
3b0a772f41
ui: blur Send form if service is running (#301)
* fix: initial loading flag in Send page correctly

* refactor: infer loading state on Send page from initializing and waiting flags

* ui: always blur send page if service is running
2022-06-02 15:10:45 +02:00
Thebora Kompanioni
db4f5ab18a
fix: loading state on Send page (#300)
* fix: initial loading flag in Send page correctly

* refactor: infer loading state on Send page from initializing and waiting flags
2022-06-02 15:00:27 +02:00
Thebora Kompanioni
90932ddabf
Fetch config values only once per wallet session (#299)
* dev: add ServiceConfigContext

* fix: load config values if absent

* dev: only load config vals when needed

* dev: reset service config ref if wallet changed

* dev: export useLoadConfigValue method of config context

* refactor: extract fetch method from ServiceConfigContext
2022-06-02 14:18:41 +02:00
Thebora Kompanioni
bf627e7ce1
fix: prevent unnecessary session requests (#298) 2022-06-02 13:57:12 +02:00
Thebora Kompanioni
9377b33a11
fix: prevent unnecessary wallet info requests (#297) 2022-06-02 13:28:20 +02:00
Thebora Kompanioni
6e67257213
ui: add hint about creating wallet duration (#295) 2022-06-02 13:19:16 +02:00
Thebora Kompanioni
fd954d1c8d
docs: describe 'common flow' in regtest readme (#291) 2022-06-02 13:17:59 +02:00
Thebora Kompanioni
5f9c88f0db
chore: dependencies update (#292)
* chore: update dependencies

 @types/jest       ^27.4.1  →   ^27.5.1
 @types/node      ^17.0.26  →  ^17.0.35
 husky              ^7.0.4  →    ^8.0.1
 i18next          ^21.6.16  →   ^21.8.4
 lint-staged       ^12.4.0  →   ^12.4.2
 react-bootstrap    ^2.3.0  →    ^2.4.0
 react-i18next    ^11.16.7  →  ^11.16.9
 typescript         ^4.6.3  →    ^4.7.2

* test: patch window.matchMedia in test setup

* chore: remove unused dependency nth-check
2022-06-02 13:16:01 +02:00
Thebora Kompanioni
072c63d011
ui: cheatsheet optimization (#293)
* refactor: more cheatsheet styles to own module

* ui: add tick as last item in cheatsheet

* feat: re-add link to Send screen on cheatsheet
2022-06-01 23:20:31 +02:00
Thebora Kompanioni
3806613a9d
ui: less vertical padding of main container on mobile screens (#303) 2022-06-01 15:23:40 +02:00
secondl1ght
b0c8c4f83c
fix: show balance in unit based on settings on Send screen (#276)
Co-authored-by: Daniel <10026790+dnlggr@users.noreply.github.com>
2022-05-25 12:19:02 +02:00
Thebora Kompanioni
28574dd0fb
dev: add useBalanceSummary hook
* dev: add useBalanceSummary hook

* test: add minimal tests for useBalanceSummary hook
2022-05-25 11:53:48 +02:00
Gigi
44d7afebf5
chore(release): prepare v0.0.6 (#289)
* chore(release): prepare v0.0.6

* Update CHANGELOG.md

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

* Update CHANGELOG.md

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

* Update CHANGELOG.md

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

* Update CHANGELOG.md

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

* Update CHANGELOG.md

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

* Update CHANGELOG.md

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

* Update CHANGELOG.md

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

* Update CHANGELOG.md

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

Co-authored-by: Daniel <10026790+dnlggr@users.noreply.github.com>
2022-05-19 15:05:08 +02:00