@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

@ -97,6 +97,10 @@
{ {
"note": "Add `CumulativeRewardIntervalError`.", "note": "Add `CumulativeRewardIntervalError`.",
"pr": 2154 "pr": 2154
},
{
"note": "Add `PreviousEpochNotFinalizedError` to `StakingRevertErrors`.",
"pr": 2155
} }
] ]
}, },

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 = [ const types = [
AmountExceedsBalanceOfPoolError, AmountExceedsBalanceOfPoolError,
BlockTimestampTooLowError, BlockTimestampTooLowError,
CumulativeRewardIntervalError,
EthVaultNotSetError, EthVaultNotSetError,
ExchangeAddressAlreadyRegisteredError, ExchangeAddressAlreadyRegisteredError,
ExchangeAddressNotRegisteredError, ExchangeAddressNotRegisteredError,
@ -275,10 +289,10 @@ const types = [
OnlyCallableIfNotInCatastrophicFailureError, OnlyCallableIfNotInCatastrophicFailureError,
OperatorShareError, OperatorShareError,
PoolExistenceError, PoolExistenceError,
PreviousEpochNotFinalizedError,
ProxyDestinationCannotBeNilError,
RewardVaultNotSetError, RewardVaultNotSetError,
WithdrawAmountExceedsMemberBalanceError, WithdrawAmountExceedsMemberBalanceError,
ProxyDestinationCannotBeNilError,
CumulativeRewardIntervalError,
]; ];
// Register the types we've defined. // Register the types we've defined.