Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function PromiEvent() {
const { resolve, reject, eventEmitter } = Web3PromiEvent.apply(
null,
arguments
);
const originalStackTrace = new Error().stack;
function rejectHijacker(e) {
try {
const stackTrace = originalStackTrace.replace(
/^Error: \n/,
e.stack.split("\n")[0]
);
e.hijackedStack = e.stack;
e.stack = stackTrace;
} catch (_) {