From 16408e64d6d2b08334b203f6b981f4f4e083c080 Mon Sep 17 00:00:00 2001 From: Enrique Ortiz Date: Tue, 1 Sep 2020 09:39:41 -0400 Subject: [PATCH] Use self-hosted general subgraph --- src/hooks/useOrgHooks.js | 12 ++++++++---- src/networks.js | 2 ++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/hooks/useOrgHooks.js b/src/hooks/useOrgHooks.js index 8cf60f9..cfe8b9a 100644 --- a/src/hooks/useOrgHooks.js +++ b/src/hooks/useOrgHooks.js @@ -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) diff --git a/src/networks.js b/src/networks.js index 0a29cee..53b4175 100644 --- a/src/networks.js +++ b/src/networks.js @@ -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',