fix(settlement): preserve governance rule fields - #669
Open
Hikmaholadele wants to merge 7 commits into
Open
Conversation
🤖 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>
|
@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! 🚀 |
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>
Contributor
Author
|
Hi, this workflow is currently waiting for maintainer approval. Could you please approve it so the workflow can proceed? Thank you. |
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #484
Summary
Fix governance rule field handling and add regression coverage .
Changes
Closes #484