@0x/utils: Fix FixedMathRevertError.FixedMathBinOpError type.
`@0x/utils`: Have Ganache `Error` -> `RevertError` coercion fail if it can't look up the selector.
This commit is contained in:
committed by
Lawrence Forman
parent
1a3da4b363
commit
018bcf273f
@@ -6,6 +6,10 @@
|
||||
"note": "Allow for array types in `RevertError`s.",
|
||||
"pr": 2075
|
||||
},
|
||||
{
|
||||
"note": "Have Ganache `Error` -> `RevertError` coercion fail if it can't look up the selector.",
|
||||
"pr": "TODO"
|
||||
},
|
||||
{
|
||||
"note": "Add `LibFixedMath` `RevertError` types.",
|
||||
"pr": "TODO"
|
||||
|
||||
@@ -35,7 +35,7 @@ export class FixedMathUnsignedValueError extends RevertError {
|
||||
|
||||
export class FixedMathBinOpError extends RevertError {
|
||||
constructor(error?: BinOpErrorCodes, a?: BigNumber | number | string, b?: BigNumber | number | string) {
|
||||
super('FixedMathBinOpError', 'FixedMathBinOpError(uint8 error, uint256 a, uint256 b)', {
|
||||
super('FixedMathBinOpError', 'FixedMathBinOpError(uint8 error, int256 a, int256 b)', {
|
||||
error,
|
||||
a,
|
||||
b,
|
||||
|
||||
@@ -67,7 +67,7 @@ export function coerceThrownErrorAsRevertError(error: Error): RevertError {
|
||||
return decodeThrownErrorAsRevertError(error);
|
||||
} catch (err) {
|
||||
if (isGanacheTransactionRevertError(error)) {
|
||||
return new AnyRevertError();
|
||||
return err;
|
||||
}
|
||||
// Handle geth transaction reverts.
|
||||
if (isGethTransactionRevertError(error)) {
|
||||
|
||||
Reference in New Issue
Block a user