Skip to content
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

Open
wants to merge 4 commits into
base: staging
Choose a base branch
from

Conversation

abheektripathy
Copy link
Member

No description provided.

Copy link

vercel bot commented Oct 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
bridge-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 7, 2024 1:48pm

Copy link

@greptile-apps greptile-apps bot left a 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 in hooks/useAppInit.ts
  • Updated API endpoints in services/api.ts to include '/v1/' in the path for all relevant API calls
  • Modified ethHead object in stores/lastestBlockInfo.ts to include blockNumber and blockHash, removing separate latestBlockhash property
  • Adjusted useClaim hook in hooks/useClaim.ts to use ethHead.blockHash instead of latestBlockhash.blockHash for fetching account storage proofs

4 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings

Comment on lines 36 to 37
const ethHead = await fetchEthHead();
setEthHead(ethHead.data);
Copy link

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

Comment on lines 38 to 39
const avlHead = await fetchAvlHead(api);
setAvlHead(avlHead.data);
Copy link

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

Comment on lines +9 to +10
blockNumber: number,
blockHash: string,
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant