{
  "version": 3,
  "sources": ["../../../../src/managers/ToastManager/helpers/getToastTransactionsStatus.ts"],
  "sourcesContent": ["import { ITransactionListItem } from 'lib/sdkDappUi';\nimport { isServerTransactionPending } from 'store/actions/transactions/transactionStateByStatus';\nimport { TransactionServerStatusesEnum } from 'types/enums.types';\n\nexport const getToastTransactionsStatus = (\n  transactions: ITransactionListItem[]\n) => {\n  const processedTransactions = transactions.filter(\n    (tx) =>\n      !isServerTransactionPending(tx.status as TransactionServerStatusesEnum)\n  ).length;\n\n  const totalTransactions = transactions.length;\n\n  if (totalTransactions === 1 && processedTransactions === 1) {\n    return isServerTransactionPending(\n      transactions[0].status as TransactionServerStatusesEnum\n    )\n      ? 'Processing transaction'\n      : 'Transaction processed';\n  }\n\n  return `${processedTransactions} / ${totalTransactions} transactions processed`;\n};\n"],
  "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gCAAAE,IAAA,eAAAC,EAAAH,GACA,IAAAI,EAA2C,+DAGpC,MAAMF,EACXG,GACG,CACH,MAAMC,EAAwBD,EAAa,OACxCE,GACC,IAAC,8BAA2BA,EAAG,MAAuC,CAC1E,EAAE,OAEIC,EAAoBH,EAAa,OAEvC,OAAIG,IAAsB,GAAKF,IAA0B,KAChD,8BACLD,EAAa,CAAC,EAAE,MAClB,EACI,yBACA,wBAGC,GAAGC,CAAqB,MAAME,CAAiB,yBACxD",
  "names": ["getToastTransactionsStatus_exports", "__export", "getToastTransactionsStatus", "__toCommonJS", "import_transactionStateByStatus", "transactions", "processedTransactions", "tx", "totalTransactions"]
}
