Skip to content

feat: wire create/claim/cancel buttons to the real pool flow - #21

Merged
sainathr19 merged 1 commit into
azeemshaik025:mainfrom
sainathr19:feat/wire-pool-mode-buttons
Aug 19, 2026
Merged

feat: wire create/claim/cancel buttons to the real pool flow#21
sainathr19 merged 1 commit into
azeemshaik025:mainfrom
sainathr19:feat/wire-pool-mode-buttons

Conversation

@sainathr19

Copy link
Copy Markdown
Collaborator

Summary

The "act on this plan" buttons only ever called the devnet demo writer — pool mode just showed a static "not wired yet" message. Wires them to strk20.js's real create/claim/cancel (the Wallet API route from #20).

  • strk20.js: createPlan/claim/cancel now resolve in_token/out_token internally (one cached view call per contract address) instead of requiring the caller to already know them — matches devnet-writer.js's existing viewCall convention, and lets App.jsx's demo and pool code paths share the same params shape.
  • App.jsx: buttons are now gated on demoMode OR an actually-detected, STRK20-capable wallet (detectPrivacyCapable from feat: switch real pool flow to the Wallet API route, unblocking mainnet #20) rather than just "not demo mode" — so the button's enabled state matches what a click would actually do, never promises something that immediately fails.

Test plan

  • vite build succeeds
  • npm test (ui) — 4/4 pass (unaffected, doesn't touch iceberg.js)
  • Not verified: an actual live Ready wallet clicking these buttons end to end — still no such environment available here. This is the last piece of code before the required mainnet transactions can happen through the real UI; needs a human test before relying on it for those.

The "act on this plan" buttons only ever called the devnet demo
writer; pool mode just showed a static "not wired yet" message.
Wires them to strk20.js's real create/claim/cancel via the Wallet API
route from azeemshaik025#20.

- strk20.js: createPlan/claim/cancel now resolve in_token/out_token
  internally (one cached view call per contract address) instead of
  requiring the caller to already know them — matches
  devnet-writer.js's existing viewCall convention, and lets App.jsx's
  demo and pool code paths share the same params shape.
- App.jsx: buttons are gated on demoMode OR an actually-detected,
  STRK20-capable wallet (detectPrivacyCapable from azeemshaik025#20's
  wallet-account-v6.js) rather than just "not demo mode" — so the
  button's enabled state matches what a click would actually do,
  never promises something that immediately fails.

Verified: vite build succeeds, ui test suite still 4/4 (unaffected —
touches strk20.js/App.jsx, not iceberg.js). Not verified: an actual
live Ready wallet clicking these buttons end to end — still no such
environment available here. This is the last piece before the
required mainnet transactions can happen through the real UI; needs
a human test before relying on it for those.
@sainathr19
sainathr19 merged commit 613a647 into azeemshaik025:main Aug 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant