diff --git a/components/quests/task.tsx b/components/quests/task.tsx index 879f19ef..1342e42b 100644 --- a/components/quests/task.tsx +++ b/components/quests/task.tsx @@ -38,6 +38,10 @@ const Task: FunctionComponent = ({ // A verify function that setIsVerified(true) and stop propagation const verify = async (e: React.MouseEvent) => { e.stopPropagation(); + if (!address) { + setError("Please connect your wallet first"); + return; + } setIsLoading(true); if (verifyEndpointType.startsWith("oauth")) { @@ -125,7 +129,7 @@ const Task: FunctionComponent = ({ ) : (
{ - if (verifyRedirect) window.open(verifyRedirect); + if (verifyRedirect && address) window.open(verifyRedirect); verify(e); }} className={styles.verifyButton}