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

Wait for pool-staking to finish loading before allowing unstaking #3851

Merged
merged 1 commit into from
Aug 3, 2023

Conversation

timjrobinson
Copy link
Contributor

Description

In https://balancer-labs.sentry.io/issues/4366114128/events/cd83eac018dc40009a09ddbe5d07ee25/ the user went to unstake but it errored that there were no gauges available. This is because the poolGaugesQuery was still loading and useStakePreview doesn't wait for it.

This PR makes useStakePreview check if pool-staking is still loading and doesn't allow the BalActionSteps to continue if it is loading.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How should this be tested?

  • Test staking / unstaking pool BPT. It should allow both. It may show loading for longer now than in production because it's waiting for that subgraph query to return, but that's ok.

Checklist:

  • I have performed a self-review of my own code
  • I have requested at least 1 review (If the PR is significant enough, use best judgement here)
  • I have commented my code where relevant, particularly in hard-to-understand areas
  • If package-lock.json has changes, it was intentional.
  • The base of this PR is master if hotfix, develop if not

@vercel
Copy link

vercel bot commented Aug 3, 2023

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

Name Status Preview Updated (UTC)
beta-app-v2 ✅ Ready (Inspect) Visit Preview Aug 3, 2023 8:30am
1 Ignored Deployment
Name Status Preview Updated (UTC)
app-v2 ⬜️ Ignored (Inspect) Aug 3, 2023 8:30am

@garethfuller garethfuller merged commit 415f060 into develop Aug 3, 2023
4 checks passed
@garethfuller garethfuller deleted the await-gauge-loading branch August 3, 2023 10:34
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.

3 participants