Skip to content

Commit

Permalink
Merge pull request #3045 from dusk-network/feature-3036
Browse files Browse the repository at this point in the history
web-wallet: Fix application crash on empty amount (Stake Flow)
  • Loading branch information
nortonandreev authored Nov 22, 2024
2 parents 4e9c716 + 9379871 commit 97c4fa2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions web-wallet/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix edge case in Dusk to Lux conversion [#3032]
- Fix inconsistent terminology usage for "Mnemonic Phrase" [#3035]
- Fix auto-sync not working after restoring a wallet [#3042]
- Fix application crash on empty amount (Stake Flow) [#3036]

## [0.8.0] - 2024-11-19

Expand Down Expand Up @@ -370,6 +371,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[#3028]: https://github.com/dusk-network/rusk/issues/3028
[#3032]: https://github.com/dusk-network/rusk/issues/3032
[#3035]: https://github.com/dusk-network/rusk/issues/3035
[#3036]: https://github.com/dusk-network/rusk/issues/3036
[#3042]: https://github.com/dusk-network/rusk/issues/3042

<!-- VERSIONS -->
Expand Down
2 changes: 1 addition & 1 deletion web-wallet/src/lib/components/Stake/Stake.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
maxSpendable > 0n && minAllowedStake > maxSpendable
? maxSpendable
: minAllowedStake;
$: stakeAmountInLux = duskToLux(stakeAmount);
$: stakeAmountInLux = stakeAmount ? duskToLux(stakeAmount) : 0n;
$: isStakeAmountValid =
stakeAmountInLux >= minStake && stakeAmountInLux <= maxSpendable;
$: totalLuxFee = fee + stakeAmountInLux;
Expand Down

0 comments on commit 97c4fa2

Please sign in to comment.