Add POA-GNO merge warning (#127)
This commit is contained in:
parent
74ad1ff1ee
commit
82ffca0d1a
|
@ -5,7 +5,6 @@ Validators DApp is built for POA Network based blockchains. It gives an opportun
|
|||
## 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/`)
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,9 +1,6 @@
|
|||
import { constants } from '../utils/constants'
|
||||
|
||||
function addressesURL(branch) {
|
||||
if (branch === constants.branches.DAI) {
|
||||
branch = 'ce2c77256f0d37fc48baa9b6cab806261d034785'
|
||||
}
|
||||
const URL = `https://raw.githubusercontent.com/${constants.organization}/${constants.repoName}/${branch}/${
|
||||
constants.addressesSourceFile
|
||||
}`
|
||||
|
@ -12,9 +9,6 @@ function addressesURL(branch) {
|
|||
}
|
||||
|
||||
function ABIURL(branch, contract) {
|
||||
if (branch === constants.branches.DAI) {
|
||||
branch = 'ce2c77256f0d37fc48baa9b6cab806261d034785'
|
||||
}
|
||||
const URL = `https://raw.githubusercontent.com/${constants.organization}/${constants.repoName}/${branch}/abis/${
|
||||
constants.ABIsSources[contract]
|
||||
}`
|
||||
|
|
|
@ -83,6 +83,15 @@ class AppMainRouter extends Component {
|
|||
})
|
||||
this.setState({ loading: false, loadingNetworkBranch: null })
|
||||
this.onRouteChange()
|
||||
if (web3Config.netId === 99) {
|
||||
// if it's POA Core network
|
||||
const currentTimestamp = Math.floor(Date.now() / 1000)
|
||||
helpers.generateAlert(
|
||||
'warning',
|
||||
'Attention',
|
||||
currentTimestamp < 1651698000 ? messages.poaGnoMerging : messages.poaGnoMerged
|
||||
)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error.message)
|
||||
|
|
|
@ -11,7 +11,6 @@ constants.ABIsSources = {
|
|||
constants.userDeniedTransactionPattern = 'User denied transaction'
|
||||
constants.rootPath = '/poa-dapps-validators'
|
||||
constants.branches = {
|
||||
DAI: 'dai',
|
||||
CORE: 'core',
|
||||
SOKOL: 'sokol',
|
||||
KOVAN: 'kovan'
|
||||
|
@ -56,13 +55,6 @@ constants.NETWORKS = {
|
|||
RPC: 'https://core.poa.network',
|
||||
BRANCH: constants.branches.CORE,
|
||||
SORTORDER: 1
|
||||
},
|
||||
'100': {
|
||||
NAME: 'xDai',
|
||||
FULLNAME: 'xDai Stable Chain',
|
||||
RPC: 'https://dai.poa.network',
|
||||
BRANCH: constants.branches.DAI,
|
||||
SORTORDER: 2
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@ function generateAlert(icon, title, msg) {
|
|||
|
||||
function isCompanyAllowed(netId) {
|
||||
switch (netId) {
|
||||
case netIdByBranch(constants.branches.DAI):
|
||||
case netIdByBranch(constants.branches.KOVAN):
|
||||
return true
|
||||
default:
|
||||
|
|
|
@ -16,4 +16,10 @@ messages.networkMatchError = function(netId) {
|
|||
return `Networks in DApp and MetaMask (Nifty Wallet) do not match. Switch MetaMask / Nifty Wallet 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