diff --git a/src/components/PaymentModal.tsx b/src/components/PaymentModal.tsx index a0a644a..80ef67f 100644 --- a/src/components/PaymentModal.tsx +++ b/src/components/PaymentModal.tsx @@ -2,15 +2,15 @@ import { useCallback, useMemo, useState } from 'react'; import BN from 'bn.js'; -import assert from 'assert'; +// import assert from 'assert'; -import { Connection } from '@solana/web3.js'; +import { clusterApiUrl, Connection } from '@solana/web3.js'; import { sendSolanaTokenPayment } from '@/services/solana'; import { PaymentModalProps } from '@/types'; -assert(process.env.NEXT_PUBLIC_SOLANA_RPC_URL, 'SOLANA_RPC_URL is required'); -const SOLANA_RPC_URL = process.env.NEXT_PUBLIC_SOLANA_RPC_URL; +// assert(process.env.NEXT_PUBLIC_SOLANA_RPC_URL, 'SOLANA_RPC_URL is required'); +// const SOLANA_RPC_URL = process.env.NEXT_PUBLIC_SOLANA_RPC_URL; export default function PaymentModal({ isOpen, @@ -22,7 +22,8 @@ export default function PaymentModal({ const [loading, setLoading] = useState(false); const [error, setError] = useState(''); - const connection = useMemo(() => new Connection(SOLANA_RPC_URL), []) + const connection = useMemo(() => new Connection(clusterApiUrl("mainnet-beta")), []); + // const connection = useMemo(() => new Connection(SOLANA_RPC_URL), []) // Get configuration from environment variables directly const amount = parseInt(process.env.NEXT_PUBLIC_SOLANA_PAYMENT_AMOUNT!);