Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #33 from oxygenpay/develop
Browse files Browse the repository at this point in the history
fixed issue with some empty fields from server (#32)
  • Loading branch information
swift1337 authored Sep 5, 2023
2 parents 2761fee + 521d031 commit ad0c9d9
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,23 @@ const WithdrawalDescCard: React.FC<Props> = ({data, openNotificationFunc, addres
</Descriptions.Item>

<Descriptions.Item span={3} label={<span className={b("item-title")}>Transaction ID</span>}>
{renderStrippedStr(data.additionalInfo.withdrawal.transactionHash, 24, -12)}{" "}
<CopyOutlined
className={b("copy-btn")}
onClick={() =>
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 ? (
<CopyOutlined
className={b("copy-btn")}
onClick={() =>
copyToClipboard(
data?.additionalInfo?.withdrawal?.transactionHash
? data.additionalInfo.withdrawal.transactionHash
: "",
openNotificationFunc
)
}
/>
) : null}
</Descriptions.Item>
{data.additionalInfo?.payment?.customerEmail ? (
<>
Expand All @@ -135,15 +140,17 @@ const WithdrawalDescCard: React.FC<Props> = ({data, openNotificationFunc, addres
</Descriptions.Item>
</>
) : null}
<Descriptions.Item>
<a
href={data.additionalInfo.withdrawal.explorerLink}
target="_blank"
rel="noopener noreferrer"
>
View on blockchain explorer <LinkOutlined className={b("copy-btn")} />
</a>
</Descriptions.Item>
{data.additionalInfo.withdrawal.explorerLink != null ? (
<Descriptions.Item>
<a
href={data.additionalInfo.withdrawal.explorerLink ?? ""}
target="_blank"
rel="noopener noreferrer"
>
View on blockchain explorer <LinkOutlined className={b("copy-btn")} />
</a>
</Descriptions.Item>
) : null}
</Descriptions>
</>
)}
Expand Down
12 changes: 6 additions & 6 deletions ui-dashboard/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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;
}

Expand Down

0 comments on commit ad0c9d9

Please sign in to comment.