-
Notifications
You must be signed in to change notification settings - Fork 302
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix allowance validation when staking in gauges (#3595)
* Revert "Hotfix - remove post validation" * Fix approving BPT spending with Gauges When staking a user must allow a gauge to spend their token. However when we check for user allowances we only check for tokens the vault can spend, not the allowances for gauges. By allowing injecting a spender we can inject the gauge into the spenders list which then fetches allowances for it when then makes it able to correctly tell if the user has allowed the gauge to spend their BPT. This fixes the post approval check always failing when staking BPT. * Fake injectSpender function to avoid onchain calls during unit testing * fix: Don't fetch allowances twice --------- Co-authored-by: Alberto Gualis <[email protected]> Co-authored-by: Gareth Fuller <[email protected]>
- Loading branch information
1 parent
5b0dd80
commit 36436a7
Showing
5 changed files
with
52 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36436a7
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.
Successfully deployed to the following URLs:
beta-app-v2 – ./
beta-app-v2-git-develop-balancer.vercel.app
beta-app-v2.vercel.app
beta-app-v2-balancer.vercel.app
beta.balancer.fi