Skip to content

Commit

Permalink
Merge pull request #1167 from interlay/fix/additional-staking-validat…
Browse files Browse the repository at this point in the history
…ion-check

fix: apply patch (change committed to wrong branch)
  • Loading branch information
tomjeatt authored Apr 28, 2023
2 parents 5f4f917 + 6e092be commit 5fa73bf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pages/Staking/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ const Staking = (): JSX.Element => {
handleSubmit,
watch,
reset,
formState: { errors, isValid },
formState: { errors, isValid, isValidating },
trigger,
setValue
} = useForm<StakingFormData>({
Expand Down Expand Up @@ -312,11 +312,11 @@ const Staking = (): JSX.Element => {
);

React.useEffect(() => {
if (!isValid) return;
if (!estimatedRewardAmountAndAPYRefetch) return;
if (isValidating || !isValid) return;

estimatedRewardAmountAndAPYRefetch();
}, [isValid, monetaryLockingAmount, blockLockTimeExtension, estimatedRewardAmountAndAPYRefetch]);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isValid, isValidating, monetaryLockingAmount, blockLockTimeExtension]);

React.useEffect(() => {
if (!lockTime) return;
Expand Down

2 comments on commit 5fa73bf

@vercel
Copy link

@vercel vercel bot commented on 5fa73bf Apr 28, 2023

Choose a reason for hiding this comment

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

@vercel
Copy link

@vercel vercel bot commented on 5fa73bf Apr 28, 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.