-
Notifications
You must be signed in to change notification settings - Fork 65
Closed
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave program
Description
Description
The withdraw_refund function exists in both cancellation.rs and bets.rs with slightly different signatures and logic (e.g., SAC safety). This creates two entry points for the same logical operation, leading to confusion for developers and potentially allowing a user to double-refund if the state removal isn't perfectly synchronized across both paths.
Requirements and context
- Consolidate all refund logic into a single internal utility or a dedicated module.
- Ensure only one public entry point exists for user refunds.
Suggested execution
- Fork the repo and create a branch:
git checkout -b refactor/issue-92-refund-unification - Deprecate the redundant function.
Implementation changes
- Move the primary refund logic to
bets.rsand updatecancellation.rsto call it, or remove one entirely.
Test and commit
- Verify that a user cannot successfully call both refund functions for the same bet.
Example commit message
refactor: unify market refund entry points to prevent duplication and double-spend risks
Guidelines
- Modular clear design.
- Timeframe: 24 hours.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave program