Skip to content

Commit

Permalink
fix import export
Browse files Browse the repository at this point in the history
  • Loading branch information
tbenr committed Sep 14, 2022
1 parent 5f84c1c commit 768236d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "proto-vis",
"version": "0.1.1",
"version": "0.1.2",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.16.5",
Expand Down
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
content="Forkchoice visualization tool for Ethereum's Consensus Clients"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
Expand Down
2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "proto-vis-server",
"version": "0.1.1",
"version": "0.1.2",
"description": "",
"main": "server.js",
"private": true,
Expand Down
18 changes: 12 additions & 6 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -637,8 +637,10 @@ function App() {
// multiple protoarrays
for (let dump of data) {
dump.timestamp = moment(dump.timestamp)
dump.forkchoiceNodes = dump.protoArray
delete dump.protoArray
if(dump.protoArray) {
dump.forkchoiceNodes = dump.protoArray
delete dump.protoArray
}
}
return data
}
Expand All @@ -659,8 +661,10 @@ function App() {
// multiple protoarrays
for (let dump of data) {
dump.timestamp = moment(dump.time)
dump.forkchoiceNodes = dump.protoArray.filter(filter)
delete dump.protoArray
if(dump.protoArray) {
dump.forkchoiceNodes = dump.protoArray.filter(filter)
delete dump.protoArray
}
}
return data
}
Expand All @@ -680,8 +684,10 @@ function App() {
// multiple protoarrays
for (let sample of data) {
sample.timestamp = moment()
sample.forkchoiceNodes = sample.forkchoice?.forkchoice_nodes
delete sample.protoArray
if(sample.forkchoice?.forkchoice_nodes) {
sample.forkchoiceNodes = sample.forkchoice?.forkchoice_nodes
delete sample.forkchoice.forkchoice_nodes
}
}
return data as ForckchoiceDump[]
}
Expand Down

0 comments on commit 768236d

Please sign in to comment.