update tests

This commit is contained in:
Michael Zhu
2019-09-26 15:59:12 -07:00
parent 3f8639bd9c
commit e954e9ca20
24 changed files with 413 additions and 337 deletions

View File

@@ -64,10 +64,10 @@ export class InsufficientEthForFeeError extends RevertError {
}
}
export class OversoldWethError extends RevertError {
constructor(wethSold?: BigNumber | number | string, msgValue?: BigNumber | number | string) {
super('OversoldWethError', 'OversoldWethError(uint256 wethSold, uint256 msgValue)', {
wethSold,
export class OverspentWethError extends RevertError {
constructor(wethSpent?: BigNumber | number | string, msgValue?: BigNumber | number | string) {
super('OverspentWethError', 'OverspentWethError(uint256 wethSpent, uint256 msgValue)', {
wethSpent,
msgValue,
});
}
@@ -87,9 +87,9 @@ export class DefaultFunctionWethContractOnlyError extends RevertError {
}
}
export class MsgValueCantEqualZeroError extends RevertError {
export class MsgValueCannotEqualZeroError extends RevertError {
constructor() {
super('MsgValueCantEqualZeroError', 'MsgValueCantEqualZeroError()', {});
super('MsgValueCannotEqualZeroError', 'MsgValueCannotEqualZeroError()', {});
}
}
@@ -109,10 +109,10 @@ const types = [
UnsupportedFeeError,
FeePercentageTooLargeError,
InsufficientEthForFeeError,
OversoldWethError,
OverspentWethError,
TransferFailedError,
DefaultFunctionWethContractOnlyError,
MsgValueCantEqualZeroError,
MsgValueCannotEqualZeroError,
Erc721AmountMustEqualOneError,
];

View File

@@ -351,7 +351,7 @@ export function getThrownErrorRevertErrorBytes(error: Error | GanacheTransaction
// so we do nothing.
}
}
throw new Error(`Cannot decode thrown Errror "${error.message}" as a RevertError`);
throw new Error(`Cannot decode thrown Error "${error.message}" as a RevertError`);
}
function isGanacheTransactionRevertError(