fix: consolidate create_event to single clean implementation - #147
Merged
manoahLinks merged 2 commits intoMar 29, 2026
Merged
Conversation
…ss-live#78) Renames create_event_with_tiers to create_event (accepting CreateEventParams), removes the redundant individual-param legacy wrapper and unused validate_event_params helper, and completely rewrites the broken test.rs which had unclosed delimiters, duplicate function definitions, orphaned code blocks, and references to the old multi-param API. All 32 tests pass. Closes crowdpass-live#78
|
@jayteemoney 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! 🚀 |
…live#78) Accept withdraw_funds from main, remove validate_event_params dead code, add missing Error variants (EventNotEnded=19, FundsAlreadyWithdrawn=20) and DataKey variants (EventBalance, FundsWithdrawn, Waitlist) that were referenced but never declared in the upstream merge. Fix purchase_tickets to use the escrow model (transfer to contract address, track EventBalance) so withdraw_funds and claim_refund work correctly. Add try_promote_from_waitlist stub to satisfy the call site in withdraw_funds. Align test style with origin/main (try_* + assert pattern) and fix the broken test_withdraw_funds_double_withdrawal that was testing join_waitlist instead. All 39 tests pass.
jayteemoney
force-pushed
the
fix/malformed-create-event
branch
from
March 28, 2026 21:39
a595f72 to
77be07a
Compare
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.
Summary
create_event_with_tiers→create_event(acceptingCreateEventParamsstruct) as the single canonical entry pointcreate_event(organizer, theme, ...)individual-param wrapper that duplicated logicvalidate_event_paramshelper that was never calledpurchase_ticketsindentation (3-space → 4-space)test.rs: fixes unclosed delimiters, removes duplicatefn setupdefinition, removes orphanedfn create_sample_event, removes duplicatetest_create_event, fixes all tests that used the old individual-param API, and fixes broken test bodies with undefined variablesTest plan
cargo test -p event_manager— 32 tests, 0 failurescargo build— compiles cleanly with no warnings on changed codeCloses #78