Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const objects = {...stage1Objects};
objects.web3 = new Web3(network.rpc);
const account = objects.web3.eth.accounts.privateKeyToAccount(privateKey);
objects.web3.eth.accounts.wallet.add(account);
const {address} = account;
objects.web3.eth.defaultAccount = address;
objects.headWrapper = new HeadWrapper(network.headContractAddress, objects.web3, address);
objects.kycWhitelistWrapper = new KycWhitelistWrapper(objects.headWrapper, objects.web3, address);
objects.rolesWrapper = new RolesWrapper(objects.headWrapper, objects.web3, address);
objects.timeWrapper = new TimeWrapper(objects.headWrapper, objects.web3, address);
objects.payoutsWrapper = new PayoutsWrapper(objects.headWrapper, objects.web3, address);
objects.atlasStakeWrapper = new AtlasStakeStoreWrapper(objects.headWrapper, objects.web3, address);
objects.payoutsActions = new PayoutsActions(objects.timeWrapper, objects.payoutsWrapper);
objects.onboardActions = new OnboardActions(objects.kycWhitelistWrapper, objects.rolesWrapper, objects.atlasStakeWrapper);
objects.crypto = new Crypto(objects.web3);
objects.stateModel = new StateModel(objects.store, objects.crypto, objects.setupCreator);
objects.smartContractsModel = new SmartContractsModel(objects.crypto, objects.kycWhitelistWrapper, objects.rolesWrapper);
objects.atlasModeModel = new AtlasModeModel(objects.httpUtils, account, objects.stateModel);
objects.selectNodeTypePhase = selectNodeTypePhase(objects.stateModel, objects.askForNodeTypeDialog, objects.askForApolloMinimalDepositDialog, objects.roleSelectedDialog);
objects.getNodeUrlPhase = getNodeUrlPhase(objects.stateModel, objects.nodeUrlDetectedDialog, objects.askForNodeUrlDialog);
objects.getNodeIPPhase = getNodeIPPhase(objects.stateModel, objects.nodeIPDetectedDialog, objects.askForNodeIPDialog);
objects.getUserEmailPhase = getUserEmailPhase(objects.stateModel, objects.userEmailDetectedDialog, objects.askForUserEmailDialog);
objects.manualSubmissionPhase = manualSubmissionPhase(objects.stateModel, objects.displaySubmissionDialog);
objects.checkAddressWhitelistingStatusPhase = checkAddressWhitelistingStatusPhase(objects.smartContractsModel, objects.stateModel, objects.addressIsNotWhitelistedDialog, objects.addressIsWhitelistedDialog);
objects.performOnboardingPhase = performOnboardingPhase(objects.stateModel, objects.smartContractsModel,
objects.notEnoughBalanceDialog, objects.alreadyOnboardedDialog, objects.askForApolloDepositDialog, objects.onboardingConfirmationDialog,
objects.onboardingSuccessfulDialog, objects.insufficientFundsDialog, objects.genericErrorDialog);