Skip to content

Commit

Permalink
add more testnets
Browse files Browse the repository at this point in the history
  • Loading branch information
Rashmi-278 committed Sep 3, 2023
1 parent e369086 commit 8ae2b8f
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 5 deletions.
28 changes: 26 additions & 2 deletions daostar-website/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,29 @@ function App() {
context: { apiName: "optimismGoerli" },
variables: { id: "optimism-goerli" },
});
const arbitrumGoerliRes = useQuery(queries.REGISTRATIONS, {
context: { apiName: "arbitrumGoerli" },
variables: { id: "arbitrum-goerli" },
});
const chapelRes = useQuery(queries.REGISTRATIONS, {
context: { apiName: "chapel" },
variables: { id: "chapel" },
});
const {
loading: optimismGoerliLoading,
error: optimismGoerliError,
data: optimismGoerliData,
} = optimismGoerliRes;
const {
loading: arbitrumGoerliLoading,
error: arbitrumGoerliError,
data: arbitrumGoerliData,
} = arbitrumGoerliRes;
const {
loading: chapelLoading,
error: chapelError,
data: chapelData,
} = chapelRes;
const {
loading: goerliLoading,
error: goerliError,
Expand All @@ -66,7 +84,7 @@ function App() {
console.error("Goerli Error "+ goerliError);
console.error("Optimism Goerli Error "+ optimismGoerliError);
};
if (loading || goerliLoading || gnosisLoading || optimismGoerliLoading) return "loading...";
if (loading || goerliLoading || gnosisLoading || optimismGoerliLoading || arbitrumGoerliLoading || chapelLoading) return "loading...";
const mainnetRegistrations =
mainnetData?.registrationNetwork?.registrations || [];
const goerliRegistrations =
Expand All @@ -75,10 +93,16 @@ function App() {
optimismGoerliData?.registrationNetwork?.registrations || [];
const gnosisRegistrations =
gnosisData?.registrationNetwork?.registrations || [];
const arbitrumGoerliRegistrations =
arbitrumGoerliData?.registrationNetwork?.registrations || [];
const chapelRegistrations =
chapelData?.registrationNetwork?.registrations || [];
const registrationInstances = mainnetRegistrations.concat(
goerliRegistrations,
gnosisRegistrations,
optimismGoerliRegistrations
optimismGoerliRegistrations,
arbitrumGoerliRegistrations,
chapelRegistrations
);

console.log({ registrationInstances });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,10 @@ const RegistrationForm = ({ toggleRegScreen, setRegistrationData }) => {
options={[
{ label: 'Mainnet', value: 'mainnet' },
{ label: 'Goerli', value: 'goerli' },
{ label: 'Optimism-Goerli', value: 'optimismGoerli'}
{ label: 'Optimism-Goerli', value: 'optimismGoerli'},
{ label: 'Arbitrum-Goerli', value: 'arbitrumGoerli'},
{ label: 'BNB Bruno', value: 'chapel'}

]}
/>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@ const RegistrationReceived = ({
"summonRegistration",
[...regData]
);

// The below assignment is done because url cant handle '-' in the links
if(daoContractNetwork === 'optimism-goerli'){
daoContractNetwork = 'optimismGoerli';
}

if(daoContractNetwork === 'arbitrum-goerli'){
daoContractNetwork = 'arbitrumGoerli';
}

return (
<Fragment>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ const DisplayRegistration = ({
network = "optimismGoerli";
}

if(network === 'arbitrum-goerli'){
network = 'arbitrumGoerli';
}

return (
<Fragment>
{standalone === true ? (
Expand Down
2 changes: 2 additions & 0 deletions daostar-website/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ const client = new ApolloClient({
optimismGoerli: `https://api.thegraph.com/subgraphs/name/rashmi-278/daostar-optimism-goerli`,
mainnet: `https://api.thegraph.com/subgraphs/name/ipatka/daostar`,
gnosis: `https://api.thegraph.com/subgraphs/name/rashmi-278/daostar-gnosis`,
arbitrumGoerli: `https://thegraph.com/hosted-service/subgraph/crazyyuan/daostar-arbitrum-goerli`,
chapel:`https://thegraph.com/hosted-service/subgraph/crazyyuan/daostar-bnb-bruno`
},
// defaultEndpoint: 'https://api.thegraph.com/subgraphs/name/ipatka/daostar',
httpSuffix: "",
Expand Down

0 comments on commit 8ae2b8f

Please sign in to comment.