Some local fixes#79
Conversation
dev-jodee
left a comment
There was a problem hiding this comment.
Reviewed locally — 3 fixes. 2 suggested inline below; the 3rd is on a file outside this PR's diff (button-nesting bug surfaced while testing).
3rd fix — button-nesting (webapp/src/components/plan/enhanced-collect-payments.tsx)
React warning: <button> cannot contain a nested <button>. Outer toggle wraps inner SolanaButton (Collect). Outer should be a <div role="button"> with keyboard handlers.
- <button
+ <div
+ role="button"
+ tabIndex={0}
+ aria-expanded={expanded}
className="w-full p-4 flex items-center justify-between cursor-pointer hover:bg-sand-100 transition-colors"
onClick={() => setExpanded(!expanded)}
+ onKeyDown={e => {
+ if (e.key === 'Enter' || e.key === ' ') {
+ e.preventDefault();
+ setExpanded(!expanded);
+ }
+ }}
>And close tag at line 346:
- </button>
+ </div>Happy to land it in this PR or open a follow-up — your call.
Separate design discussion
While reviewing, also flagged: subscriber can break delegation off-chain (revoke SPL Token approve, change delegate, drain ATA, close ATA) — leaves subscription PDA stuck open with expires_at_ts == 0, plan owner can't cancel. Considering a cancel_broken_subscription instruction with permissionless eviction + on-chain proof. Will open separately, not blocking this PR.
Two fixes to deployProgramViaSurfnet: - Use PROGRAM_ADDRESS instead of undefined PROGRAM_ID when injecting the address into IDL JSON. Previously threw ReferenceError whenever the IDL lacked a top-level address field. - Kick off the fallback deploy as fire-and-forget rather than awaiting it inside the status handler. The status endpoint is polled by the frontend; awaiting blocked the response for up to 30s during deploy. Next poll picks up executable=true.
EnhancedPlanCard wrapped a SolanaButton inside a native <button>,
which produced a React hydration warning ("button cannot contain a
nested button"). Outer toggle is now a <div role="button"> with
tabIndex, aria-expanded, and Enter/Space keyboard handlers so it
remains keyboard-accessible.
`idl_path` in surfnet-setup runbook adds an on-chain IDL upload, pushing total deploy time past the 7s retry budget — bump to 30×2s. `pull_request` events on fork PRs ship a read-only GITHUB_TOKEN regardless of the workflow `permissions:` block, so the CU-report comment step 403s. Gate it on same-repo PRs.
surfpool's setup_surfnet runs an automatic protocol-detection step that
attempts an anchor-style IDL conversion. The Codama-emitted IDL has no
top-level `address` field, so the conversion errors and the deploy
step never completes — leaving the program account empty after start.
Result: ts-integration-test sees `getAccountInfo` for the program ID
return null indefinitely. Revert to main's content; rely on
`just deploy-idl-{devnet,mainnet}` (program-metadata) for on-chain IDL.
No description provided.