diff --git a/frontend/src/components/NavigationBar.tsx b/frontend/src/components/NavigationBar.tsx index 86e30ea..297ffa3 100644 --- a/frontend/src/components/NavigationBar.tsx +++ b/frontend/src/components/NavigationBar.tsx @@ -47,7 +47,7 @@ export const NavigationBar: React.FC = ({ ...props }) => { }} onClick={() => navigate("/accounts/register")} > - Register + Register user )} @@ -68,7 +68,7 @@ export const NavigationBar: React.FC = ({ ...props }) => { }} onClick={() => navigate("/admin/orders")} > - Orders + Orders management )} {!authContext.isAdmin && ( @@ -79,7 +79,7 @@ export const NavigationBar: React.FC = ({ ...props }) => { }} onClick={() => navigate("/client/issue")} > - Issue + Place order )} { await Promise.all( Array.from(Array(details.currentEpoch.toNumber() + 1)) - .map(async (_, index) => { - epochList[index] = { - ...(await contract.epochDetails(tokenAddress, index)) as any, - orders: (await contract.epochOrders(tokenAddress, index)) - }; - }) - ); - - setTokenDetails({ + .map(async (_, index) => { + epochList[index] = { + ...(await contract.epochDetails(tokenAddress, index)) as any, + orders: (await contract.epochOrders(tokenAddress, index)) + }; + }) + ); + + setTokenDetails({ tokenDetails: { tokenAddress, currentEpoch: details.currentEpoch diff --git a/frontend/src/pages/client/pages/components/InteractionsWidget.tsx b/frontend/src/pages/client/pages/components/InteractionsWidget.tsx index 4e4316e..7d43217 100644 --- a/frontend/src/pages/client/pages/components/InteractionsWidget.tsx +++ b/frontend/src/pages/client/pages/components/InteractionsWidget.tsx @@ -93,12 +93,12 @@ export const InteractionsWidget: React.FC = () => { await tx.wait(); setLoading(false); - snackbar.enqueueSnackbar(`${!value ? "Buy" : "Sell"} success`, { + snackbar.enqueueSnackbar(`Order placed successfully`, { variant: "success", }); } catch (e) { setLoading(false); - snackbar.enqueueSnackbar(`${!value ? "Buy" : "Sell"} fail`, { + snackbar.enqueueSnackbar(`Order placement failed`, { variant: "error", }); }