Skip to content

Commit

Permalink
feat: update swap address
Browse files Browse the repository at this point in the history
  • Loading branch information
jdrskr committed Nov 30, 2023
1 parent 847bf09 commit d31f337
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-publish-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
REACT_APP_TOKEN_LFT_ADDRESS: "0xD73464667d5F2e15dd0A3C58C3610c39c1b1c2d4"
REACT_APP_TOKEN_LFN_ADDRESS: "0x0d9D5372b5F889bCEcb930b1540f7D1595075177"
REACT_APP_TOKEN_NTN_ADDRESS: "0x9019337Ecc929a777B9f87c91D28713496Fc6381"
REACT_APP_SWAP_CONTRACT_ADDRESS: "0x0C47bb35e40AE5C7e22bCf9088641b610D9aD4C6"
REACT_APP_SWAP_CONTRACT_ADDRESS: "0xA3C07d96e1e81c415FAa8763fa57299415c08228"
REACT_APP_STABLE_ADDRESS: "0xb1E34471421DEACda61e68897ED6DBE373169eE9"
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/constants/LocalStorage.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const LocalStorage = {
AuthToken: 'Auth.Token',
AuthToken: 'Auth.Token'
}
9 changes: 9 additions & 0 deletions frontend/src/pages/account/pages/LoginPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { zodResolver } from "@hookform/resolvers/zod";
import { Box, Button, TextField, Typography } from "@mui/material";
import { useApiContext } from "../../../context/ApiContext";
import { useAuthContext } from "../../../context/AuthContext";
import { useNavigate } from "react-router-dom";

const Schema = z.object({
login: z.string().nonempty("The comment is required!"),
Expand All @@ -15,6 +16,8 @@ const Schema = z.object({
type SchemaType = z.infer<typeof Schema>;

export const LoginPage: React.FC = () => {
const navigate = useNavigate();

const { client } = useApiContext();
const { authenticate } = useAuthContext();
const snackbar = useSnackbar();
Expand All @@ -34,6 +37,12 @@ export const LoginPage: React.FC = () => {

authenticate(accessToken, userId, isAdmin);

if (isAdmin) {
navigate("/admin/orders");
} else {
navigate("/client/issue");
}

snackbar.enqueueSnackbar("Login success", {
variant: "success",
});
Expand Down

0 comments on commit d31f337

Please sign in to comment.