Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
REACT_APP_CHAIN_ID="1"
REACT_APP_NETWORK_URL="https://mainnet.infura.io/v3/4bf032f2d38a4ed6bb975b80d6340847"
REACT_APP_GOOGLE_ANALYTICS_ID="UA-128182339-6"
REACT_APP_GOOGLE_ANALYTICS_ID="UA-128182339-6"
REACT_EDITOR=atom
8 changes: 8 additions & 0 deletions src/apollo/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,11 @@ export const ensClient = new ApolloClient({
cache: new InMemoryCache(),
shouldBatch: true,
})

export const candleClient = new ApolloClient({
link: new HttpLink({
uri: 'https://api.thegraph.com/subgraphs/name/candleplatforms/candlegovernor/graphql',
}),
cache: new InMemoryCache(),
shouldBatch: true,
})
Binary file added src/assets/images/cndlLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion src/state/application/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
RADICLE_GOVERNANCE,
NOUNS_GOVERNANCE,
ENS_GOVERNANCE,
CNDL_GOVERNANCE,
} from '../governance/reducer'
import {
uniswapClient,
Expand All @@ -21,6 +22,7 @@ import {
radicleClient,
nounsClient,
ensClient,
candleClient,
} from '../../apollo/client'

export function useBlockNumber(): number | undefined {
Expand Down Expand Up @@ -126,6 +128,8 @@ export function useSubgraphClient() {
if (activeProtocol?.id === ENS_GOVERNANCE.id) {
return ensClient
}

if (activeProtocol?.id === CNDL_GOVERNANCE.id) {
return candleClient
}
return undefined
}
2 changes: 2 additions & 0 deletions src/state/governance/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
} from './actions'
import { COMPOUND_GOVERNANCE, GlobaData, GovernanceInfo, NOUNS_GOVERNANCE, UNISWAP_GOVERNANCE } from './reducer'


export interface DelegateData {
id: string
delegatedVotes: number
Expand Down Expand Up @@ -190,6 +191,7 @@ export function useAllProposalStates(): number[] | undefined {

if (
activeProtocol === COMPOUND_GOVERNANCE ||
activeProtocol === CNDL_GOVERNANCE ||
activeProtocol === NOUNS_GOVERNANCE ||
activeProtocol === UNISWAP_GOVERNANCE
) {
Expand Down
17 changes: 17 additions & 0 deletions src/state/governance/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import PoolLogo from '../../assets/images/pooltogether-icon.png'
import RadicleLogo from '../../assets/images/radicle-logo.svg'
import NounsLogo from '../../assets/images/nouns-logo.png'
import ENSLogo from '../../assets/images/ens.jpeg'
import CandleLogo from '../../assets/images/cndlLogo.png'
import AddAccount from '../../assets/images/AddAccount.png'

import { serializeToken } from '../user/hooks'
Expand Down Expand Up @@ -172,6 +173,21 @@ export const NOUNS_GOVERNANCE: GovernanceInfo = {
emoji: EMOJIS[Math.floor(Math.random() * EMOJIS.length)],
}

export const CNDL_GOVERNANCE_ADDRESS = '0xB80Be29667021AE0B617AC9eFe0a3A1a58033681'
export const CNDL_ADDRESS = '0xbc138bd20c98186cc0342c8e380953af0cb48ba8'
const CNDL = new Token(ChainId.MAINNET, CNDL_ADDRESS, 18, 'CNDL', 'Candle Token')
export const CNDL_GOVERNANCE: GovernanceInfo = {
id: 'cndl',
name: 'Candle Governance',
logo: CandleLogo,
primaryColor: '#6fbeff',
secondaryColor: '#ebfeff',
token: serializeToken(CNDL),
governanceAlphaAddresses: [CNDL_GOVERNANCE_ADDRESS],
social: '@candle_labs',
emoji: '👻',
}

// #/connect or #/delegates/connect
// show only identity flow e.g. link to twitter
export function identityOnlyPath(pathname: string) {
Expand All @@ -187,6 +203,7 @@ export const SUPPORTED_PROTOCOLS: { [id: string]: GovernanceInfo } = {
radicle: RADICLE_GOVERNANCE,
nouns: NOUNS_GOVERNANCE,
ens: ENS_GOVERNANCE,
cndl: CNDL_GOVERNANCE,
connect: CONNECT_CONFIG,
}

Expand Down