import { TransactionStatus } from '@polymathnetwork/polymesh-sdk/types';
import { ApiQueueItem } from '../ui/definition';

export function buildApiQueueItem<TxArgs extends unknown[]>({
  method,
  params,
  blocking = true,
  txHash,
  status = TransactionStatus.Idle,
  dataResolver,
  type,
}: ApiQueueItem<TxArgs>) {
  return {
    method,
    params,
    blocking,
    txHash,
    status,
    dataResolver,
    type,
  };
}
