Skip to content

Commit

Permalink
feat: don't refetch approval/stake fees when mutation is pending (#6989)
Browse files Browse the repository at this point in the history
* feat: don't refetch approval/stake fees when mutation is pending

* feat: cherry-pick invalidateQueries safety bits
  • Loading branch information
gomesalexandre committed May 27, 2024
1 parent 458d069 commit e942f59
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/pages/RFOX/components/Stake/StakeConfirm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -439,9 +439,6 @@ export const StakeConfirm: React.FC<StakeConfirmProps & StakeRouteProps> = ({
await handleStake() // This isn't a mistake - we invalidate as a cleanup operation before unmount to avoid current subscribers refetching with wrong args, hence making invalidation useless
history.push(StakeRoutePaths.Status)

history.push(StakeRoutePaths.Status)

// This isn't a mistake - we invalidate as a cleanup operation before unmount to avoid current subscribers refetching with wrong args, hence making invalidation useless
await queryClient.invalidateQueries({ queryKey: userStakingBalanceOfCryptoBaseUnitQueryKey })
await queryClient.invalidateQueries({ queryKey: newContractBalanceOfCryptoBaseUnitQueryKey })
}, [
Expand Down

0 comments on commit e942f59

Please sign in to comment.