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(API): Align limits and suggested-fees relayerFeeDetails computations #1198

Merged
merged 10 commits into from
Sep 10, 2024

Conversation

nicholaspai
Copy link
Member

Add the following optional parameters to /limits to make it possible to compute the exact same limits in suggested fees:

  • message
  • recipient
  • relayer
  • amount

This way the /suggested-fees endpoint can query /limits using those parameters so it doesn't need to recompute relayerFeeDetails() which might return very different values.

I believe this also removes the need for relayerFeeDetails to compute the isAmountTooLow boolean anymore.

…ions

Add the following optional parameters to `/limits` to make it possible to compute the exact same limits in suggested fees:

- message
- recipient
- relayer
- amount

This way the `/suggested-fees` endpoint can query `/limits` using those parameters so it doesn't need to recompute `relayerFeeDetails()` which might return very different values.

I believe this also removes the need for `relayerFeeDetails` to compute the `isAmountTooLow` boolean anymore.
Copy link

vercel bot commented Sep 6, 2024

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

Name Status Preview Comments Updated (UTC)
app-frontend-v3 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 9, 2024 2:58pm
sepolia-frontend-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 9, 2024 2:58pm

@nicholaspai
Copy link
Member Author

This might slow down suggested-fees too much since limits won't be cached nearly as much (if at all)

Copy link
Contributor

@dohaki dohaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice stuff 👍 Left one remark regarding missing field in the limits response

api/limits.ts Show resolved Hide resolved
api/suggested-fees.ts Show resolved Hide resolved
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.

2 participants