import { Row, Col, message, Progress, Button, Avatar } from "antd"; import { useState } from "react"; import CustomInput from "../../components/Input/CustomInput"; import copy from "../../assets/paymentcopy.svg"; import { IProductCheckoutProps } from "../../components/types"; import ConfirmationModal from "../../components/Model/ConfirmationModal"; import { useAppSelector } from "../../app/hooks"; import ProgressTimer from "../../components/Loading/ProgressTimer"; const SolanaNetwork = ({ setSelectedWallet, makePayment, redirect, successMessage }: IProductCheckoutProps) => { const [showConfirmation, setShowConfirmation] = useState(false); const { transactionResponse } = useAppSelector((s) => s.checkout); /*const { data, error, isFetching, isLoading, isSuccess } = usePaymentListenerQuery(transactionResponse.reference);*/ async function copyText(text: string) { try { await navigator.clipboard.writeText(text); message.info({ content: "copied", duration: 3 }); } catch { message.error({ content: "unable to copy", duration: 3 }); } } async function copyAmount(text: number) { let res = text.toString(); try { await navigator.clipboard.writeText(res); message.info({ content: "amount copied", duration: 3 }); } catch { message.error({ content: "unable to copy", duration: 3 }); } } function timeOut() { makePayment("solana", true); } function initiateTransactionAgain() { makePayment("solana", true); } function checkTransactionStatus() { setShowConfirmation(true); } return (
{transactionResponse?.imageFilePath && ( )}

{transactionResponse.email}

{transactionResponse.expectedAmountInCrypto}{" "} {transactionResponse.crypto}

Transaction fee : {transactionResponse.feeInCrypto}{" "} {transactionResponse.crypto}


Send payment within


(cryptocurrency should be sent to this wallet address)

Note: The wallet address is on the SOL network. Please ensure that you select the SOL network when sending tokens to avoid token loss.

{showConfirmation && ( setShowConfirmation(false)} title="" setSelectedWallet={setSelectedWallet} initiateAgain={initiateTransactionAgain} transaction={transactionResponse} redirect={redirect} successMessage={successMessage} /> )}
); }; export default SolanaNetwork;