-
Notifications
You must be signed in to change notification settings - Fork 49
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: Migrate GaugesTab to wagmi #258
feat: Migrate GaugesTab to wagmi #258
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
def1779
to
4b577f2
Compare
if(!(props.allowance >= props.amount)) { | ||
await handleTxWagmi(props, { | ||
address: props.vaultAddress, | ||
abi: ['function approve(address _spender, uint256 _value) external'], | ||
functionName: 'approve', | ||
args: [props.contractAddress, props.amount] | ||
}); | ||
} |
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.
Should we first refetch allowance here instead of having it as prop?
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.
Maybe @xgambitox can opinate on this one
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.
We can, just to make sure the approval tx did not fail for any reason, and throw an error if allowance is still not greater than amount
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.
As it is right now, if approval tx fails, the stake tx would be prompted to the user as a possible revert through their wallet UI
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.
Sounds good, created an issue #266
Can add that to the feat/veyfi-gauges-merged branch
Migration looks good. If you want to add Major's suggested change here or in other PR is fine by me |
Nice! Let's do it in the branch with all migrations, want to see it green :) |
Last one; Migrate
GaugesTab
to wagmi, feature branch of #248