@0x/order-utils: Add PreviousEpochNotFinalizedError to StakingRevertErrors.

This commit is contained in:
Lawrence Forman
2019-09-13 21:34:48 -04:00
committed by Lawrence Forman
parent a1aad2e55e
commit ada1de429c
2 changed files with 20 additions and 2 deletions

View File

@@ -254,9 +254,23 @@ export class CumulativeRewardIntervalError extends RevertError {
}
}
export class PreviousEpochNotFinalizedError extends RevertError {
constructor(
closingEpoch?: BigNumber | number | string,
unfinalizedPoolsRemaining?: BigNumber | number | string,
) {
super(
'PreviousEpochNotFinalizedError',
'PreviousEpochNotFinalizedError(uint256 closingEpoch, uint256 unfinalizedPoolsRemaining)',
{ closingEpoch, unfinalizedPoolsRemaining },
);
}
}
const types = [
AmountExceedsBalanceOfPoolError,
BlockTimestampTooLowError,
CumulativeRewardIntervalError,
EthVaultNotSetError,
ExchangeAddressAlreadyRegisteredError,
ExchangeAddressNotRegisteredError,
@@ -275,10 +289,10 @@ const types = [
OnlyCallableIfNotInCatastrophicFailureError,
OperatorShareError,
PoolExistenceError,
PreviousEpochNotFinalizedError,
ProxyDestinationCannotBeNilError,
RewardVaultNotSetError,
WithdrawAmountExceedsMemberBalanceError,
ProxyDestinationCannotBeNilError,
CumulativeRewardIntervalError,
];
// Register the types we've defined.