-
Notifications
You must be signed in to change notification settings - Fork 13
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
feat: integrate v1 endpoints with fe #73
base: staging
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR integrates v1 endpoints with the frontend, updating API calls and related state management across multiple files. The changes primarily affect the useAppInit and useClaim hooks, the api service, and the latestBlockInfo store.
- Removed
fetchLatestBlockhash
function and related state, simplifying code structure inhooks/useAppInit.ts
- Updated API endpoints in
services/api.ts
to include '/v1/' in the path for all relevant API calls - Modified
ethHead
object instores/lastestBlockInfo.ts
to includeblockNumber
andblockHash
, removing separatelatestBlockhash
property - Adjusted
useClaim
hook inhooks/useClaim.ts
to useethHead.blockHash
instead oflatestBlockhash.blockHash
for fetching account storage proofs
4 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings
hooks/useAppInit.ts
Outdated
const ethHead = await fetchEthHead(); | ||
setEthHead(ethHead.data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Consider adding error handling for the case where ethHead.data is undefined
hooks/useAppInit.ts
Outdated
const avlHead = await fetchAvlHead(api); | ||
setAvlHead(avlHead.data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Consider adding error handling for the case where avlHead.data is undefined
blockNumber: number, | ||
blockHash: string, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: consider using consistent semicolon usage (lines 9 and 10 have commas, others use semicolons)
No description provided.