All files / src/features/Merchants/MerchantSidePanel/utils statusHelpers.ts

85.71% Statements 6/7
75% Branches 3/4
100% Functions 1/1
83.33% Lines 5/6

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16144x         144x       635x 624x     624x    
const MID_ERROR_STATUSES_WP = [
  "has_mid_not_ready",
  "preapproved_mid_issue",
] as const;
 
export const isMidErrorStatus = (
  statusName?: string,
  processor?: string,
): boolean => {
  if (!statusName) return false;
  Iif (processor === "worldpay") {
    return (MID_ERROR_STATUSES_WP as readonly string[]).includes(statusName);
  }
  return statusName === "has_mid_not_ready";
};