Skip to content

Commit fbf4151

Browse files
committed
feat: add configurable Solana RPC URL env var, simplify premium purchase flow
1 parent 167489b commit fbf4151

2 files changed

Lines changed: 7 additions & 17 deletions

File tree

app/premium/page.tsx

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,6 @@ export default function PremiumPage() {
6060
return;
6161
}
6262

63-
if (!xmrWallet || xmrWallet.length < 90) { // Monero addresses are ~95 chars
64-
setError('Please enter a valid Monero wallet address');
65-
return;
66-
}
6763

6864
setIsProcessing(true);
6965
setError(null);
@@ -110,8 +106,7 @@ export default function PremiumPage() {
110106
.from('users')
111107
.upsert({
112108
solana_wallet: publicKey.toBase58(),
113-
is_premium: true,
114-
xmr_wallet: xmrWallet
109+
is_premium: true
115110
});
116111

117112
if (dbError) throw dbError;
@@ -239,16 +234,8 @@ export default function PremiumPage() {
239234
</div>
240235
) : (
241236
<div className="space-y-6">
242-
<div className="space-y-2">
243-
<label className="text-xs uppercase text-zinc-500 font-bold tracking-widest">Monero Wallet for Mining</label>
244-
<input
245-
type="text"
246-
value={xmrWallet}
247-
onChange={(e) => setXmrWallet(e.target.value)}
248-
placeholder="Enter your XMR address"
249-
className="w-full bg-black border border-zinc-800 p-3 font-mono text-sm focus:border-yellow-400 outline-none transition-colors"
250-
/>
251-
<p className="text-[10px] text-zinc-600 uppercase tracking-tighter">Your hardware will mine to this address</p>
237+
<div className="bg-zinc-900 border border-zinc-800 p-4 text-sm text-zinc-400">
238+
After purchase, open the <strong className="text-white">MineBench Desktop App</strong> → Settings to configure your Monero wallet address.
252239
</div>
253240

254241
{error && (

app/providers.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ import '@solana/wallet-adapter-react-ui/styles.css';
1212

1313
export function SolanaWalletProvider({ children }: { children: React.ReactNode }) {
1414
const network = WalletAdapterNetwork.Mainnet;
15-
const endpoint = React.useMemo(() => clusterApiUrl(network), [network]);
15+
const endpoint = React.useMemo(
16+
() => process.env.NEXT_PUBLIC_SOLANA_RPC_URL || clusterApiUrl(network),
17+
[network]
18+
);
1619

1720
const wallets = React.useMemo(
1821
() => [

0 commit comments

Comments
 (0)