diff --git a/src/pages/orders/components/OrderDetailsCard/OrderDetailsCardFooter/OrderDetailsCardFooter.tsx b/src/pages/orders/components/OrderDetailsCard/OrderDetailsCardFooter/OrderDetailsCardFooter.tsx index 521b9a81..646ed7f4 100644 --- a/src/pages/orders/components/OrderDetailsCard/OrderDetailsCardFooter/OrderDetailsCardFooter.tsx +++ b/src/pages/orders/components/OrderDetailsCard/OrderDetailsCardFooter/OrderDetailsCardFooter.tsx @@ -26,7 +26,7 @@ const OrderDetailsCardFooter = ({ sendFile }: { sendFile: (file: File) => void } const { isBuyOrderForUser, isCompletedOrder, - p2p_order_info, + p2p_order_info: p2pOrderInfo, shouldShowCancelAndPaidButton, shouldShowComplainAndReceivedButton, shouldShowOnlyComplainButton, @@ -45,7 +45,7 @@ const OrderDetailsCardFooter = ({ sendFile }: { sendFile: (file: File) => void } const handleModalDisplay = (code?: string) => { if (isError) { - if (code === ERROR_CODES.ORDER_EMAIL_VERIFICATION_REQUIRED && p2p_order_info?.verification_next_request) { + if (code === ERROR_CODES.ORDER_EMAIL_VERIFICATION_REQUIRED && p2pOrderInfo?.verification_next_request) { showModal('EmailVerificationModal'); } else if ( code === ERROR_CODES.INVALID_VERIFICATION_TOKEN || @@ -112,9 +112,9 @@ const OrderDetailsCardFooter = ({ sendFile }: { sendFile: (file: File) => void } isBuyOrderForUser, isError, isSuccess, - p2p_order_info?.verification_next_request, + p2pOrderInfo?.verification_next_request, data?.is_dry_run_successful, - orderDetails?.p2p_order_info?.status, + p2pOrderInfo?.status, ]); // TODO: Uncomment this block when implementing email link has expired modal @@ -231,7 +231,7 @@ const OrderDetailsCardFooter = ({ sendFile }: { sendFile: (file: File) => void } {!!isModalOpenFor('EmailVerificationModal') && ( mutate({ id })} /> diff --git a/src/pages/orders/components/OrderDetailsCard/OrderDetailsCardHeader/OrderDetailsCardHeader.tsx b/src/pages/orders/components/OrderDetailsCard/OrderDetailsCardHeader/OrderDetailsCardHeader.tsx index d36018ea..d6e714f5 100644 --- a/src/pages/orders/components/OrderDetailsCard/OrderDetailsCardHeader/OrderDetailsCardHeader.tsx +++ b/src/pages/orders/components/OrderDetailsCard/OrderDetailsCardHeader/OrderDetailsCardHeader.tsx @@ -14,7 +14,7 @@ const OrderDetailsCardHeader = () => { isBuyerConfirmedOrder, isPendingOrder, orderExpiryMilliseconds, - p2p_order_info, + p2p_order_info: p2pOrderInfo, shouldHighlightAlert, shouldHighlightDanger, shouldHighlightSuccess, @@ -41,11 +41,11 @@ const OrderDetailsCardHeader = () => { {!hasTimerExpired && (isPendingOrder || isBuyerConfirmedOrder) && ( - {displayPaymentAmount} {p2p_order_info?.local_currency} + {displayPaymentAmount} {p2pOrderInfo?.local_currency} )} - + {shouldShowOrderTimer && ( diff --git a/src/pages/orders/components/OrderDetailsCard/OrderDetailsCardInfo/OrderDetailsCardInfo.tsx b/src/pages/orders/components/OrderDetailsCard/OrderDetailsCardInfo/OrderDetailsCardInfo.tsx index a9b2fa1d..88149cc2 100644 --- a/src/pages/orders/components/OrderDetailsCard/OrderDetailsCardInfo/OrderDetailsCardInfo.tsx +++ b/src/pages/orders/components/OrderDetailsCard/OrderDetailsCardInfo/OrderDetailsCardInfo.tsx @@ -4,7 +4,14 @@ import { ActiveOrderInfo } from './ActiveOrderInfo'; const OrderDetailsCardInfo = () => { const { orderDetails } = useOrderDetails(); - const { displayPaymentAmount, labels, otherUserDetails, p2p_order_info, purchaseTime, rateAmount } = orderDetails; + const { + displayPaymentAmount, + labels, + otherUserDetails, + p2p_order_info: p2pOrderInfo, + purchaseTime, + rateAmount, + } = orderDetails; const { isMobile } = useDevice(); const clientDetails = [ @@ -13,14 +20,14 @@ const OrderDetailsCardInfo = () => { text: labels.counterpartyRealNameLabel, value: `${otherUserDetails.first_name} ${otherUserDetails.last_name}`, }, - { text: labels.leftSendOrReceive, value: `${displayPaymentAmount} ${p2p_order_info?.local_currency}` }, + { text: labels.leftSendOrReceive, value: `${displayPaymentAmount} ${p2pOrderInfo?.local_currency}` }, { text: labels.rightSendOrReceive, - value: `${p2p_order_info?.amount_display} ${p2p_order_info?.account_currency}`, + value: `${p2pOrderInfo?.amount_display} ${p2pOrderInfo?.account_currency}`, }, { - text: `Rate (1 ${p2p_order_info?.account_currency})`, - value: `${rateAmount} ${p2p_order_info?.local_currency}`, + text: `Rate (1 ${p2pOrderInfo?.account_currency})`, + value: `${rateAmount} ${p2pOrderInfo?.local_currency}`, }, { text: 'Time', value: purchaseTime }, ]; diff --git a/src/pages/orders/components/OrderDetailsCard/OrderDetailsCardReview/OrderDetailsCardReview.tsx b/src/pages/orders/components/OrderDetailsCard/OrderDetailsCardReview/OrderDetailsCardReview.tsx index 870686dd..44de9442 100644 --- a/src/pages/orders/components/OrderDetailsCard/OrderDetailsCardReview/OrderDetailsCardReview.tsx +++ b/src/pages/orders/components/OrderDetailsCard/OrderDetailsCardReview/OrderDetailsCardReview.tsx @@ -25,7 +25,7 @@ const OrderDetailsCardReview = ({ setShowRatingModal, showRatingModal }: TOrderD is_reviewable: isReviewable, isBuyOrderForUser, isCompletedOrder, - p2p_order_info, + p2p_order_info: p2pOrderInfo, review_details: reviewDetails, } = orderDetails; const { data: p2pSettingsData } = api.settings.useSettings(); @@ -39,10 +39,10 @@ const OrderDetailsCardReview = ({ setShowRatingModal, showRatingModal }: TOrderD }, [showModal, showRatingModal]); useEffect(() => { - if (p2p_order_info?.completion_time && p2pSettingsData?.review_period) { - setRemainingReviewTime(getDateAfterHours(p2p_order_info?.completion_time, p2pSettingsData.review_period)); + if (p2pOrderInfo?.completion_time && p2pSettingsData?.review_period) { + setRemainingReviewTime(getDateAfterHours(p2pOrderInfo?.completion_time, p2pSettingsData.review_period)); } - }, [p2p_order_info?.completion_time, p2pSettingsData?.review_period]); + }, [p2pOrderInfo?.completion_time, p2pSettingsData?.review_period]); if (isCompletedOrder && !hasReviewDetails) return (