Skip to content

fix: map governance failures to typed error (#482) - #678

Open
Hikmaholadele wants to merge 4 commits into
Betta-Pay:mainfrom
Hikmaholadele:fix/issue-482-governance-failure-typed-error
Open

fix: map governance failures to typed error (#482)#678
Hikmaholadele wants to merge 4 commits into
Betta-Pay:mainfrom
Hikmaholadele:fix/issue-482-governance-failure-typed-error

Conversation

@Hikmaholadele

Copy link
Copy Markdown
Contributor

Summary

Fix validate_fee_against_governance so governance invocation failures return the typed GovernanceCallFailed error instead of causing an unqualified host panic.

Changes

  • Wrapped governance invocation with typed error handling.
  • Added a regression test for a failing governance contract.
  • Documented the read/write governance failure semantics.

Validation

  • cargo fmt --all -- --check
  • cargo test --workspace

Closes #482

@drips-wave

drips-wave Bot commented Aug 28, 2026

Copy link
Copy Markdown

@Hikmaholadele Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

…min_tests

Replace assert_eq!(client.is_paused(), true, ...) with assert!(client.is_paused(), ...)
to satisfy clippy::bool_assert_comparison. Run cargo fmt --all for workspace formatting.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
@Hikmaholadele

Copy link
Copy Markdown
Contributor Author

Hi, this workflow is currently waiting for maintainer approval. Could you please approve it so the workflow can proceed? Thank you.

Hikmaholadele and others added 2 commits August 31, 2026 09:13
Fix compilation errors from API changes merged from main:
- Add missing deployer parameter to init() calls in settlement and governance tests
- Fix _env/env variable naming mismatch in governance tests
- Fix soroban_sdk::vec! macro syntax in governance tests
- Add missing executor parameter to execute() calls in timelock tests
- Import GovernanceContract/GovernanceContractClient from governance_contract
- Add missing Symbol/Events imports for test assertions
- Fix governance FeeConfig type reference
- Remove unused imports and prefix unused variables with underscore
- Apply cargo fmt formatting across workspace

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
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.

validate_fee_against_governance hard-fails with an unqualified panic on governance hiccup

1 participant