Add POA-GNO merge warning (#223)
This commit is contained in:
parent
8cafb1fd7f
commit
e3f8b7de19
|
@ -3,7 +3,6 @@
|
|||
## Base supported networks
|
||||
|
||||
- Core POA network (RPC endpoint: `https://core.poa.network`)
|
||||
- xDai chain (RPC endpoint: `https://dai.poa.network`)
|
||||
- Sokol testnet (RPC endpoint: `https://sokol.poa.network`)
|
||||
- Kovan testnet (RPC endpoint: `https://kovan.infura.io/`)
|
||||
|
||||
|
@ -24,7 +23,7 @@ Please check related posts in wiki [Governance Overview](https://github.com/poan
|
|||
## Configuration
|
||||
Governance DApp is configured with [POA Network governance contracts](https://github.com/poanetwork/poa-network-consensus-contracts)
|
||||
|
||||
There are contracts' addresses for [Sokol](https://github.com/poanetwork/poa-chain-spec/blob/sokol/contracts.json), [Core](https://github.com/poanetwork/poa-chain-spec/blob/core/contracts.json), [xDai](https://github.com/poanetwork/poa-chain-spec/blob/dai/contracts.json), and [Kovan](https://github.com/poanetwork/poa-chain-spec/blob/kovan/contracts.json).
|
||||
There are contracts' addresses for [Sokol](https://github.com/poanetwork/poa-chain-spec/blob/sokol/contracts.json), [Core](https://github.com/poanetwork/poa-chain-spec/blob/core/contracts.json), and [Kovan](https://github.com/poanetwork/poa-chain-spec/blob/kovan/contracts.json).
|
||||
|
||||
|
||||
## Building from source
|
||||
|
|
File diff suppressed because it is too large
Load Diff
10
src/index.js
10
src/index.js
|
@ -17,6 +17,7 @@ import { RouterStore, syncHistoryWithStore } from 'mobx-react-router'
|
|||
import { constants } from './utils/constants'
|
||||
import { getContractsAddresses } from './contracts/addresses'
|
||||
import { getNetworkBranch } from './utils/utils'
|
||||
import messages from './utils/messages'
|
||||
|
||||
const browserHistory = createBrowserHistory()
|
||||
const routingStore = new RouterStore()
|
||||
|
@ -42,6 +43,15 @@ class AppMainRouter extends Component {
|
|||
.then(async web3Config => {
|
||||
await this.initialize(web3Config)
|
||||
commonStore.hideLoading()
|
||||
if (web3Config.netId === 99) {
|
||||
// if it's POA Core network
|
||||
const currentTimestamp = Math.floor(Date.now() / 1000)
|
||||
swal({
|
||||
title: 'Attention',
|
||||
html: generateElement(currentTimestamp < 1651698000 ? messages.poaGnoMerging : messages.poaGnoMerged),
|
||||
type: 'warning'
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error.message)
|
||||
|
|
|
@ -51,4 +51,10 @@ messages.networkMatchError = function(netId) {
|
|||
return `Networks in DApp and MetaMask do not match. Switch MetaMask to <b>${networkName}</b> or change the network in DApp.`
|
||||
}
|
||||
|
||||
messages.poaGnoMerging =
|
||||
'POA is joining the Gnosis Chain ecosystem, and token holders can now swap POA for STAKE and then STAKE for GNO on the Gnosis Chain! More info and instructions <a href="https://www.poa.network/" target="_blank">here</a>.'
|
||||
|
||||
messages.poaGnoMerged =
|
||||
'POA Network merged with the Gnosis Chain.<br /><a href="https://www.poa.network/" target="_blank">More information</a> about the merger.'
|
||||
|
||||
export default messages
|
||||
|
|
Loading…
Reference in New Issue