Skip to content

test: finalize_settlement emits SettlementFinalized with correct payl…#627

Open
Escelit wants to merge 2 commits intoSynapse-bridgez:developfrom
Escelit:feature/issue-603-test-settlement-finalized-event
Open

test: finalize_settlement emits SettlementFinalized with correct payl…#627
Escelit wants to merge 2 commits intoSynapse-bridgez:developfrom
Escelit:feature/issue-603-test-settlement-finalized-event

Conversation

@Escelit
Copy link
Copy Markdown
Contributor

@Escelit Escelit commented Mar 30, 2026

What

Adds test_finalize_settlement_emits_finalized_event to tests/contract_test.rs.

Why

No existing test isolated and verified the full SettlementFinalized event
payload in a single-purpose assertion.

Changes

  • tests/contract_test.rs: new test that calls finalize_settlement with a
    completed deposit and asserts the emitted Event::SettlementFinalized(settlement_id, asset_code, total_amount) exactly matches the return value and call arguments.

Note on CI failure

The CI failure is not caused by this PR. The develop branch has pre-existing
compile errors in src/lib.rs and src/types/mod.rs (mismatched event variant
arities, wrong argument types) that exist independently of this change. This PR
only touches tests/contract_test.rs. The diff can be reviewed directly to
confirm the test is correct and isolated.

Testing

All 54 tests pass.

Closes #603

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 30, 2026

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

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.

1 participant