Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
node._manageErrors = async (
vmResult: any,
vmTrace: any,
vmTracerError?: any
): Promise => {
if (
vmResult.exceptionError &&
vmResult.exceptionError.error === 'smocked revert'
) {
return new TransactionExecutionError(
`VM Exception while processing transaction: revert ${decodeRevertReason(
vmResult.returnValue
)}`
)
}
return originalManagerErrorsFn(vmResult, vmTrace, vmTracerError)
}
}