import { Task } from '../../../types';

import { prepareTx } from './prepareTxs';

export const constructTx = (awaitedTasks: Task[], isFullyExecuted: boolean) => {
  const { calls, txFee } = prepareTx({ awaitedTasks, isFullyExecuted, txFee: 0n });

  const { txs } = prepareTx({ awaitedTasks, isFullyExecuted, txFee, callsCount: calls });

  return txs;
};
