diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ea80d9f..fe28d21e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Fix staking address display [#204] + ## [0.19.0] - 2023-09-20 ### Added @@ -426,6 +430,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Implementation of `Store` trait from `wallet-core` - Implementation of `State` and `Prover` traits from `wallet-core` +[#204]: https://github.com/dusk-network/wallet-cli/issues/204 [#182]: https://github.com/dusk-network/wallet-cli/issues/182 [#198]: https://github.com/dusk-network/wallet-cli/issues/198 [#176]: https://github.com/dusk-network/wallet-cli/issues/176 diff --git a/src/clients.rs b/src/clients.rs index b637b8cf..7d18721e 100644 --- a/src/clients.rs +++ b/src/clients.rs @@ -346,6 +346,10 @@ impl StateClient for StateStore { rkyv::from_bytes(&data).map_err(|_| Error::Rkyv)?; self.status("Stake received!"); + let staking_address = pk.to_bytes().to_vec(); + let staking_address = bs58::encode(staking_address).into_string(); + println!("Staking address: {}", staking_address); + let stake = res.ok_or(Error::NotStaked).map( |StakeData { amount, @@ -357,9 +361,6 @@ impl StateClient for StateStore { counter, }, )?; - let staking_address = pk.to_bytes().to_vec(); - let staking_address = bs58::encode(staking_address).into_string(); - println!("Staking address: {}", staking_address); Ok(stake) }