Support updated Validators DApp (#76)
* Fix prepareValidatorsDapp.js * Fix pages/Validators.js * Add `npm run all` * Update package-lock.json * Update package*.json files * Update package*.json files
This commit is contained in:
parent
d7541abbee
commit
3a31ee3538
File diff suppressed because it is too large
Load Diff
|
@ -14,7 +14,7 @@
|
|||
"password-generator": "^2.2.0",
|
||||
"path": "^0.12.7",
|
||||
"poa-dapps-keys-generation": "github:poanetwork/poa-dapps-keys-generation#cae6121305bf9d67ce15d7b46f2886552941cee2",
|
||||
"poa-dapps-validators": "github:poanetwork/poa-dapps-validators#da479d8a5d79ff4e2102a117ae7175863a4c6537",
|
||||
"poa-dapps-validators": "github:poanetwork/poa-dapps-validators#a1c023202d28f66d3331d1997c1879d9fadbaf88",
|
||||
"poa-dapps-voting": "github:poanetwork/poa-dapps-voting#27655e420f32575bc1341a87089688b15ab68948",
|
||||
"selenium-webdriver": "3.6.0",
|
||||
"toml": "^2.3.3",
|
||||
|
@ -22,6 +22,7 @@
|
|||
"web3": "1.0.0-beta.34"
|
||||
},
|
||||
"scripts": {
|
||||
"all": "npm i && npm run start-moc-setup && npm run launch-dapps && npm run check-emission-funds-balance && npm run launch-ceremony-light && npm run set-validators-data-light && npm run add-validator && npm run start-new-validator-node",
|
||||
"start-moc-setup": "npm run get-all-submodules && npm run prepare-contracts-repo && npm run prepare-moc-node && npm run start-moc-node && npm run deploy-secondary-contracts && npm run update-spec && npm run start-moc-node && npm run prepare-scripts-moc-repo && npm run test-setup-is-started",
|
||||
"launch-dapps": "npm run launch-ceremony-dapp && npm run launch-validators-dapp && npm run launch-governance-dapp",
|
||||
"launch-dapps-ceremony": "npm run launch-ceremony-dapp",
|
||||
|
|
|
@ -5,7 +5,7 @@ const webdriver = require('selenium-webdriver'),
|
|||
by = require('selenium-webdriver/lib/by');
|
||||
|
||||
const setMetadataTab = by.By.xpath("//*[@id=\"root\"]/div/header/div/div/div/a[2]");
|
||||
const setMetadataButton = by.By.xpath("//*[@id=\"root\"]/div/section/div/button");
|
||||
const setMetadataButton = by.By.xpath("//*[@id=\"root\"]/div/section/div/div[2]/button");
|
||||
const firstNameInput = by.By.xpath("//*[@id=\"firstName\"]");
|
||||
const lastNameInput = by.By.xpath("//*[@id=\"lastName\"]");
|
||||
const addrInput = by.By.xpath("//*[@id=\"address\"]");
|
||||
|
|
|
@ -49,6 +49,14 @@ function main() {
|
|||
dappHelpersContent = dappHelpersContent.replace(lastGetABI, lastGetABI + abiAddition);
|
||||
fs.writeFileSync(dappHelpers, dappHelpersContent);
|
||||
|
||||
const dappGetWeb3 = `${constants.pathToValidatorsDAppRepo}/src/utils/getWeb3.js`;
|
||||
let dappGetWeb3Content = fs.readFileSync(dappGetWeb3, 'utf8');
|
||||
function replaceDefaultNetId(network) {
|
||||
return `const defaultNetId = helpers.netIdByName(constants.branches.${network})`
|
||||
}
|
||||
dappGetWeb3Content = dappGetWeb3Content.replace(replaceDefaultNetId('CORE'), replaceDefaultNetId('SOKOL'));
|
||||
fs.writeFileSync(dappGetWeb3, dappGetWeb3Content);
|
||||
|
||||
// Fix Metadata.contract.js for using new ValidatorMetadata contract
|
||||
// in local Sokol Network (instead of live xDai Network)
|
||||
const metadataContractPath = `${constants.pathToValidatorsDAppRepo}/src/contracts/Metadata.contract.js`;
|
||||
|
|
Loading…
Reference in New Issue