herald-exchange-onramp_offramp-widget 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,75 @@
1
+ import styles from "../../assets/css/style.module.css";
2
+
3
+ const CardTransactionDetails = ({ data }: { data: any }) => {
4
+ return (
5
+ <div className={styles.details_frame}>
6
+ <div className={styles.f_details_head}>
7
+ <div></div>
8
+ <div className={styles.f_details_titles}>
9
+ Buy{" "}
10
+ {parseFloat(data?.transactionDetails?.onramp_transaction?.from_value || "0")?.toFixed(4)}{" "}
11
+ {data?.transactionDetails?.onramp_transaction?.from} @{" "}
12
+ {parseFloat(data?.transactionDetails?.onramp_transaction?.to_value || "0")?.toFixed(4)}{" "}
13
+ {data?.transactionDetails?.onramp_transaction?.to}
14
+ </div>
15
+ </div>
16
+ <div className={styles.f_details_info_box}>
17
+ <div className={styles.f_details_card}>
18
+ <span>Order Status</span>
19
+ <span>
20
+ {/* <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
21
+ <g id="Flat_Color" fill="#20bf55" data-name="Flat Color">
22
+ <path d="M12 22.75a10.75 10.75 0 0 1 0-21.5 10.5 10.5 0 0 1 4.82 1.15.75.75 0 0 1-.68 1.34 9 9 0 0 0-4.14-1A9.25 9.25 0 1 0 21.25 12a2 2 0 0 0 0-.25.75.75 0 1 1 1.5-.14V12A10.76 10.76 0 0 1 12 22.75"></path>
23
+ <path d="M11.82 15.41a.7.7 0 0 1-.52-.22l-4.83-4.74a.75.75 0 0 1 0-1.06.77.77 0 0 1 1.07 0l4.29 4.23 9.65-9.49a.77.77 0 0 1 1.07 0 .75.75 0 0 1 0 1.06l-10.18 10a.74.74 0 0 1-.55.22"></path>
24
+ </g>
25
+ </svg> */}
26
+ {data?.transactionDetails?.onramp_transaction?.status}
27
+ </span>
28
+ </div>
29
+ <div className={styles.f_details_card}>
30
+ <span>Order Id</span>
31
+ <span>
32
+ {data?.transactionDetails?.onramp_transaction?.unique_id?.slice(0, 10)}...
33
+ {data?.transactionDetails?.onramp_transaction?.unique_id?.slice(
34
+ data?.transactionDetails?.onramp_transaction?.unique_id?.length - 10,
35
+ data?.transactionDetails?.onramp_transaction?.unique_id?.length
36
+ )}
37
+ </span>
38
+ </div>
39
+ <div className={styles.f_details_card}>
40
+ <span>Order Date</span>
41
+ <span>
42
+ {" "}
43
+ {new Date(data?.transactionDetails?.onramp_transaction?.created_at || "")
44
+ .toUTCString()
45
+ .replace("GMT", "UTC")}
46
+ </span>
47
+ </div>
48
+ <div className={styles.f_details_card}>
49
+ <span>Exchange Rate</span>
50
+ <span>
51
+ 1 {data?.transactionDetails?.onramp_transaction?.from} ={" "}
52
+ {parseFloat(data?.transactionDetails?.onramp_transaction?.exchange_rate || "")?.toFixed(
53
+ 4
54
+ )}{" "}
55
+ {data?.transactionDetails?.onramp_transaction?.to}
56
+ </span>
57
+ </div>
58
+ <div className={styles.f_details_card}>
59
+ <span>Service Fee</span>
60
+ <span>
61
+ {data?.transactionDetails?.onramp_transaction?.service_fee}{" "}
62
+ {data?.transactionDetails?.onramp_transaction?.from}
63
+ </span>
64
+ </div>
65
+
66
+ <div className={styles.f_details_card}>
67
+ <span>Wallet Address</span>
68
+ <span>{data?.transactionDetails?.onramp_transaction?.wallet_address}</span>
69
+ </div>
70
+ </div>
71
+ </div>
72
+ );
73
+ };
74
+
75
+ export default CardTransactionDetails;