Skip to content

Fix RBAC storage/recovery, liquidity router pool allowlist, batch payment ID collisions, dispute test coverage - #1040

Merged
martinzhames merged 2 commits into
dupdab:mainfrom
MJigah:fix/contracts-stellar-wave-issues
Sep 1, 2026
Merged

Fix RBAC storage/recovery, liquidity router pool allowlist, batch payment ID collisions, dispute test coverage#1040
martinzhames merged 2 commits into
dupdab:mainfrom
MJigah:fix/contracts-stellar-wave-issues

Conversation

@MJigah

@MJigah MJigah commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Fixes 4 issues assigned to me in the Stellar Program.

Changes

Also fixed

payment_escrow/src/test.rs's setup_env() had unresolved git merge-conflict markers on main and called the contract constructor with the wrong number of arguments on both sides of the conflict — needed a working setup_env() to add the #1023 tests. Left every other pre-existing conflicted test in that file untouched, as that's unrelated to these 4 issues.

Also fixed two latent comparison bugs (Address == &Address type mismatches from misreading Vec::iter()'s item type) introduced while writing the #1025/#1026 fixes, caught before commit.

Closes #1026
Closes #1025
Closes #1024
Closes #1023

…ment ID collisions, and dispute test coverage

- Issue dupdab#1026: Move rbac_access role storage from instance() to persistent();
  add SuperAdmin tracking, block self-revocation, and block removing the
  last SuperAdmin so the contract can't be permanently locked out.
- Issue dupdab#1025: Add an admin-managed pool allowlist to liquidity_router
  (initialize/add_pool/remove_pool) and reject unapproved pool addresses in
  check_and_route before the cross-contract call.
- Issue dupdab#1024: Derive batch_payments payment IDs from merchant + a
  monotonically increasing per-contract counter + payment contents instead
  of ledger sequence + batch index, so IDs can't collide across merchants
  or concurrent batches. Persist PaymentRecord on-chain for auditability.
- Issue dupdab#1023: Document dispute()'s intended behavior after a partial
  release, and add tests covering dispute-after-partial-release resolved
  to both the customer and the merchant.

Closes dupdab#1026 dupdab#1025 dupdab#1024 dupdab#1023
@drips-wave

drips-wave Bot commented Aug 30, 2026

Copy link
Copy Markdown

@MJigah 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

@martinzhames
martinzhames merged commit 3898b4f into dupdab:main Sep 1, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants