Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/PotLock/nadabot-app into st…
Browse files Browse the repository at this point in the history
…aging
  • Loading branch information
carina-akaia committed Jun 3, 2024
2 parents 1aab6ca + d1befba commit fec6723
Show file tree
Hide file tree
Showing 7 changed files with 97 additions and 34 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 PotLock
Copyright (c) 2024 Potluck Labs, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ NEXT_PUBLIC_NETWORK=testnet

# The smart contract ID (ID of the account where the contract was deployed)
# testnet: v1.nadabot.testnet
# staging: v1.staging.nadabot.near
# staging: v2new.staging.nadabot.near
# mainnet: v1.nadabot.near
NEXT_PUBLIC_CONTRACT_NAME=<smart_contract_address>

Expand Down
23 changes: 13 additions & 10 deletions components/pages/home/ChecksSection.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import { Stack, Typography } from "@mui/material";
import { useRouter } from "next/router";
import { useCallback, useState } from "react";
// import { useRouter } from "next/router";
import {
// useCallback,
useState,
} from "react";

import CustomButton from "@nadabot/components/ui/CustomButton";
// import CustomButton from "@nadabot/components/ui/CustomButton";
import { useUser } from "@nadabot/hooks/store/useUser";
import useBreakPoints from "@nadabot/hooks/useBreakPoints";
import useFilteredProviders from "@nadabot/hooks/useFilteredProviders";
import { Routes } from "@nadabot/routes";
// import { Routes } from "@nadabot/routes";
import colors from "@nadabot/theme/colors";
import providerSorts from "@nadabot/utils/providerSorts";

Expand All @@ -15,17 +18,17 @@ import { ShadowContainer } from "../../containers/ShadowContainer";
import { AddFilterSearchInput } from "../../ui/AddFilterSearchInput";

export default function ChecksSection() {
const router = useRouter();
// const router = useRouter();
const { walletConnected } = useUser();
const { maxWidth805 } = useBreakPoints();
const [searchPattern, setSearchPattern] = useState("");
const { activeNoHuman, active } = useFilteredProviders({
sortMethod: providerSorts.higherWeightFirst,
});

const addCustomCheckHandler = useCallback(() => {
router.push(Routes.ADD_STAMP);
}, [router]);
// const addCustomCheckHandler = useCallback(() => {
// router.push(Routes.ADD_STAMP);
// }, [router]);

const providers =
walletConnected && activeNoHuman.length > 0 ? activeNoHuman : active;
Expand All @@ -49,7 +52,7 @@ export default function ChecksSection() {
human.
</Typography>
</Stack>
{walletConnected && (
{/* {walletConnected && (
<CustomButton
sx={{ mt: maxWidth805 ? 1 : 0 }}
bodySize="medium"
Expand All @@ -58,7 +61,7 @@ export default function ChecksSection() {
>
+ Add Custom Check
</CustomButton>
)}
)} */}
</Stack>

{/* Checks Container */}
Expand Down
77 changes: 65 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,16 @@
"@near-wallet-selector/meteor-wallet": "^8.9.5",
"@near-wallet-selector/mintbase-wallet": "^8.9.5",
"@near-wallet-selector/modal-ui": "^8.9.2",
"@near-wallet-selector/my-near-wallet": "^8.9.6",
"@near-wallet-selector/near-mobile-wallet": "^8.9.5",
"@near-wallet-selector/nearfi": "^8.9.5",
"@near-wallet-selector/neth": "^8.9.5",
"@near-wallet-selector/nightly": "^8.9.6",
"@near-wallet-selector/sender": "^8.5.0",
"@near-wallet-selector/welldone-wallet": "^8.9.5",
"@near-wallet-selector/xdefi": "^8.9.5",
"@uidotdev/usehooks": "^2.4.1",
"@wpdas/naxios": "^2.0.1",
"@wpdas/naxios": "^2.1.0",
"copy-to-clipboard": "^3.3.3",
"formik": "^2.4.5",
"fuse.js": "^7.0.0",
Expand All @@ -58,4 +60,4 @@
"prettier": "^3.2.5",
"typescript": "^5"
}
}
}
10 changes: 7 additions & 3 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Container } from "@mui/material";
import ChecksSection from "@nadabot/components/pages/home/ChecksSection";
import CompletedSection from "@nadabot/components/pages/home/CompletedSection";
import ExploreSection from "@nadabot/components/pages/home/ExploreSection";
import InvitationHeroSection from "@nadabot/components/pages/home/InvitationHeroSection";
// import InvitationHeroSection from "@nadabot/components/pages/home/InvitationHeroSection";
import PendingVerificationSection from "@nadabot/components/pages/home/PendingVerificationSection";
import { useUser } from "@nadabot/hooks/store/useUser";
import useCheckPendingVerification from "@nadabot/hooks/useCheckPendingVerification";
Expand All @@ -22,13 +22,17 @@ export default function Home() {

return (
<>
<Container>
<Container
sx={{
paddingBottom: "3rem",
}}
>
<ExploreSection />
<PendingVerificationSection />
<ChecksSection />
{walletConnected && <CompletedSection />}
</Container>
<InvitationHeroSection />
{/* <InvitationHeroSection /> */}
</>
);
}
11 changes: 6 additions & 5 deletions services/contracts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ import { setupLedger } from "@near-wallet-selector/ledger";
import { setupMathWallet } from "@near-wallet-selector/math-wallet";
import { setupMeteorWallet } from "@near-wallet-selector/meteor-wallet";
import { setupMintbaseWallet } from "@near-wallet-selector/mintbase-wallet";
import { setupMyNearWallet } from "@near-wallet-selector/my-near-wallet";
import { setupNearMobileWallet } from "@near-wallet-selector/near-mobile-wallet";
import { setupNearFi } from "@near-wallet-selector/nearfi";
import { setupNeth } from "@near-wallet-selector/neth";
import { setupNightly } from "@near-wallet-selector/nightly";
import { setupSender } from "@near-wallet-selector/sender";
import { setupWelldoneWallet } from "@near-wallet-selector/welldone-wallet";
import { setupXDEFI } from "@near-wallet-selector/xdefi";
Expand All @@ -17,26 +19,25 @@ import { CONTRACT_ID, NETWORK } from "@nadabot/constants";

// Naxios (Contract/Wallet) Instance
export const naxiosInstance = new naxios({
rpcNodeUrl: `https://${NETWORK.toLowerCase() === "mainnet" ? "near" : "near-testnet"}.lava.build`,
contractId: CONTRACT_ID,
network: NETWORK,
walletSelectorModules: [
setupBitgetWallet(),
setupSender(),
setupMyNearWallet(),
setupHereWallet(),
setupMathWallet(),
setupMeteorWallet(),
setupWelldoneWallet(),
setupNightly(),
setupLedger(),
setupNearFi(),
setupCoin98Wallet(),
setupNeth(),
setupXDEFI(),
setupNearMobileWallet(),
setupMintbaseWallet({
walletUrl: "https://wallet.mintbase.xyz",
callbackUrl: "https://www.mywebsite.com",
deprecated: false,
}),
setupMintbaseWallet(),
],
});

Expand Down

0 comments on commit fec6723

Please sign in to comment.