Skip to content

Commit

Permalink
fix(suite): check ref for field to avoid error
Browse files Browse the repository at this point in the history
(cherry picked from commit 5481a4b)
  • Loading branch information
marekrjpolak authored and vdovhanych committed Oct 6, 2021
1 parent 4b0ade9 commit 30698b0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ export const useSignVerifyForm = (page: 'sign' | 'verify', account?: Account) =>
});

useEffect(() => {
trigger('message');
}, [trigger, formValues.message, formValues.hex]);
if (control?.fieldsRef?.current?.message) trigger('message');
}, [trigger, formValues.message, formValues.hex, control?.fieldsRef]);

useEffect(() => {
if (page === 'sign') setValue('signature', '');
Expand Down

0 comments on commit 30698b0

Please sign in to comment.