Skip to content

fix(settlement): preserve governance rule fields - #669

Open
Hikmaholadele wants to merge 7 commits into
Betta-Pay:mainfrom
Hikmaholadele:fix/issue-484-governance-rule-fields
Open

fix(settlement): preserve governance rule fields#669
Hikmaholadele wants to merge 7 commits into
Betta-Pay:mainfrom
Hikmaholadele:fix/issue-484-governance-rule-fields

Conversation

@Hikmaholadele

Copy link
Copy Markdown
Contributor

Closes #484
Summary

Fix governance rule field handling and add regression coverage .

Changes

  • Updated the relevant governance rule field documentation comments.
  • Added a regression test covering the affected behavior.

Closes #484

Hikmaholadele and others added 3 commits August 26, 2026 16:22
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
…e-config-validation

Closes Betta-Pay#483
Changes

* Added safe governance fee config parsing with exact 2-field validation.
* Malformed configs now return GovernanceCallFailed instead of an opaque Wasm host trap.
* Updated fee validation and fee rule reading to use the safe helper.
* Added regression tests for malformed 1-field configurations.

Tests

cargo test --workspace — 163 passed, 0 failed.
Document that read_governance_fee_rule intentionally produces
settlement_delay_ledger=0 and auto_settle=false by design — these are
per-merchant operational concerns, not protocol-level governance policy.

Update GovFeeConfig doc comment to explain why it only carries fee data.
Add regression test (governance_fee_rule_conversion_produces_exact_fields)
that verifies the governance→SettlementRule conversion produces the
expected fee amounts and fixed delay/auto_settle fields.

Closes Betta-Pay#484

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

drips-wave Bot commented Aug 26, 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

Hikmaholadele and others added 2 commits August 26, 2026 19:58
Apply pre-existing test compilation fixes that were merged in upstream
PR Betta-Pay#672 but missing from this branch (created before Betta-Pay#672):

- timelock_tests.rs: add missing SettlementContractClient and Env imports
- integration_tests.rs: fix schedule() call to pass Vec<Address> instead
  of bare Address; add #[should_panic] to calculate_fee_split_rejects_amount_zero
- admin_tests.rs: replace assert_eq!(.., true) with assert!(..) for clippy
- real_auth_tests.rs: remove stale try_update_governance call (method
  does not exist on GovernanceContract)

These are all pre-existing compilation/lint failures, not regressions
introduced by Betta-Pay#484.

Closes Betta-Pay#484

🤖 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:10
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/FromVal/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.

read_governance_fee_rule hardcodes settlement_delay_ledger: 0 and auto_settle: false

1 participant