diff --git a/web-wallet/CHANGELOG.md b/web-wallet/CHANGELOG.md index 73e800f99..c2fe6b474 100644 --- a/web-wallet/CHANGELOG.md +++ b/web-wallet/CHANGELOG.md @@ -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 @@ -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 diff --git a/web-wallet/src/lib/components/BigIntInput/BigIntInput.svelte b/web-wallet/src/lib/components/BigIntInput/BigIntInput.svelte index 55e5ec05b..a4ac58e4e 100644 --- a/web-wallet/src/lib/components/BigIntInput/BigIntInput.svelte +++ b/web-wallet/src/lib/components/BigIntInput/BigIntInput.svelte @@ -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); diff --git a/web-wallet/src/routes/(app)/settings/+page.svelte b/web-wallet/src/routes/(app)/settings/+page.svelte index c75de6a9a..bfe6f698c 100644 --- a/web-wallet/src/routes/(app)/settings/+page.svelte +++ b/web-wallet/src/routes/(app)/settings/+page.svelte @@ -45,6 +45,7 @@ // eslint-disable-next-line no-alert if (confirm(confirmResetGasMessage)) { settingsStore.resetGasSettings(); + isGasValid = true; } } @@ -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}