Skip to content

Commit

Permalink
feat: move disabling soulname modal to function argument
Browse files Browse the repository at this point in the history
  • Loading branch information
simodrws committed Aug 11, 2023
1 parent 1f040b5 commit ddf5d09
Showing 1 changed file with 7 additions and 7 deletions.
Expand Up @@ -14,7 +14,6 @@ export const useAuthenticate = ({
onRegisterFinish,
onSuccess,
onError,
disableSoulnamePurchase = false,
}: {
onAuthenticateSuccess?: (payload: {
address?: string;
Expand All @@ -26,7 +25,6 @@ export const useAuthenticate = ({
onRegisterFinish?: () => void;
onSuccess?: () => void;
onError?: () => void;
disableSoulnamePurchase?: boolean;
}) => {
const { openConnectModal, isDisconnected } = useWallet();
const { checkLogin, getSession } = useSession();
Expand All @@ -46,8 +44,8 @@ export const useAuthenticate = ({
[onMintSuccess, onMintError, onRegisterFinish, onSuccess, onError]
);

const [{ loading: isAuthenticateModalOpen }, openAuthModal] =
useAsyncFn(async () => {
const [{ loading: isAuthenticateModalOpen }, openAuthModal] = useAsyncFn(
async (disableSoulnamePurchase: boolean) => {
if (isDisconnected) {
openConnectModal?.();
}
Expand Down Expand Up @@ -75,7 +73,8 @@ export const useAuthenticate = ({
await openSoulnameModal();
},
});
}, [
},
[
reloadIdentity,
openSoulnameModal,
isDisconnected,
Expand All @@ -85,8 +84,9 @@ export const useAuthenticate = ({
checkLogin,
getSession,
pendingConnector,
disableSoulnamePurchase,
]);
// disableSoulnamePurchase,
]
);

return {
openAuthModal,
Expand Down

0 comments on commit ddf5d09

Please sign in to comment.