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

feat: import wallet #621

Merged
merged 58 commits into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
879ab6c
chore(regtest): do not build tor locally in regtest env
theborakompanioni Jun 5, 2023
99ff1c5
feat(import): add rescanning param to session request
theborakompanioni Jun 5, 2023
a2a0a0c
feat(api): add rescanblockchain request to JmWalletApi
theborakompanioni Jun 5, 2023
dc319c1
feat: add import wallet button to wallets page
theborakompanioni Jun 12, 2023
faa0087
refactor: externalize component PreventLeavingPageByMistake
theborakompanioni Jul 3, 2023
4c83497
refactor: externalize component WalletCreationForm
theborakompanioni Jul 3, 2023
99fd236
wip: use WalletCreationForm in ImportWallet
theborakompanioni Jul 3, 2023
ea3a3b5
refactor: externalize SeedWordInput and rename to MnemonicWordInput
theborakompanioni Jul 3, 2023
fc1f450
feat(api): add wallet recover request to JmWalletApi
theborakompanioni Jul 3, 2023
ed4a8f7
fix(test): verify import button size
theborakompanioni Jul 3, 2023
202e194
fix(build): remove unused hook from component CreateWallet
theborakompanioni Jul 3, 2023
59c349e
build(deps): bump caniuse-lite to v1.0.30001511
theborakompanioni Jul 3, 2023
8ac3bf8
wip(import): recover walet and start rescan
theborakompanioni Jul 4, 2023
52c26b2
wip(import): start wallet after successful import
theborakompanioni Jul 4, 2023
1ffc3e2
refactor: externalize component WalletCreationConfirmation
theborakompanioni Jul 4, 2023
34ff89c
wip(import): use WalletCreationConfirmation view in component WalletI…
theborakompanioni Jul 4, 2023
3441df9
dev(regtest): add funds to dummy wallet during initialization of loca…
theborakompanioni Jul 5, 2023
6214683
wip(import): externalize rescan to own component
theborakompanioni Jul 9, 2023
b87ccea
dev(regtest): fund address beyond default gaplimit (201st address of …
theborakompanioni Jul 9, 2023
4162908
wip(import): add blockheight input to rescan chain form
theborakompanioni Jul 9, 2023
5c9d266
wip(import): update gaplimit before rescanning chain
theborakompanioni Jul 10, 2023
f001cbb
wip(import): start rescanning chain immediately
theborakompanioni Aug 9, 2023
884cace
wip(import): prevent import if rescan is in progress
theborakompanioni Aug 10, 2023
7a03424
wip(import): ability to customize gaplimit and blockheight
theborakompanioni Aug 10, 2023
b445dca
wip(import): show duration hint when importing wallet
theborakompanioni Aug 10, 2023
2affc71
wip(import): hide sensitive info while importing wallet
theborakompanioni Aug 10, 2023
f8e8dc9
wip(import): reset gaplimit to original value after importing
theborakompanioni Aug 10, 2023
380b2bf
wip(import): input all needed values in single form
theborakompanioni Aug 11, 2023
70187e7
wip(import): add description for blockheight and gaplimit
theborakompanioni Aug 11, 2023
53189b5
wip(import): add back button
theborakompanioni Aug 11, 2023
2220710
wip(import): add cancel button to WalletCreationForm
theborakompanioni Aug 11, 2023
4f6df6d
refactor: externalize component MnemonicPhraseInput
theborakompanioni Aug 11, 2023
bdb7754
wip(import): prevent user from accidentally leaving the page
theborakompanioni Aug 11, 2023
0dbaabe
wip(import): display blockheight and gaplimit as text on confirm page
theborakompanioni Aug 12, 2023
d16e5bd
wip(import): update gaplimit only if necessary
theborakompanioni Aug 13, 2023
e0607ab
wip(import): show rescan button only in dev mode
theborakompanioni Aug 13, 2023
8eb8be2
wip(import): set rescanning service info flag
theborakompanioni Aug 13, 2023
e702246
wip(import): show rescanning indicator on main wallet view
theborakompanioni Aug 13, 2023
56bb845
wip(import): show rescanning indicator in navbar
theborakompanioni Aug 13, 2023
6410da5
wip(import): disable sending when rescanning is in progress
theborakompanioni Aug 13, 2023
4964616
wip(import): disable navbar/earn/jam when rescanning is in progress
theborakompanioni Aug 13, 2023
0de0aa4
wip(import): improve error reporting of wallet import form
theborakompanioni Aug 13, 2023
fa4c410
wip(import): improve rescan page and hide with dev feature flag
theborakompanioni Aug 14, 2023
8b3a47e
Update src/i18n/locales/en/translation.json
theborakompanioni Aug 15, 2023
317714b
fix(import): realign footer position at page bottom
theborakompanioni Aug 16, 2023
8a356ac
fix(import): disable viewing jars on main wallet if rescanning is active
theborakompanioni Aug 16, 2023
e909458
wip(import): prevent creating new address when rescanning
theborakompanioni Aug 16, 2023
0243edb
fix(import): reload wallet info after rescanning finishes
theborakompanioni Aug 17, 2023
caf2dff
refactor: move auto reloading code from WalletContext to WalletInfoAu…
theborakompanioni Aug 17, 2023
2ca4e0d
refactor: remove unused method reloadDisplay
theborakompanioni Aug 17, 2023
81da668
wip(import): reset alert when navigating to previous step
theborakompanioni Aug 17, 2023
0f06fc0
wip(import): reload recursively till balance is found
theborakompanioni Aug 17, 2023
c5362f4
fix(ui): set cursor on unelectable to not-allowed
theborakompanioni Aug 17, 2023
bca5b63
wip(import): improve wording of gaplimit label and rescanning subtitle
theborakompanioni Aug 17, 2023
89a8fa7
wip(import): expand import options by default
theborakompanioni Aug 17, 2023
3224ff9
fix(import): fix param order for recursive wallet reload
theborakompanioni Sep 7, 2023
875ac2e
ui: add 'dev' badge to buttons only visible in dev env
theborakompanioni Sep 7, 2023
ce95273
refactor: remove translation of page rescan chain
theborakompanioni Sep 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(import): disable viewing jars on main wallet if rescanning is active
  • Loading branch information
theborakompanioni committed Aug 28, 2023
commit 8a356acf0657464e5679e54c09ccbdfa013c0a45
4 changes: 2 additions & 2 deletions src/components/MainWalletView.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
height: 2rem;
}

