Skip to content

Commit

Permalink
optimism demo
Browse files Browse the repository at this point in the history
  • Loading branch information
dekanbro committed Jun 11, 2024
1 parent 14a4d28 commit 4358985
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/components/RandomSubTopics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export const RandomSubTopic = ({daoChain}: {daoChain: ValidNetwork}) => {
graphApiKeys: {
"0x1": process.env["NX_GRAPH_API_KEY_MAINNET"],
"0x64": process.env["NX_GRAPH_API_KEY_MAINNET"],
"0xa": process.env["NX_GRAPH_API_KEY_MAINNET"],
},
});
if (query.items && shouldUpdate) {
Expand Down
2 changes: 2 additions & 0 deletions src/components/hub/HomeDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ export const HomeDashboard = () => {
"0x1": process.env["NX_GRAPH_API_KEY_MAINNET"],
"0x64": process.env["NX_GRAPH_API_KEY_MAINNET"],
"0xaa36a7": process.env["NX_GRAPH_API_KEY_MAINNET"],
"0xa": process.env["NX_GRAPH_API_KEY_MAINNET"],

},
});
if (query.items && shouldUpdate) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/hub/ListActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const ListActions = ({

return (
<SingleColumnLayout>
{chainId != DEFAULT_NETWORK_ID && <ParLg>**Only Sepolia currently supported**</ParLg>}
{chainId != DEFAULT_NETWORK_ID && <ParLg>**Only Optimism currently supported**</ParLg>}
<ControlBarBox>
<SearchInput
searchTerm={searchTerm}
Expand Down
2 changes: 2 additions & 0 deletions src/hooks/useDinDaos.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import { NFT_DAO_REFERRER } from "../utils/constants";
const defaultGraphApiKeys = {
"0x1": import.meta.env.VITE_GRAPH_API_KEY_MAINNET,
"0x64": import.meta.env.VITE_GRAPH_API_KEY_MAINNET,
"0xa": import.meta.env.VITE_GRAPH_API_KEY_MAINNET,

};


Expand Down
1 change: 1 addition & 0 deletions src/hooks/useRecordById.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { BlogPost } from "../utils/types";
const defaultGraphApiKeys = {
"0x1": import.meta.env.VITE_GRAPH_API_KEY_MAINNET,
"0x64": import.meta.env.VITE_GRAPH_API_KEY_MAINNET,
"0xa": import.meta.env.VITE_GRAPH_API_KEY_MAINNET,
};

type Record = {
Expand Down
2 changes: 2 additions & 0 deletions src/hooks/useRecords.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ const defaultGraphApiKeys = {
"0x1": import.meta.env.VITE_GRAPH_API_KEY_MAINNET,
"0x64": import.meta.env.VITE_GRAPH_API_KEY_MAINNET,
"0xaa36a7": import.meta.env.VITE_GRAPH_API_KEY_MAINNET,
"0xa": import.meta.env.VITE_GRAPH_API_KEY_MAINNET,


};

Expand Down
1 change: 0 additions & 1 deletion src/hooks/useTcrList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export type ListTcr = {

export const useTcrList = ({ daoId }: { daoId: string }) => {
const { daoChain } = useParams();
// TODO: is this inside bad?
const API_URL = TCR_GRAPH_URL[daoChain as ValidNetwork];
const graphQLClient = new GraphQLClient(API_URL || DEFAULT_GRAPH_URL);

Expand Down
1 change: 1 addition & 0 deletions src/legos/contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export const APP_CONTRACT: Record<string, ContractLego> = {
"0x1": "0x000000000000cd17345801aa8147b8d3950260ff",
"0x5": "0x000000000000cd17345801aa8147b8d3950260ff",
"0x64": "0x000000000000cd17345801aa8147b8d3950260ff",
"0xa": "0x000000000000cd17345801aa8147b8d3950260ff",
},
},
ERC_20: {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/StagingDAO.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export const StagingDAO = ({ badge }: { daoId?: string, badge?: boolean }) => {

const { records: comments, refetch: refetchComments } = useRecords({
daoId: daoId,
chainId: chainId || "0xaa36a7", // Assign a default value to chainId
chainId: chainId || "0xa", // Assign a default value to chainId
recordType: "DUCE",
});

Expand Down
4 changes: 3 additions & 1 deletion src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import { Keychain } from "@daohaus/keychain-utils";
export const NFT_DAO_REFERRER = "DHNFTCuratorShamanSummonerV0.3";
// NFT shaman name NFTCuratorShamanV0.2

export const DEFAULT_NETWORK_ID = "0xaa36a7";
// export const DEFAULT_NETWORK_ID = "0xaa36a7";
export const DEFAULT_NETWORK_ID = "0xa";


export const SUMMONER_URL = "https://dinhaus.github.io/din-summoner/";
export const ADMIN_URL = "https://dinhaus.github.io/din-admin/";
Expand Down

0 comments on commit 4358985

Please sign in to comment.