Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions src/views/new-offer/NewOffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,34 +200,34 @@ function NewOffer() {
};

const { account } = useWeb3React();

const authData = getAccountStoredInLocalStorage(account);
// check for backup
useEffect(() => {
sellerContext.dispatch(
Seller.updateOfferingData({
...inputFallback,
})
);

triggerInit(init * -1);

const authData = getAccountStoredInLocalStorage(account);

if (!authData.activeToken) {
history.push(ROUTE.Home);

modalContext.dispatch(
ModalResolver.showModal({
show: true,
type: MODAL_TYPES.GENERIC_ERROR,
content:
"Please check your wallet for Signature Request. Once authentication message is signed you can proceed",
})
);
}

const reloadTimeout = setTimeout((time) => {
if (!authData.activeToken) {
history.push(ROUTE.Home);
modalContext.dispatch(
ModalResolver.showModal({
show: true,
type: MODAL_TYPES.GENERIC_ERROR,
content:
"Please check your wallet for Signature Request. Once authentication message is signed you can proceed",
})
);
}
}, 1000);
return () => {
clearTimeout(reloadTimeout);
};
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
}, [authData.activeToken]);

useEffect(() => {
navigationContext.dispatch(
Expand Down