diff --git a/rusk-wallet/CHANGELOG.md b/rusk-wallet/CHANGELOG.md index 14baa939b..e5f8a4de1 100644 --- a/rusk-wallet/CHANGELOG.md +++ b/rusk-wallet/CHANGELOG.md @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Change dependency declaration to not require strict equal [#3405] +### Fix + +- Fix wrong lower limit for stake operation when performing topup [#3394] + ## [0.1.0] - 2025-01-20 ### Add @@ -42,6 +46,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix stake info for inactive stakes with rewards [#2766] - Fix Moonlight stake reward withdrawal [#2523] + [#3405]: https://github.com/dusk-network/rusk/issues/3405 [#3263]: https://github.com/dusk-network/rusk/issues/3263 @@ -63,6 +68,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [#2396]: https://github.com/dusk-network/rusk/issues/2396 [#2340]: https://github.com/dusk-network/rusk/issues/2340 [#2288]: https://github.com/dusk-network/rusk/issues/2288 +[#3394]: https://github.com/dusk-network/rusk/issues/3394 [Unreleased]: https://github.com/dusk-network/rusk/compare/rusk-wallet-0.1.0...HEAD diff --git a/rusk-wallet/src/bin/interactive/command_menu.rs b/rusk-wallet/src/bin/interactive/command_menu.rs index 53a8edf1f..7eb58b465 100644 --- a/rusk-wallet/src/bin/interactive/command_menu.rs +++ b/rusk-wallet/src/bin/interactive/command_menu.rs @@ -169,10 +169,8 @@ pub(crate) async fn online( .public_key(stake_idx) .expect("public key to exists in interactive mode"); - let mut has_stake = match wallet.check_stake_exists(stake_pk) { - Ok(x) => x, - Err(_) => false, - }; + let has_stake = + wallet.check_stake_exists(stake_pk).await.unwrap_or(false); let owner = match wallet.find_stake_owner_account(stake_pk).await { Ok(account) => account, diff --git a/rusk-wallet/src/wallet/transaction.rs b/rusk-wallet/src/wallet/transaction.rs index b2efaa42e..4ea4b3645 100644 --- a/rusk-wallet/src/wallet/transaction.rs +++ b/rusk-wallet/src/wallet/transaction.rs @@ -741,7 +741,7 @@ impl Wallet { &self, stake_pk: &BlsPublicKey, ) -> Result { - let stake = self.state()?.fetch_stake(pk).await?; + let stake = self.state()?.fetch_stake(stake_pk).await?; let exists = if let Some(stake) = stake { stake.amount.is_some()