-
Notifications
You must be signed in to change notification settings - Fork 3
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
Permit fails when token contract returns unexpected "version" #5
Comments
Hey, thanks for the bug report. I agree with your proposed solution - would you like to submit a PR? Cheers! |
Will do when I get a minute in the next week or so! |
@vacekj - I don't have write access to push up my branch and submit my PR, but I
How does that look? Do you wanna open up access or feel free to just use code above if it looks good to you. |
@dpekar thanks for the suggestion, that looks good to me. You can fork the repo and submit a PR from your fork |
hey @vacekj - do you mind to push an updated version up to npm? thanks! |
When using
wagmi-permit
, I noticed my permits were failing when interacting with Balancer contracts.When I looked in a bit closer, I realized that the
version
function on the balancer pool contracts return a json string, obviously used for some other reason:{"name":"WeightedPool","version":4,"deployment":"20230320-weighted-pool-v4"}
The balancer contracts do support permits, but since
wagmi-permit
uses the wrong version, the permits fails.What about adding some simple validation to
versionFromContract
and using "1" unlessversionFromContract
is an integer?The text was updated successfully, but these errors were encountered: