Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testnet #122

Open
wants to merge 14 commits into
base: staging
Choose a base branch
from
Open
Show file tree
Hide file tree
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
20 changes: 11 additions & 9 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ name: Bug report
about: Create a report to help us improve
title: "[BUG] "
labels: bug
assignees: ''

assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
6 changes: 1 addition & 5 deletions .github/ISSUE_TEMPLATE/enhancement.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,17 @@ name: Enhancement
about: Small improvement / enhancement (not a full feature request)
title: "[ENHANCE]"
labels: enhancement
assignees: ''

assignees: ""
---

# Summary

[Brief overview of the enhancement and why it is needed or desired]


# Description

[Detailed description of the enhancement, including how it would work and any design considerations]



# Acceptance Criteria

[List of criteria that must be met for the enhancement to be considered accepted]
Expand Down
14 changes: 10 additions & 4 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,29 @@ name: Feature request
about: Suggest an idea for this project
title: "[FEATURE] "
labels: feature-request
assignees: ''

assignees: ""
---

# Problem

Explain the problem in details

# User Story(s):
As a _______, I want to ____, so that I can

As a **\_\_\_**, I want to \_\_\_\_, so that I can

# Description

Description of solution

# Acceptance Criteria

Outline what needs to be done

# Limitations
# Limitations

Outline any potential limitations

# Resources

- outline links and relevant resources, references implementations
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"tabWidth": 2,
"semi": true,
"singleQuote": false,
"printWidth": 80
"printWidth": 80,
"endOfLine": "lf"
}
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@
"source.fixAll": "explicit"
}
}

21 changes: 18 additions & 3 deletions components/NavBar/components/UserDropbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,17 @@ const UserDropbox = () => {
>
<Stack
direction="row"
gap="4px"
gap="1rem"
alignItems="center"
justifyContent="center"
p="6px 8px"
borderRadius="20px"
boxShadow="0px -1px 0px 0px #292929 inset, 0px 0px 0px 0.5px #292929"
>
<CustomAvatar accountId={accountId} size={24} />
<Typography fontSize={14} fontWeight={500} color="#292929">
{truncate(profileInfo?.name || accountId, 10)}
</Typography>
{isAdmin && (
<Typography
sx={{ textDecorationLine: "underline" }}
Expand All @@ -96,13 +99,25 @@ const UserDropbox = () => {
Admin
</Typography>
)}
{open ? <KeyboardArrowRightIcon /> : <KeyboardArrowDownIcon />}
{open ? (
<KeyboardArrowRightIcon sx={{ color: "black" }} />
) : (
<KeyboardArrowDownIcon sx={{ color: "black" }} />
)}
</Stack>
</ButtonContainer>
<Menu anchorEl={anchorEl} open={open} onClose={handleClose}>
<Stack direction="row" alignItems="center" ml={2} mb={2}>
<CustomAvatar accountId={accountId} size={48} fontSize={16} />
<Typography fontSize={14} fontWeight={500} lineHeight="20px" ml={2}>
<Typography
fontSize={14}
fontWeight={500}
lineHeight="20px"
display={{
sm: "none",
}}
ml={2}
>
{truncate(profileInfo?.name || accountId, 14)}
</Typography>
</Stack>
Expand Down
16 changes: 11 additions & 5 deletions components/NavBar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Button, Container, Divider, Stack, Typography } from "@mui/material";
import Image from "next/image";
import { useRouter } from "next/router";
import { useCallback } from "react";

import NadabotLogo from "@nadabot/assets/icons/nadabot-logo";
// import NadabotLogo from "@nadabot/assets/icons/nadabot-logo";
import { useUser } from "@nadabot/hooks/store/useUser";
import useBreakPoints from "@nadabot/hooks/useBreakPoints";
import useIsAdminPage from "@nadabot/hooks/useIsAdminPage";
Expand All @@ -17,7 +18,7 @@ import Tag from "../ui/Tag";

const NavBar = () => {
const router = useRouter();
const { walletConnected, isAdmin, isVerifiedHuman } = useUser();
const { walletConnected, isVerifiedHuman } = useUser();
const { maxWidth430 } = useBreakPoints();
const isAdminPage = useIsAdminPage();

Expand Down Expand Up @@ -69,7 +70,13 @@ const NavBar = () => {
>
{/* Left */}
<ButtonContainer onClick={goHomeHandler}>
<NadabotLogo />
<Image
src="/assets/logo.svg"
width={256}
height={64}
className="object-contain"
alt="Nadabot"
/>
</ButtonContainer>

{/* Right */}
Expand All @@ -78,8 +85,7 @@ const NavBar = () => {
<Stack direction="row" mb={maxWidth430 ? 2 : 0}>
<Stack
direction={maxWidth430 ? "column" : "row"}
width={isAdmin ? (isAdminPage ? 300 : 350) : 300}
justifyContent="space-between"
gap="0.75rem"
alignItems="center"
>
{!isAdminPage && (
Expand Down
7 changes: 4 additions & 3 deletions constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ export const NETWORK = (process.env.NEXT_PUBLIC_NETWORK ||
"testnet") as Network;

// SYBIL CONTRACT
export const CONTRACT_ID = process.env.NEXT_PUBLIC_CONTRACT_NAME as string;
export const CONTRACT_ID = (process.env.NEXT_PUBLIC_CONTRACT_NAME ??
"v1.nadabot.testnet") as string;

// SOCIAL DB CONTRACT
export const SOCIAL_DB_CONTRACT_ID = process.env
.NEXT_PUBLIC_SOCIAL_DB_CONTRACT_ID as string;
export const SOCIAL_DB_CONTRACT_ID = (process.env
.NEXT_PUBLIC_SOCIAL_DB_CONTRACT_ID ?? "v1.social08.testnet") as string;

// 1 NEAR
export const ONE_NEAR = utils.format.parseNearAmount("1")!;
Expand Down
2 changes: 1 addition & 1 deletion contexts/Web3AuthProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const Web3AuthProvider: FC<Props> = ({ children }) => {

// Initializes the store
await initStore();
}, [updateUserInfo, initStore, registerLoginTime]);
}, [updateUserInfo, initStore, registerLoginTime, walletApi]);

// Re-init when user is signed in
useEffect(() => {
Expand Down
Loading