:global(.jm-rescan-in-progress) .dividerButton {
cursor: default;
.jarsDividerContainer .dividerButton:disabled {
cursor: not-allowed;
}

.sendReceiveButton {
Expand Down
14 changes: 8 additions & 6 deletions src/components/MainWalletView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export default function MainWalletView({ wallet }: MainWalletViewProps) {
<rb.Col xs={10} md={8}>
<rb.Row>
<rb.Col>
{/* Always receive on first mixdepth. */}
{/* Always receive to first jar. */}
<ExtendedLink
to={routes.receive}
state={{ account: 0 }}
Expand All @@ -182,8 +182,6 @@ export default function MainWalletView({ wallet }: MainWalletViewProps) {
</ExtendedLink>
</rb.Col>
<rb.Col>
{/* Todo: Withdrawing needs to factor in the privacy levels as well.
Depending on the mixdepth/account there will be different amounts available. */}
<ExtendedLink
to={routes.send}
className={`${styles.sendReceiveButton} btn btn-outline-dark w-100`}
Expand All @@ -198,7 +196,7 @@ export default function MainWalletView({ wallet }: MainWalletViewProps) {
</rb.Row>
</rb.Col>
</rb.Row>
<rb.Collapse in={showJars}>
<rb.Collapse in={!serviceInfo?.rescanning && showJars}>
<rb.Row>
<div className="mb-5">
<div>
Expand All @@ -221,9 +219,13 @@ export default function MainWalletView({ wallet }: MainWalletViewProps) {
<rb.Col xs={showJars ? 12 : 10} md={showJars ? 12 : 8}>
<div className={styles.jarsDividerContainer}>
<hr className={styles.dividerLine} />
<div className={styles.dividerButton} onClick={() => setShowJars((current) => !current)}>
<button
className={styles.dividerButton}
disabled={serviceInfo?.rescanning}
onClick={() => setShowJars((current) => !current)}
>
<Sprite symbol={showJars ? 'caret-up' : 'caret-down'} width="20" height="20" />
</div>
</button>
<hr className={styles.dividerLine} />
</div>
</rb.Col>
Expand Down