Skip to content

Commit

Permalink
Use self-hosted general subgraph
Browse files Browse the repository at this point in the history
  • Loading branch information
Evalir committed Sep 1, 2020
1 parent aea8919 commit 16408e6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/hooks/useOrgHooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,15 @@ export function useOrganzation() {
let cancelled = false

const fetchOrg = async () => {
const { orgAddress } = getNetwork(env('CHAIN_ID'))
const { generalSubgraphUrl, orgAddress } = getNetwork(env('CHAIN_ID'))

const organization = await connect(orgAddress, 'thegraph', {
network: getDefaultChain(),
})
const organization = await connect(orgAddress, [
'thegraph',
{
network: getDefaultChain(),
orgSubgraphUrl: generalSubgraphUrl,
},
])

if (!cancelled) {
setOrganization(organization)
Expand Down
2 changes: 2 additions & 0 deletions src/networks.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ const networks = {
defaultEthNode: 'wss://mainnet.eth.aragon.network/ws',
defaultSubgraphUrl:
'https://graph.backend.aragon.org/subgraphs/name/1hive/aragon-conviction-voting-mainnet',
generalSubgraphUrl:
'https://graph.backend.aragon.org/subgraphs/name/aragon/aragon-mainnet',
name: 'Mainnet',
orgAddress: '0xaAf56C0D604dDB88bBe451ae0db4580Ca3D49c0A',
type: 'mainnet',
Expand Down

0 comments on commit 16408e6

Please sign in to comment.