!loading && toggleModal()}
+ />
+
+
+ {/* Modal */}
+
+ {/* Header */}
+
+
TOP UP
+
+
+
+ {/* Wallet Connection Status */}
+ {account ? (
+
+ {/* EVM Wallet Address */}
+
{
+ navigator.clipboard.writeText(account.address);
+ toast.success("Wallet address copied!");
+ }}
+ >
+
+
+
+ Wallet: {account.address.slice(0, 6)}...{account.address.slice(-4)}
+
+
+
+
+
+ {/* Hedera Account ID */}
+ {hederaAccountId && (
+
{
+ navigator.clipboard.writeText(hederaAccountId);
+ toast.success("Account ID copied!");
+ }}
+ >
+
+
+
+ Account ID: {hederaAccountId}
+
+
+
+
+ )}
+
+ {/* USDC Balance */}
+
+
+
+
+ USDC Balance: {usdcBalance} USDC
+
+
+ {isRefreshingBalance && (
+
↻
+ )}
+
+
+ ) : (
+
+
+
+ Please connect your wallet to proceed
+
+
+ )}
+
+ {/* Number of credits input */}
+
+
+
+ setCredits(e.target.value)}
+ disabled={loading}
+ className="w-full bg-[#191919] text-white rounded-lg px-4 py-3 pr-12 focus:outline-none focus:ring-2 focus:ring-gray-600 disabled:opacity-50"
+ placeholder="0"
+ min="0"
+ />
+
+
+
+
+ {/* Conversion info */}
+
+ 1 credit = 0.01 USDC | Paying with USDC on Hedera
+
+
+ {/* Amount display */}
+
+ Amount
+
+ ${(amount / 100).toFixed(2)} USDC
+
+
+
+ {/* Status message */}
+ {status && (
+
+
{status}
+ {txHash && (
+
+ View transaction on HashScan →
+
+ )}
+ {status.includes('Please wait 1 minute and refresh') && (
+
+ )}
+
+ )}
+
+ {/* Action buttons */}
+
+
+
+
+