Support updated Voting DApp (#77)
* Fix prepareGovernanceDapp.js and update package*.json * Update package*.json
This commit is contained in:
parent
3a31ee3538
commit
23a85076df
|
@ -17852,8 +17852,8 @@
|
|||
}
|
||||
},
|
||||
"poa-dapps-voting": {
|
||||
"version": "github:poanetwork/poa-dapps-voting#27655e420f32575bc1341a87089688b15ab68948",
|
||||
"from": "github:poanetwork/poa-dapps-voting#27655e420f32575bc1341a87089688b15ab68948",
|
||||
"version": "github:poanetwork/poa-dapps-voting#1cecd5d169078e56df6613153abf86d1bd1e8211",
|
||||
"from": "github:poanetwork/poa-dapps-voting#1cecd5d169078e56df6613153abf86d1bd1e8211",
|
||||
"requires": {
|
||||
"ajv": "6.5.2",
|
||||
"autoprefixer": "7.1.6",
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"path": "^0.12.7",
|
||||
"poa-dapps-keys-generation": "github:poanetwork/poa-dapps-keys-generation#cae6121305bf9d67ce15d7b46f2886552941cee2",
|
||||
"poa-dapps-validators": "github:poanetwork/poa-dapps-validators#a1c023202d28f66d3331d1997c1879d9fadbaf88",
|
||||
"poa-dapps-voting": "github:poanetwork/poa-dapps-voting#27655e420f32575bc1341a87089688b15ab68948",
|
||||
"poa-dapps-voting": "github:poanetwork/poa-dapps-voting#1cecd5d169078e56df6613153abf86d1bd1e8211",
|
||||
"selenium-webdriver": "3.6.0",
|
||||
"toml": "^2.3.3",
|
||||
"toml-js": "0.0.8",
|
||||
|
|
|
@ -83,6 +83,14 @@ const local = {
|
|||
dappHelpersContent = dappHelpersContent.replace(lastGetABI, lastGetABI + abiAddition);
|
||||
fs.writeFileSync(dappHelpers, dappHelpersContent);
|
||||
|
||||
const dappGetWeb3 = `${constants.pathToGovernanceDAppRepo}/src/utils/getWeb3.js`;
|
||||
let dappGetWeb3Content = fs.readFileSync(dappGetWeb3, 'utf8');
|
||||
function replaceDefaultNetId(network) {
|
||||
return `const defaultNetId = helpers.netIdByBranch(constants.${network})`
|
||||
}
|
||||
dappGetWeb3Content = dappGetWeb3Content.replace(replaceDefaultNetId('CORE'), replaceDefaultNetId('SOKOL'));
|
||||
fs.writeFileSync(dappGetWeb3, dappGetWeb3Content);
|
||||
|
||||
// Change some constants
|
||||
const dappConstants = `${constants.pathToGovernanceDAppRepo}/src/utils/constants.js`;
|
||||
let dappConstantsContent = fs.readFileSync(dappConstants, 'utf8');
|
||||
|
|
Loading…
Reference in New Issue