Skip to content
This repository was archived by the owner on Apr 7, 2026. It is now read-only.

Commit 45567cf

Browse files
WOPRclaude
andcommitted
fix: review findings — remove unused amountUsd prop, use semantic QR colors
- Remove amountUsd from PaymentMethodPicker (unused, confusing API surface) - Replace bg-white on QR container with bg-background + semantic CSS vars - QR uses hsl(var(--background/--foreground)) for dark mode compatibility Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 27285fa commit 45567cf

3 files changed

Lines changed: 6 additions & 8 deletions

File tree

‎src/__tests__/payment-method-picker.test.tsx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,20 @@ const METHODS: SupportedPaymentMethod[] = [
5959

6060
describe("PaymentMethodPicker", () => {
6161
it("renders all methods", () => {
62-
render(<PaymentMethodPicker methods={METHODS} amountUsd={25} onSelect={vi.fn()} />);
62+
render(<PaymentMethodPicker methods={METHODS} onSelect={vi.fn()} />);
6363
expect(screen.getByText("Bitcoin")).toBeInTheDocument();
6464
expect(screen.getByText("USDT on Tron")).toBeInTheDocument();
6565
});
6666

6767
it("filters by search text", async () => {
68-
render(<PaymentMethodPicker methods={METHODS} amountUsd={25} onSelect={vi.fn()} />);
68+
render(<PaymentMethodPicker methods={METHODS} onSelect={vi.fn()} />);
6969
await userEvent.type(screen.getByPlaceholderText(/search/i), "tron");
7070
expect(screen.getByText("USDT on Tron")).toBeInTheDocument();
7171
expect(screen.queryByText("Bitcoin")).not.toBeInTheDocument();
7272
});
7373

7474
it("filters by Stablecoins pill", async () => {
75-
render(<PaymentMethodPicker methods={METHODS} amountUsd={25} onSelect={vi.fn()} />);
75+
render(<PaymentMethodPicker methods={METHODS} onSelect={vi.fn()} />);
7676
await userEvent.click(screen.getByText("Stablecoins"));
7777
expect(screen.getByText("USDT on Tron")).toBeInTheDocument();
7878
expect(screen.getByText("USDC on Polygon")).toBeInTheDocument();
@@ -81,7 +81,7 @@ describe("PaymentMethodPicker", () => {
8181

8282
it("calls onSelect when a method is clicked", async () => {
8383
const onSelect = vi.fn();
84-
render(<PaymentMethodPicker methods={METHODS} amountUsd={25} onSelect={onSelect} />);
84+
render(<PaymentMethodPicker methods={METHODS} onSelect={onSelect} />);
8585
await userEvent.click(screen.getByText("Bitcoin"));
8686
expect(onSelect).toHaveBeenCalledWith(METHODS[0]);
8787
});

‎src/components/billing/deposit-view.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ export function DepositView({ checkout, status, onBack }: DepositViewProps) {
4545
<p className="text-xs text-muted-foreground">
4646
on {checkout.chain} &middot; ${checkout.amountUsd.toFixed(2)} USD
4747
</p>
48-
<div className="mx-auto w-fit rounded-lg bg-white p-3" aria-hidden="true">
49-
<QRCodeSVG value={checkout.depositAddress} size={140} />
48+
<div className="mx-auto w-fit rounded-lg border border-border bg-background p-3" aria-hidden="true">
49+
<QRCodeSVG value={checkout.depositAddress} size={140} bgColor="hsl(var(--background))" fgColor="hsl(var(--foreground))" />
5050
</div>
5151
<div className="flex items-center gap-2 rounded-lg border border-border bg-muted/50 px-3 py-2">
5252
<code className="flex-1 truncate text-xs font-mono">{checkout.depositAddress}</code>

‎src/components/billing/payment-method-picker.tsx‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,12 @@ const POPULAR_COUNT = 6;
2020

2121
interface PaymentMethodPickerProps {
2222
methods: SupportedPaymentMethod[];
23-
amountUsd: number;
2423
onSelect: (method: SupportedPaymentMethod) => void;
2524
onBack?: () => void;
2625
}
2726

2827
export function PaymentMethodPicker({
2928
methods,
30-
amountUsd: _amountUsd,
3129
onSelect,
3230
onBack,
3331
}: PaymentMethodPickerProps) {

0 commit comments

Comments
 (0)