import { PreparedOperation } from '@coinweb/contract-kit';

const awaitedOps: PreparedOperation[] = [];

export const pushAwaitedOp = (op: PreparedOperation | PreparedOperation[]) => {
  if (Array.isArray(op)) {
    awaitedOps.push(...op);
  } else {
    awaitedOps.push(op);
  }
};

export const getAwaitedOps = () => awaitedOps;
