Skip to content

Commit

Permalink
web-wallet: Fix gas settings reset and validation in preferences
Browse files Browse the repository at this point in the history
Resolves #3212
  • Loading branch information
ascartabelli committed Dec 18, 2024
1 parent 341b58e commit c4ec54e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
3 changes: 3 additions & 0 deletions web-wallet/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Fix gas settings reset and validation in preferences [#3212]

## [0.10.0] - 2024-12-17

### Added
Expand Down Expand Up @@ -455,6 +457,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[#3178]: https://github.com/dusk-network/rusk/issues/3178
[#3179]: https://github.com/dusk-network/rusk/issues/3179
[#3203]: https://github.com/dusk-network/rusk/issues/3203
[#3212]: https://github.com/dusk-network/rusk/issues/3212

<!-- VERSIONS -->

Expand Down
3 changes: 2 additions & 1 deletion web-wallet/src/lib/components/BigIntInput/BigIntInput.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
/** @type {bigint} */
export let value = 0n;
let internalValue = value.toString();
/** @type {string} */
let internalValue;
/** @type {(v: bigint, min: bigint, max: bigint) => boolean} */
const isInvalidInput = (v, min, max) => !!(min > v || v > max);
Expand Down
13 changes: 6 additions & 7 deletions web-wallet/src/routes/(app)/settings/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
// eslint-disable-next-line no-alert
if (confirm(confirmResetGasMessage)) {
settingsStore.resetGasSettings();
isGasValid = true;
}
}
Expand Down Expand Up @@ -88,13 +89,11 @@

isGasValid = areValidGasSettings(price, limit);

if (isGasValid) {
settingsStore.update((store) => ({
...store,
gasLimit: limit,
gasPrice: price,
}));
}
settingsStore.update((store) => ({
...store,
gasLimit: limit,
gasPrice: price,
}));
}}
limit={gasLimit}
limitLower={gasLimitLower}
Expand Down

0 comments on commit c4ec54e

Please sign in to comment.