Skip to content

Commit

Permalink
feat: remove fetch gauge working balance if no staked shares (#3640)
Browse files Browse the repository at this point in the history
  • Loading branch information
alter-eggo authored Jul 6, 2023
1 parent dd409e1 commit 00dff9e
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const shouldShowWarningAlert = ref(false);
const showCheckpointModal = ref(false);
const { networksSyncState, getGaugeWorkingBalance } = useCrossChainSync();
const { hasNonPrefGaugeBalance, poolGauges } = usePoolStaking();
const { hasNonPrefGaugeBalance, poolGauges, stakedShares } = usePoolStaking();
const { networkId } = useNetwork();
const { isMismatchedNetwork } = useWeb3();
Expand Down Expand Up @@ -64,6 +64,11 @@ async function setWarningAlertState() {
if (isMismatchedNetwork.value) {
return;
}
if (Number(stakedShares.value) === 0) {
return;
}
const id = poolGauges.value?.pool.preferentialGauge.id;
if (!id) {
Expand Down

1 comment on commit 00dff9e

@vercel
Copy link

@vercel vercel bot commented on 00dff9e Jul 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.