Skip to content

test: prevent currency removal from orphaning active escrows#1793

Open
brentthomas248 wants to merge 1 commit into
QuickLendX:mainfrom
brentthomas248:test/currency-removal-active-escrow
Open

test: prevent currency removal from orphaning active escrows#1793
brentthomas248 wants to merge 1 commit into
QuickLendX:mainfrom
brentthomas248:test/currency-removal-active-escrow

Conversation

@brentthomas248

Copy link
Copy Markdown

Closes #1709

Summary:

  • reject currency whitelist removals and set replacements that would remove a currency with a nonzero held-escrow reserve
  • add a regression proving removal is rejected while escrow is held and succeeds after refund releases the reserve
  • carry current-toolchain CI/test repairs needed for upstream main to compile and run under the current Soroban/Rust toolchain

Verification:

  • cargo test -p quicklendx-contracts remove_currency_rejects_active_held_escrow_and_allows_after_refund -- --nocapture
  • cargo test --verbose
  • cargo clippy -p quicklendx-contracts --all-targets -- -D warnings
  • quicklendx-contracts/scripts/check-wasm-size.sh
  • cargo llvm-cov --lib --lcov --output-path coverage/lcov.info && ADMIN_COVERAGE_MIN=40 bash scripts/check-admin-coverage.sh coverage/lcov.info
  • git diff --check

Note:

  • cargo fmt --check is blocked by an existing malformed legacy test module: quicklendx-contracts/src/test_max_invoices_per_business.rs has an unclosed delimiter. Touched files were formatted directly with rustfmt --config skip_children=true where needed.

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.

Add a security regression proving currency removal cannot orphan an in-flight escrow denominated in that currency

1 participant