Skip to content

fix: repair merge corruption breaking CI build, fmt, and tests - #214

Open
The-Big-Danny wants to merge 1 commit into
StreamGive:mainfrom
The-Big-Danny:fix/treasury-self-address
Open

The-Big-Danny wants to merge 1 commit into
StreamGive:mainfrom
The-Big-Danny:fix/treasury-self-address

Conversation

@The-Big-Danny

Copy link
Copy Markdown
Contributor

Summary

The merge of main into fix/treasury-self-address left donation-vault in a broken state. Check formatting failed first in CI, which masked several deeper issues underneath:

  • lib.rs: a duplicated/interleaved set_cancel_grace_ledgers definition left an unclosed delimiter; DataKey::CancelGraceLedgers and several Error variants (DepositTooLow, AlreadyPaused, AlreadyUnpaused, SelfStream, StreamCancelled) were declared twice with clashing discriminants, while StreamLimitExceeded, NgoNotVerified, and StreamCounterMissing were referenced by create_stream but missing from the enum entirely. Reconciled into one Error enum with unique discriminants 1-19.
  • test.rs: several tests had their bodies spliced apart by the merge — orphaned event-assertion fragments landed mid-way through unrelated per-donor-limit tests, last_event(&s.env) snapshot calls were dropped ahead of assertions that referenced them, and create_stream_errors_instead_of_defaulting_when_counter_is_missing lost its token mint, causing a token-transfer error to surface as Error::SelfStream by numeric coincidence instead of the intended StreamCounterMissing. Also restored the truncated status_is_queryable_after_cancel_then_further_operations_fail test and fixed set_fee_bps's event assertion to expect "feeset" (what the contract actually emits) instead of "feebps".
  • Cargo.toml: donation-vault depended on the ngo-registry crate directly to get NgoRegistryClient, which pulled ngo-registry's own #[contractimpl] Wasm exports into donation-vault's link unit and collided with identically-named entry points (admin, init, upgrade) at the wasm32v1-none build step — a latent bug never exercised because formatting always failed first. Replaced with a local #[contractclient] interface declaring just the one method create_stream needs, removing the crate dependency entirely.

Test plan

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo doc --workspace --no-deps (with RUSTDOCFLAGS=-D warnings)
  • cargo build --workspace --target wasm32v1-none --release
  • bash scripts/check-wasm-size.sh
  • cargo test --workspace (428 tests across both crates plus doctests, all passing)

🤖 Generated with Claude Code

@drips-wave

drips-wave Bot commented Sep 29, 2026

Copy link
Copy Markdown

Hey @The-Big-Danny! 👋 It looks like this PR isn't linked to any issue.

If this PR is for one of the issues assigned to you as part of a Wave, please link it to ensure your contribution is tracked properly. You can do this by adding a keyword to the PR description (e.g., Closes #123), or by clicking a button below:

Issue Title
#49 Add a view for when a stream will run dry Link to this issue
#87 create_stream allows a deposit that is entirely consumed by the protocol fee Link to this issue

ℹ️ Learn more about linking PRs to issues

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.

2 participants