-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fix inverted transaction status logic #1682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
kevintang513
wants to merge
14
commits into
cypress-io:develop
from
kevintang513:fix/transaction-status-logic
Closed
Fix inverted transaction status logic #1682
kevintang513
wants to merge
14
commits into
cypress-io:develop
from
kevintang513:fix/transaction-status-logic
Conversation
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
- Extract notification badge logic from NavBar into standalone NotificationBadge component - Add comprehensive Cypress component tests covering edge cases (negative numbers, large numbers, undefined values) - Preserve existing data-test selector for backward compatibility with E2E tests - Use @mui/material to match existing project dependencies - Remove customBadge styling from NavBar component - All 9 component tests passing including Material-UI Badge behavior verification Co-Authored-By: [email protected] <[email protected]>
Extract NotificationBadge component and add comprehensive tests
…58009691 Revert "Extract NotificationBadge component and add comprehensive tests"
This reverts commit 531adfb.
Simplified allowed-tools from pattern-based permissions to general Bash access to resolve permission issues when running the command. Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Fixed critical bug where payment and request transaction logic was inverted. Payments were incorrectly staying in pending status instead of completing, while requests were being marked complete immediately on creation. Changed createTransaction condition from isRequestTransaction() to isPayment() to correctly process payments (debit/credit/complete) versus requests (pending). All unit tests now passing. Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
|
|
|
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
createTransaction()Changes
File:
backend/database.tsisRequestTransaction(transaction)toisPayment(transaction)Root Cause:
The transaction creation logic was checking for request transactions when it should have been checking for payment transactions. This caused:
pendingstatus (should becomplete)completeimmediately (should bependinguntil accepted)Solution:
Use
isPayment(transaction)instead ofisRequestTransaction(transaction)to properly identify when to:Request transactions correctly skip this logic and remain pending until explicitly accepted via
updateTransactionById().Test Plan
Run unit tests to verify fix:
should create a payment- expects status "complete"should create a request- expects status "pending"Manual testing:
Integration tests should continue to pass:
🤖 Generated with Claude Code