Skip to content

Commit

Permalink
web-wallet: Add "Reset Wallet" explanatory copy
Browse files Browse the repository at this point in the history
Resolves #3061
  • Loading branch information
nortonandreev committed Nov 26, 2024
1 parent 0b4d723 commit 8839aad
Show file tree
Hide file tree
Showing 3 changed files with 119 additions and 75 deletions.
3 changes: 3 additions & 0 deletions web-wallet/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Add "Reset Wallet" explanatory copy (Settings) [#3061]

### Changed

- Update Transactions list design [#1922]
Expand Down Expand Up @@ -377,6 +379,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[#3036]: https://github.com/dusk-network/rusk/issues/3036
[#3042]: https://github.com/dusk-network/rusk/issues/3042
[#3056]: https://github.com/dusk-network/rusk/issues/3056
[#3061]: https://github.com/dusk-network/rusk/issues/3061

<!-- VERSIONS -->

Expand Down
38 changes: 23 additions & 15 deletions web-wallet/src/routes/(app)/settings/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -175,22 +175,30 @@
<article class="settings-group">
<header class="settings-group__header">
<Icon path={mdiRestoreAlert} />
<h3 class="h4 settings-group__heading">Danger zone</h3>
<h3 class="h4 settings-group__heading">Reset wallet</h3>
</header>
<ErrorDetails
error={resetError}
summary="An error occurred while resetting the wallet. Please try again."
/>
<Button
className="settings-group__button--state--danger"
disabled={syncStatus.isInProgress}
data-tooltip-disabled={!syncStatus.isInProgress}
data-tooltip-id="main-tooltip"
data-tooltip-text="Not allowed to reset while syncing"
data-tooltip-type="warning"
on:click={handleResetWalletClick}
text="Reset Wallet"
/>
<div class="settings-group__multi-control-content">
<p>
Resetting your wallet clears the cache and restores default settings
without affecting your funds or transaction history. You’ll need your
mnemonic phrase to restore access, so ensure it’s securely stored
before proceeding.
</p>
<ErrorDetails
error={resetError}
summary="An error occurred while resetting the wallet. Please try again."
/>
<Button
className="settings-group__button--state--danger"
disabled={syncStatus.isInProgress}
data-tooltip-disabled={!syncStatus.isInProgress}
data-tooltip-id="main-tooltip"
data-tooltip-text="Not allowed to reset while syncing"
data-tooltip-type="warning"
on:click={handleResetWalletClick}
text="Reset Wallet"
/>
</div>
</article>
</div>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -482,44 +482,55 @@ exports[`Settings > Resetting the wallet > should show an error if clearing loca
<h3
class="h4 settings-group__heading svelte-zikvd5"
>
Danger zone
Reset wallet
</h3>
</header>
<details
class="dusk-error-details dusk-error-details__details"
<div
class="settings-group__multi-control-content svelte-zikvd5"
>
<summary
class="dusk-error-details__summary"
>
An error occurred while resetting the wallet. Please try again.
</summary>
<p>
Resetting your wallet clears the cache and restores default settings
without affecting your funds or transaction history. You’ll need your
mnemonic phrase to restore access, so ensure it’s securely stored
before proceeding.
</p>
<pre
class="dusk-error-details__error"
<details
class="dusk-error-details dusk-error-details__details"
>
Clear data error
<summary
class="dusk-error-details__summary"
>
An error occurred while resetting the wallet. Please try again.
</summary>
<pre
class="dusk-error-details__error"
>
Clear data error
</pre>
</details>
<button
class="dusk-button dusk-button--type--button dusk-button--variant--primary dusk-button--size--default settings-group__button--state--danger"
data-tooltip-disabled="true"
data-tooltip-id="main-tooltip"
data-tooltip-text="Not allowed to reset while syncing"
data-tooltip-type="warning"
type="button"
>
<span
class="dusk-button__text"
</pre>
</details>
<button
class="dusk-button dusk-button--type--button dusk-button--variant--primary dusk-button--size--default settings-group__button--state--danger"
data-tooltip-disabled="true"
data-tooltip-id="main-tooltip"
data-tooltip-text="Not allowed to reset while syncing"
data-tooltip-type="warning"
type="button"
>
Reset Wallet
</span>
</button>
<span
class="dusk-button__text"
>
Reset Wallet
</span>
</button>
</div>
</article>
</div>
</section>
Expand Down Expand Up @@ -1007,26 +1018,37 @@ exports[`Settings > should render the settings page displaying the status of the
<h3
class="h4 settings-group__heading svelte-zikvd5"
>
Danger zone
Reset wallet
</h3>
</header>
<button
class="dusk-button dusk-button--type--button dusk-button--variant--primary dusk-button--size--default settings-group__button--state--danger"
data-tooltip-disabled="true"
data-tooltip-id="main-tooltip"
data-tooltip-text="Not allowed to reset while syncing"
data-tooltip-type="warning"
type="button"
<div
class="settings-group__multi-control-content svelte-zikvd5"
>
<span
class="dusk-button__text"
<p>
Resetting your wallet clears the cache and restores default settings
without affecting your funds or transaction history. You’ll need your
mnemonic phrase to restore access, so ensure it’s securely stored
before proceeding.
</p>
<button
class="dusk-button dusk-button--type--button dusk-button--variant--primary dusk-button--size--default settings-group__button--state--danger"
data-tooltip-disabled="true"
data-tooltip-id="main-tooltip"
data-tooltip-text="Not allowed to reset while syncing"
data-tooltip-type="warning"
type="button"
>
Reset Wallet
</span>
</button>
<span
class="dusk-button__text"
>
Reset Wallet
</span>
</button>
</div>
</article>
</div>
</section>
Expand Down Expand Up @@ -1514,26 +1536,37 @@ exports[`Settings > should render the settings page displaying the status of the
<h3
class="h4 settings-group__heading svelte-zikvd5"
>
Danger zone
Reset wallet
</h3>
</header>
<button
class="dusk-button dusk-button--type--button dusk-button--variant--primary dusk-button--size--default settings-group__button--state--danger"
data-tooltip-disabled="true"
data-tooltip-id="main-tooltip"
data-tooltip-text="Not allowed to reset while syncing"
data-tooltip-type="warning"
type="button"
<div
class="settings-group__multi-control-content svelte-zikvd5"
>
<span
class="dusk-button__text"
<p>
Resetting your wallet clears the cache and restores default settings
without affecting your funds or transaction history. You’ll need your
mnemonic phrase to restore access, so ensure it’s securely stored
before proceeding.
</p>
<button
class="dusk-button dusk-button--type--button dusk-button--variant--primary dusk-button--size--default settings-group__button--state--danger"
data-tooltip-disabled="true"
data-tooltip-id="main-tooltip"
data-tooltip-text="Not allowed to reset while syncing"
data-tooltip-type="warning"
type="button"
>
Reset Wallet
</span>
</button>
<span
class="dusk-button__text"
>
Reset Wallet
</span>
</button>
</div>
</article>
</div>
</section>
Expand Down

0 comments on commit 8839aad

Please sign in to comment.