Frontend SDK: Enhance useLockups React Hook#362
Open
EneGab wants to merge 5 commits into
Open
Conversation
Added a useLockups hook to the React SDK that returns { data, isLoading, error, refetch } with 30-second caching, automatic retry on transient RPC failures, and render optimization � backed by a new getLockupInfo method in the SDK client and 7 unit tests covering error, loading, and cache scenarios.
Closes BCPathway#248
|
@EneGab Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
|
@EneGab please resolve conflicts |
Bumps jest from ^25.0.0 to ^29.7.0 to match ts-jest@29.1.2's peer requirement. Also aligns @types/jest to ^29.5.0, downgrades typescript to ^5.5.0 (ts-jest@29 does not support TypeScript 6), and adds "jest" to tsconfig types so test globals are recognised. Regenerates package-lock.json. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.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.
Summary
Added a useLockups hook to the React SDK that returns { data, isLoading, error, refetch } with 30-second caching, automatic retry on transient RPC failures, and render optimization backed by a new getLockupInfo method in the SDK client and 7 unit tests covering error, loading, and cache scenarios.
Type of Change
Related Issue
Closes #248
Changes Made
Testing
How has this been tested?
cargo test)npm run buildinsdk/)Test commands run:
React hook tests
cd react && npx jest --no-coverage
Result: 7 passed, 7 total