Two related UX bugs
1. MAX button broken in PLOT mode
In `TradingWidget.tsx`, `handleBuyMax` always calls `getZapQuote()` regardless of whether the user is buying with PLOT directly. When `payToken === "PLOT"` and Zap is available, `isPlotMode` is false so it tries the Zap quote — which silently fails since PLOT is the intermediate token, not a Zap input. The MAX button does nothing in PLOT mode.
Fix: Check `isPlotMode` in `handleBuyMax` and use the direct bonding curve quote instead of Zap when buying with PLOT.
2. Unnecessary 5-second delays after tx confirmation
Both `DonateWidget.tsx` (line 94) and `usePublish.ts` (line 116) have:
```typescript
await new Promise((r) => setTimeout(r, 5000));
```
This was for "RPC propagation on Base Sepolia" but is unnecessary on mainnet Base with 2-second block times. The receipt is already confirmed before this delay runs.
Fix: Remove the 5-second delays. If any propagation buffer is needed, 1 second is sufficient.
Files to modify
- `src/components/TradingWidget.tsx` — fix `handleBuyMax` for PLOT mode
- `src/components/DonateWidget.tsx` — remove/reduce 5s delay
- `src/hooks/usePublish.ts` — remove/reduce 5s delay
Branch
`task/638-ux-fixes`
Acceptance criteria
Self-Verification (T3)
Two related UX bugs
1. MAX button broken in PLOT mode
In `TradingWidget.tsx`, `handleBuyMax` always calls `getZapQuote()` regardless of whether the user is buying with PLOT directly. When `payToken === "PLOT"` and Zap is available, `isPlotMode` is false so it tries the Zap quote — which silently fails since PLOT is the intermediate token, not a Zap input. The MAX button does nothing in PLOT mode.
Fix: Check `isPlotMode` in `handleBuyMax` and use the direct bonding curve quote instead of Zap when buying with PLOT.
2. Unnecessary 5-second delays after tx confirmation
Both `DonateWidget.tsx` (line 94) and `usePublish.ts` (line 116) have:
```typescript
await new Promise((r) => setTimeout(r, 5000));
```
This was for "RPC propagation on Base Sepolia" but is unnecessary on mainnet Base with 2-second block times. The receipt is already confirmed before this delay runs.
Fix: Remove the 5-second delays. If any propagation buffer is needed, 1 second is sufficient.
Files to modify
Branch
`task/638-ux-fixes`
Acceptance criteria
Self-Verification (T3)
npm run dev, go to a story page, select PLOT as pay tokennpm run build— no errors