Skip to content

Commit

Permalink
Merge pull request #133 from celo-org/jcortejoso/fix-d3
Browse files Browse the repository at this point in the history
Fix d3 ES module load
  • Loading branch information
jcortejoso authored Apr 5, 2024
2 parents 7bbfb4d + 0f623c1 commit 1aa2b0b
Show file tree
Hide file tree
Showing 3 changed files with 390 additions and 392 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@celo/contractkit": "^8.0.0",
"@celo/utils": "^6.0.1",
"@types/compression": "^1.7.5",
"@types/d3": "^7.4.3",
"@types/d3": "^6.7.0",
"@types/debounce": "^1.2.4",
"@types/deep-equal": "^1.0.4",
"@types/express": "^4.17.21",
Expand All @@ -40,7 +40,7 @@
"bufferutil": "~4.0.8",
"chalk": "4.1.2",
"compression": "^1.7.4",
"d3": "~7.9.0",
"d3": "~6.7.0",
"d3-collection": "^1.0.7",
"d3-selection": "^3.0.0",
"d3-tip": "^0.9.1",
Expand Down
10 changes: 5 additions & 5 deletions src/server/ContractKit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ let kit: {
const getContractKit = async () => {
if (!kit) {
try {
const contractkit: ContractKit = newKit(cfg.JSONRPC)
const contractKit: ContractKit = newKit(cfg.JSONRPC)

// load contracts
const validators: ValidatorsWrapper = await contractkit.contracts.getValidators()
const election: ElectionWrapper = await contractkit.contracts.getElection()
const chainId = await contractkit.connection.chainId()
const validators: ValidatorsWrapper = await contractKit.contracts.getValidators()
const election: ElectionWrapper = await contractKit.contracts.getElection()
const chainId = await contractKit.connection.chainId()

kit = {
validators,
election,
connection: kit.connection,
connection: contractKit.connection,
chainId
}
} catch (err) {
Expand Down
Loading

0 comments on commit 1aa2b0b

Please sign in to comment.