Ensure only authorized parties can cancel or withdraw. **Context:** Prevent griefing or theft. Only the `recipient` should withdraw. Only `sender` (or maybe recipient) can cancel. **Independence:** Add checks to existing functions. **Acceptance Criteria:** - [ ] Use `recipient.require_auth()` in withdrawal - [ ] Use `sender.require_auth()` in cancel - [ ] Test unauthorized access failures
Ensure only authorized parties can cancel or withdraw.
Context:
Prevent griefing or theft. Only the
recipientshould withdraw. Onlysender(or maybe recipient) can cancel.Independence:
Add checks to existing functions.
Acceptance Criteria:
recipient.require_auth()in withdrawalsender.require_auth()in cancel