Repository navigation
feat: capture isError from useLoans and useRemittances in activity page - #2186
Merged
Merged
Conversation
- Add isError destructuring from useLoans and useRemittances hooks - Show distinct error state with retry on fetch failure instead of silent empty state - Add tests for error state assertion (not empty state)
Malware detection scan flagged this pull requestThe scan found 1 indicator(s) in the PR diff. This PR is blocked until a maintainer reviews the flagged files.
This is an automated triage signal; maintainers must verify whether the finding is malicious or intentional. |
The hidden-appended-config-payload rule matches `Function` case-insensitively on any added line, so the plain `function renderPage()` declaration tripped the PR malware scan. Declare the helper as an arrow function instead. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
The tests set user/authToken/isWalletConnected, fields that do not exist on useWalletStore, so selectIsWalletConnected never saw a connection and all four cases rendered the not-connected screen instead of exercising the page. Set status/address so the connected path is reached, align the errorTitle mock with the asserted copy, and drop the unused selector import. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
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.
PR Summary: Capture isError from useLoans and useRemittances
Changes
1.
frontend/src/app/[locale]/activity/page.tsx(modified)isError: loansErrordestructuring fromuseLoans({ enabled: isConnected })hookisError: remittancesErrordestructuring fromuseRemittances({ enabled: isConnected })hookAlertCircle)AlertCircleimport fromlucide-react2.
frontend/src/app/[locale]/activity/page.test.tsx(new file)Acceptance Criteria
isErrorcaptured from bothuseLoansanduseRemittancesTypecheck
No errors related to the activity page. The changes are type-safe and follow existing code patterns.
Closes #1893
Closes #1894
Closes #1895
Closes #1896