-
Notifications
You must be signed in to change notification settings - Fork 102
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: improve custom hook validation messages #5123
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.
Hey @fairlighteth , sorry to tell you this, but something is not working as expected here:
- I'm not able to open a hook that is running locally:
- When I'm adding https://cow-hooks-dapps-cow-amm-deposit.vercel.app hook link (it is a valid link), the app says that it is blocked by CORS issues
- Some working validations gone missing:
Could you please take a look at all these issues?
…ap into custom-hook-validation
@elena-zh could you try again? The only case I couldn't simulate on my end was the 'wrong chain' scenario. The others seemed correct now. |
}, options.timeout) | ||
|
||
try { | ||
const response = await fetch(url, { signal: controller.signal, ...options }) |
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.
Please, use existing getTimeoutAbortController()
from @cowprotocol/common-utils
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.
Thanks for reviewing. Addressed this now.
…ap into custom-hook-validation
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.
Awesome! thanks for addressing the comments
@@ -0,0 +1,23 @@ | |||
import { getTimeoutAbortController } from '@cowprotocol/common-utils' |
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.
I was suggesting to move it to @cowprotocol/common-utils
, you might want to use this in other front-ends and not just CoW Swap. Anyways, we can always move when needed in other apps if this is adding some overhead
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.
@anxolin I see now it was added to the common-utils but didn't cleanup the older util function. Just pushed a fix for this now.
Summary