Skip to content

Commit

Permalink
Merge pull request #563 from eco-stake/remove-networks
Browse files Browse the repository at this point in the history
Remove networks and disable offline
  • Loading branch information
tombeynon committed Jul 22, 2022
2 parents ff79d85 + af0598d commit 9434bde
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/Networks.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ function Networks(props) {
}

async function changeNetwork(network){
if(!network.online) return

await network.load()
await network.connect()
props.changeNetwork(network)
Expand Down Expand Up @@ -85,7 +87,7 @@ function Networks(props) {
<span onClick={() => toggleFavourite(network)} role="button" className="text-right position-absolute top-0 end-0 py-1 px-2" style={{ zIndex: 2 }}>
{renderFavourite(network)}
</span>
<span role="button" className="stretched-link" onClick={() => changeNetwork(network)}>
<span role={ network.online ? "button" : "" } className="stretched-link" onClick={() => changeNetwork(network)}>
<Row className="g-0">
<Col xs={3} className="text-center">
<NetworkImage network={network} width={60} height={60} className="m-2 shadow overflow-hidden rounded-circle" />
Expand Down
8 changes: 8 additions & 0 deletions src/networks.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,5 +199,13 @@
{
"name": "genesisl1",
"txTimeout": 120000
},
{
"name": "tgrade",
"enabled": false
},
{
"name": "aioz",
"enabled": false
}
]

0 comments on commit 9434bde

Please sign in to comment.