Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rusk-wallet: Fix stake lower limit when performing topup #3431

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Daksh14
Copy link
Contributor

@Daksh14 Daksh14 commented Jan 27, 2025

Closes #3394

Copy link
Member

@herr-seppia herr-seppia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to the comments, remember to update the CHANGELOG

rusk-wallet/src/bin/io/prompt.rs Outdated Show resolved Hide resolved
rusk-wallet/src/bin/interactive/command_menu.rs Outdated Show resolved Hide resolved
let owner = match wallet.find_stake_owner_account(stake_pk).await {
Ok(account) => account,
Ok(account) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having a stake owner is not enough to know if there is a stake amount

Indeed, if the user has no stake but still has rewards to withdraw, this match will incorrectly results in "has_stake=true"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@herr-seppia I fixed this check please check again

@Daksh14 Daksh14 requested a review from herr-seppia January 29, 2025 18:25
@Daksh14 Daksh14 force-pushed the rusk-wallet-topup-fix branch 2 times, most recently from a9cccd7 to 611a4aa Compare January 29, 2025 19:28
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rusk-wallet uses the parent Cargo.lock, please remove this file

rusk-wallet/src/bin/interactive/command_menu.rs Outdated Show resolved Hide resolved
rusk-wallet/src/bin/io/prompt.rs Outdated Show resolved Hide resolved
rusk-wallet/src/bin/io/prompt.rs Outdated Show resolved Hide resolved
rusk-wallet/src/bin/io/prompt.rs Outdated Show resolved Hide resolved
@Daksh14 Daksh14 force-pushed the rusk-wallet-topup-fix branch 2 times, most recently from 3ff836d to a46c867 Compare January 31, 2025 18:11
@Daksh14 Daksh14 requested a review from herr-seppia January 31, 2025 18:12
herr-seppia
herr-seppia previously approved these changes Jan 31, 2025
Copy link
Member

@herr-seppia herr-seppia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Daksh14 Daksh14 force-pushed the rusk-wallet-topup-fix branch from a0abca5 to 612b643 Compare January 31, 2025 18:22
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete this file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rusk-wallet: Cannot top up stake due to impossible min/max range
2 participants