Skip to content

Commit

Permalink
Merge pull request #367 from protofire/deploy-prod-20200407
Browse files Browse the repository at this point in the history
Deploy prod 2020/04/07
  • Loading branch information
leolower authored Apr 7, 2020
2 parents efa8101 + e908d6e commit 9a4a535
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
status = 200

[context.production.environment]
REACT_APP_GRAPH_HTTP = "https://api.thegraph.com/subgraphs/name/protofire/makerdao-governance-v1_5"
REACT_APP_GRAPH_WS = "wss://api.thegraph.com/subgraphs/name/protofire/makerdao-governance-v1_5"
REACT_APP_GRAPH_HTTP = "https://api.thegraph.com/subgraphs/name/protofire/makerdao-governance"
REACT_APP_GRAPH_WS = "wss://api.thegraph.com/subgraphs/name/protofire/makerdao-governance"
REACT_APP_MKR_GRAPH_HTTP='https://api.thegraph.com/subgraphs/name/protofire/mkr-registry'
REACT_APP_ETHERSCAN_API_KEY='XQ2QTEM7H4KX7AQTE9JWXD3HWTTZ46TTU9'

Expand Down
7 changes: 5 additions & 2 deletions src/components/PollDetails/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ export const getVoterRegistries = async (addresses, endDate) => {
endDate,
})

return [...result.cold, ...result.hot]
// When cold and hot are the same the registry cames twice, so we keep only one of them
const registriesById = new Map([...result.cold, ...result.hot].map(reg => [reg.id, reg]))

return Array.from(registriesById.values())
}

export const getVoterAddresses = poll => {
Expand Down Expand Up @@ -257,7 +260,7 @@ export const totalStaked = (poll, lookup, balances, stakedProxies) => {

if (!addedColHotByVoter[voter]) {
const hotBalance = balances[hot] || ZERO
const coldBalance = balances[cold] || ZERO
const coldBalance = hot !== cold ? balances[cold] || ZERO : ZERO

addedColHotByVoter[voter] = true
return acc.plus(proxyAmount.plus(hotBalance).plus(coldBalance))
Expand Down

0 comments on commit 9a4a535

Please sign in to comment.