Skip to content

Commit

Permalink
fix state validation
Browse files Browse the repository at this point in the history
  • Loading branch information
David Scharf committed Mar 29, 2021
1 parent 88c6850 commit 2817b08
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions migrations/107_add_exit_contracts.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ module.exports = function deployContracts(deployer, network, accounts) {
});

// verify that payout has started
const state = await exitController.state();
const state = (await exitController.state()).toNumber();
if (state !== 1) {
throw new Error("ExitController in incorrect state after deployment");
throw new Error(`ExitController in incorrect state ${state} after deployment`);
}

console.log(`Validate exit controller state is ${state}`);
console.log(`Validated exit controller state is ${state}`);

// save exit controller
exitControllers[name] = stringify({
Expand Down

0 comments on commit 2817b08

Please sign in to comment.