Major fixes: 1. Remove invalid received→expired transition - Payments that reach 'received' state cannot expire - Only pending payments can expire - Updated VALID_TRANSITIONS and tests accordingly 2. Rename STATUS_DOUBLEPAY_REFUND to STATUS_DOUBLEPAY_REFUNDED - Maintains consistency with all other past-tense status names - Updated all references across codebase and tests 3. Add INITIAL_WAITING_STATUSES semantic group - Groups states that are entry points: pending, latepay_refunded, doublepay_refunded - These states don't transition from 'received' - they represent initial states - Added is_initial_waiting_state() helper method 4. Update semantic groups - Removed latepay_refunded and doublepay_refunded from FAILED_PAYMENT_STATUSES - These are now in INITIAL_WAITING_STATUSES as they represent entry points 5. Fix mermaid diagram label - confirmed_overpay_not_refunded now correctly labeled as "Terminal Success (Not Refunded)" - Remove invalid received→expired transition from documentation This improves the logical consistency of the state machine and aligns the naming conventions across all status constants. |
||
|---|---|---|
| .. | ||
| crypto-payments-state-machine.md | ||
| CRYPTO.rst | ||
| CRYPTO_PROBLEMS.rst | ||
| CRYPTO_WATCHER_FLOW.md | ||
| DOGECOIN.md | ||
| MONERO.rst | ||
| MONERO_DEFECTS.rst | ||
| MONERO_DOOM.rst | ||