Skip to content

fix(stake): make multi-target stake add fee-aware#915

Open
bitloi wants to merge 2 commits intolatent-to:stagingfrom
bitloi:fix/issue-914-fee-aware-stake-plan
Open

fix(stake): make multi-target stake add fee-aware#915
bitloi wants to merge 2 commits intolatent-to:stagingfrom
bitloi:fix/issue-914-fee-aware-stake-plan

Conversation

@bitloi
Copy link
Copy Markdown
Contributor

@bitloi bitloi commented Apr 8, 2026

Closes #914

stake add was planning multi-target amounts from wallet balance without reserving extrinsic fees. In batch mode (batch_all), that could make one operation unaffordable and revert the whole batch.
This change makes planning fee-aware before submit:

  • estimate fees per operation during planning
  • reserve fees in stake_all allocation
  • abort early when total required (stake + fees) exceeds balance

This keeps the plan realistic and avoids avoidable batch failures.

@bitloi bitloi changed the base branch from staging to main April 8, 2026 20:50
@bitloi bitloi changed the base branch from main to staging April 8, 2026 20:50
@bitloi
Copy link
Copy Markdown
Contributor Author

bitloi commented Apr 8, 2026

Ready for review!

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.

1 participant