diff --git a/frontend/src/pages/account/pages/LoginPage.tsx b/frontend/src/pages/account/pages/LoginPage.tsx index d16a40a..d59769c 100644 --- a/frontend/src/pages/account/pages/LoginPage.tsx +++ b/frontend/src/pages/account/pages/LoginPage.tsx @@ -47,7 +47,7 @@ export const LoginPage: React.FC = () => { if (auth.isAdmin) { navigate("/admin/orders"); } else { - navigate("/client/issue"); + navigate("/client/placeOrder"); } snackbar.enqueueSnackbar("Login success", { diff --git a/frontend/src/pages/client/pages/components/InteractionsWidget.tsx b/frontend/src/pages/client/pages/components/InteractionsWidget.tsx index bc9ce80..73adb88 100644 --- a/frontend/src/pages/client/pages/components/InteractionsWidget.tsx +++ b/frontend/src/pages/client/pages/components/InteractionsWidget.tsx @@ -108,37 +108,21 @@ export const InteractionsWidget: React.FC = () => { variant: "success", }); } catch (e) { - setLoading(false); snackbar.enqueueSnackbar(`Order placement failed`, { variant: "error", }); + } finally { + setLoading(false); } } }; - const fetch = async () => { - if (contract) { - const address = await signer!.getAddress(); - - const x = await contract.userOrders(address, ASSETS.LFN.address!); - - console.log(x); - } - }; - React.useEffect(() => { if (web3Context) { setSigner({ signer: web3Context.signer, address: web3Context.account }); } }, [web3Context]); - React.useEffect(() => { - if (signer) { - fetch(); - } - // eslint-disable-next-line - }, [signer]); - return (