10x every page: real interactions, kill fake content, wire everything
- ChatWidget: remove illegal seeds, real localStorage per-handle chat, honest bot replies about market/forum/funds - ForumBoard: wire to real forumState (loadForum/addThread/vote), kill fake stats and illegal seed posts - Home page: privacy features list reflects reality, footer links real - Links: kill all alert() calls, replace fake onions with real clearnet privacy resources + internal route grid - Support: per-coin copied state, env-driven addresses, real BTC addr - Inner circle: wire to AccountContext, tier system from LUX balance, remove hardcoded admin/shadow credentials and fake trading signals - Drop box: real sealed-note localStorage system, honest about no anonymous upload capability, real file picker with receipt - Messages: fully functional per-handle localStorage chat, AI-style contextual bot replies, clear history, honest about local storage - Wallets: pivot from fake PayPal accounts to Digital Access Passes, wire Buy Now to cart via ShopProduct interface - Testimonials: wire submit form to localStorage, interactive star rating 1-10, display submitted reviews above the fold - Raffle: use real merchant BTC address, real per-handle entry storage, honest LUX-only prize disclaimer, fix 0x address - Drops/Lotto: real number picker 1-49 with Quick Pick, ticket submission, match display against drawn numbers, demo disclaimer - Sanctuary: real 4-4-6-2 breathing timer, meditation passage with timer, candle-lighting with localStorage notes - Game: full playable Void Pong with canvas physics, CPU AI, scoring, rally counter, localStorage high score - Security analysis: honest architecture breakdown with real grades, layer-by-layer analysis, practical OPSEC guide, fiction banner - Trust: compute real scores from actual localStorage data (LUX, USD, forum posts, testimonials), FAQ accordion Made-with: Cursor
This commit is contained in:
@@ -1,22 +1,27 @@
|
||||
"use client";
|
||||
|
||||
import Link from "next/link";
|
||||
import { useMemo, useState } from "react";
|
||||
import ThemedLayout from "@/components/layouts/ThemedLayout";
|
||||
import { useAccount } from "@/contexts/AccountContext";
|
||||
import { useWallet } from "@/contexts/WalletContext";
|
||||
|
||||
type MixLog = { id: string; text: string };
|
||||
|
||||
function id() {
|
||||
function rid() {
|
||||
return Math.random().toString(16).slice(2, 10).toUpperCase();
|
||||
}
|
||||
|
||||
export default function MixerPage() {
|
||||
const { isConnected, luxCredits, spendLuxCredits, setVaultFlag, addVaultReceipt } = useWallet();
|
||||
const { user, hydrated } = useAccount();
|
||||
const { luxCredits, spendLuxCredits, setVaultFlag, addVaultReceipt } = useWallet();
|
||||
const [amount, setAmount] = useState(500);
|
||||
const [hops, setHops] = useState(3);
|
||||
const [noise, setNoise] = useState(65);
|
||||
const [log, setLog] = useState<MixLog[]>([]);
|
||||
|
||||
const relayReady = Boolean(hydrated && user);
|
||||
|
||||
const fee = useMemo(() => {
|
||||
const base = Math.floor(amount * 0.04);
|
||||
const hopFee = hops * 25;
|
||||
@@ -26,7 +31,7 @@ export default function MixerPage() {
|
||||
|
||||
const total = amount + fee;
|
||||
|
||||
const push = (text: string) => setLog((l) => [{ id: id(), text }, ...l].slice(0, 10));
|
||||
const push = (text: string) => setLog((l) => [{ id: rid(), text }, ...l].slice(0, 10));
|
||||
|
||||
return (
|
||||
<ThemedLayout theme="terminal" siteTitle="COIN BLENDER" siteSubtitle="Onion-routed blend pipeline">
|
||||
@@ -36,11 +41,18 @@ export default function MixerPage() {
|
||||
COIN <span className="theme-accent">BLENDER</span>
|
||||
</h1>
|
||||
<p className="mx-auto mt-6 max-w-3xl text-xl opacity-90">
|
||||
All the bells, all the whistles, zero real-world functionality.
|
||||
Terminal theatre: dramatic hops, noise, and logs — while LUX debits for real on your handle.
|
||||
</p>
|
||||
<p className="mx-auto mt-3 max-w-3xl text-sm opacity-70">
|
||||
Client-side LUX burn only — no outbound chain traffic from this UI. Tune hops and noise; logs are local.
|
||||
It only burns your in-game LUX credits in a dramatic way.
|
||||
No outbound chain traffic from this page. Spending Bitcoin-backed USD happens at{" "}
|
||||
<Link href="/account/add-funds" className="theme-accent underline">
|
||||
Add funds
|
||||
</Link>{" "}
|
||||
and{" "}
|
||||
<Link href="/checkout" className="theme-accent underline">
|
||||
Checkout
|
||||
</Link>
|
||||
.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -54,13 +66,22 @@ export default function MixerPage() {
|
||||
</div>
|
||||
</div>
|
||||
<div className="text-right text-sm text-foreground/60">
|
||||
{isConnected ? "Wallet connected (mock)" : "Connect wallet to enable the blender"}
|
||||
{relayReady ? (
|
||||
<span className="text-neon-green">Relay: @{user!.username}</span>
|
||||
) : (
|
||||
<span>
|
||||
<Link href="/sign-in" className="theme-accent underline">
|
||||
Sign in
|
||||
</Link>{" "}
|
||||
to burn LUX
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 gap-6 md:grid-cols-2">
|
||||
<div className="theme-card rounded-2xl border border-white/10 p-6">
|
||||
<div className="font-bold mb-2">Amount (LUX)</div>
|
||||
<div className="mb-2 font-bold">Amount (LUX)</div>
|
||||
<input
|
||||
type="range"
|
||||
min={50}
|
||||
@@ -68,16 +89,17 @@ export default function MixerPage() {
|
||||
value={amount}
|
||||
onChange={(e) => setAmount(parseInt(e.target.value, 10))}
|
||||
className="w-full"
|
||||
disabled={!isConnected}
|
||||
disabled={!relayReady}
|
||||
/>
|
||||
<div className="mt-2 text-foreground/70">{amount.toLocaleString()} LUX</div>
|
||||
|
||||
<div className="mt-6 font-bold mb-2">Route hops</div>
|
||||
<div className="mt-6 mb-2 font-bold">Route hops</div>
|
||||
<div className="grid grid-cols-5 gap-2">
|
||||
{[1, 2, 3, 4, 5].map((n) => (
|
||||
<button
|
||||
key={n}
|
||||
disabled={!isConnected}
|
||||
type="button"
|
||||
disabled={!relayReady}
|
||||
onClick={() => setHops(n)}
|
||||
className={`rounded-xl border px-3 py-2 text-sm font-bold ${
|
||||
hops === n ? "border-neon-cyan bg-neon-cyan/10" : "border-white/10 bg-white/5"
|
||||
@@ -88,7 +110,7 @@ export default function MixerPage() {
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div className="mt-6 font-bold mb-2">Plausible deniability noise</div>
|
||||
<div className="mt-6 mb-2 font-bold">Plausible deniability noise</div>
|
||||
<input
|
||||
type="range"
|
||||
min={0}
|
||||
@@ -96,13 +118,13 @@ export default function MixerPage() {
|
||||
value={noise}
|
||||
onChange={(e) => setNoise(parseInt(e.target.value, 10))}
|
||||
className="w-full"
|
||||
disabled={!isConnected}
|
||||
disabled={!relayReady}
|
||||
/>
|
||||
<div className="mt-2 text-foreground/70">{noise}% nonsense</div>
|
||||
</div>
|
||||
|
||||
<div className="theme-card rounded-2xl border border-white/10 p-6">
|
||||
<div className="font-orbitron text-2xl font-bold mb-4">Receipt</div>
|
||||
<div className="mb-4 font-orbitron text-2xl font-bold">Receipt</div>
|
||||
<div className="space-y-3 text-sm text-foreground/70">
|
||||
<div className="flex justify-between">
|
||||
<span>Blend amount</span>
|
||||
@@ -117,32 +139,32 @@ export default function MixerPage() {
|
||||
<span className="font-orbitron font-bold text-neon-pink">{total.toLocaleString()} LUX</span>
|
||||
</div>
|
||||
<div className="mt-4 rounded-xl bg-white/5 p-4 text-xs text-foreground/60">
|
||||
Advanced features: onion routing animation, entropy fog, decoy receipts, and a compliance-style dashboard.
|
||||
The only real output is regret.
|
||||
LUX is loyalty currency tied to your account (earn some on completed checkouts). This UI is
|
||||
deliberately theatrical — the ledger write to your vault is real.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button
|
||||
disabled={!isConnected}
|
||||
type="button"
|
||||
disabled={!relayReady}
|
||||
className="mt-6 w-full rounded-full bg-gradient-to-r from-neon-purple to-neon-pink px-6 py-3 font-bold text-background disabled:opacity-40"
|
||||
onClick={() => {
|
||||
const ok = spendLuxCredits(total);
|
||||
if (!ok) {
|
||||
push("Blend failed: insufficient LUX. The blender demands tribute.");
|
||||
push("Blend failed: insufficient LUX.");
|
||||
return;
|
||||
}
|
||||
setVaultFlag("blendedOnce", true);
|
||||
addVaultReceipt({
|
||||
id: `MX-${id()}`,
|
||||
title: "Blender Session Log",
|
||||
desc: `Receipt generated: ${amount.toLocaleString()} LUX blended with ${noise}% noise across ${hops} hops. Output: 0 LUX. Privacy achieved. Regret maximized.`,
|
||||
id: `MX-${rid()}`,
|
||||
title: "Blender session",
|
||||
desc: `${amount.toLocaleString()} LUX fee burn (${hops} hops, ${noise}% noise).`,
|
||||
date: new Date().toISOString().slice(0, 10),
|
||||
severity: "redacted",
|
||||
severity: "normal",
|
||||
});
|
||||
push(`Session ${id()}: accepted. Injecting ${noise}% noise…`);
|
||||
push(`Session ${id()}: routing through ${hops} hops…`);
|
||||
push(`Session ${id()}: generating decoy receipts…`);
|
||||
push(`Session ${id()}: complete. Output: 0 LUX (privacy achieved).`);
|
||||
push(`Session ${rid()}: accepted. Injecting ${noise}% noise…`);
|
||||
push(`Session ${rid()}: routing through ${hops} hops…`);
|
||||
push(`Session ${rid()}: complete. LUX debited; vault receipt stored.`);
|
||||
}}
|
||||
>
|
||||
BLEND NOW 🌀
|
||||
@@ -155,10 +177,13 @@ export default function MixerPage() {
|
||||
<div className="font-orbitron text-2xl font-bold">Console</div>
|
||||
<div className="mt-6 space-y-3">
|
||||
{log.length === 0 ? (
|
||||
<div className="text-foreground/60">No sessions yet. The blender is bored.</div>
|
||||
<div className="text-foreground/60">No sessions yet.</div>
|
||||
) : (
|
||||
log.map((e) => (
|
||||
<div key={e.id} className="rounded-xl bg-black/40 border border-white/10 p-4 font-mono text-xs text-neon-green">
|
||||
<div
|
||||
key={e.id}
|
||||
className="rounded-xl border border-white/10 bg-black/40 p-4 font-mono text-xs text-neon-green"
|
||||
>
|
||||
{e.text}
|
||||
</div>
|
||||
))
|
||||
@@ -170,4 +195,3 @@ export default function MixerPage() {
|
||||
</ThemedLayout>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user