diff --git a/ui-dashboard/src/components/withdraw-desc-card/withdraw-desc-card.tsx b/ui-dashboard/src/components/withdraw-desc-card/withdraw-desc-card.tsx index 8fa945c..fad3212 100644 --- a/ui-dashboard/src/components/withdraw-desc-card/withdraw-desc-card.tsx +++ b/ui-dashboard/src/components/withdraw-desc-card/withdraw-desc-card.tsx @@ -105,18 +105,23 @@ const WithdrawalDescCard: React.FC = ({data, openNotificationFunc, addres Transaction ID}> - {renderStrippedStr(data.additionalInfo.withdrawal.transactionHash, 24, -12)}{" "} - - copyToClipboard( - data?.additionalInfo?.withdrawal?.transactionHash - ? data.additionalInfo.withdrawal.transactionHash - : "", - openNotificationFunc - ) - } - /> + {data.additionalInfo.withdrawal.transactionHash != null + ? renderStrippedStr(data.additionalInfo.withdrawal.transactionHash, 24, -12) + : "Transaction hash is not created yet"} + {data.additionalInfo.withdrawal.transactionHash != null ? " " : null} + {data.additionalInfo.withdrawal.transactionHash != null ? ( + + copyToClipboard( + data?.additionalInfo?.withdrawal?.transactionHash + ? data.additionalInfo.withdrawal.transactionHash + : "", + openNotificationFunc + ) + } + /> + ) : null} {data.additionalInfo?.payment?.customerEmail ? ( <> @@ -135,15 +140,17 @@ const WithdrawalDescCard: React.FC = ({data, openNotificationFunc, addres ) : null} - - - View on blockchain explorer - - + {data.additionalInfo.withdrawal.explorerLink != null ? ( + + + View on blockchain explorer + + + ) : null} )} diff --git a/ui-dashboard/src/types/index.ts b/ui-dashboard/src/types/index.ts index f70c892..c5d1531 100644 --- a/ui-dashboard/src/types/index.ts +++ b/ui-dashboard/src/types/index.ts @@ -137,9 +137,9 @@ interface AdditionalPaymentInfo { interface AdditionalWithdrawalInfo { addressId: string; balanceId: string; - explorerLink: string; + explorerLink: string | null; serviceFee: string; - transactionHash: string; + transactionHash: string | null; } interface AdditionalInfo { @@ -150,15 +150,15 @@ interface AdditionalInfo { interface Payment { additionalInfo?: AdditionalInfo; id: string; - orderId: string; + orderId?: string; type: PaymentType; status: PaymentStatus; createdAt: string; currency: CurrencyWithFiat; price: string; - redirectUrl: string; - paymentUrl: string; - description: string; + redirectUrl?: string; + paymentUrl?: string; + description?: string; isTest: boolean; }