feat: wire create/claim/cancel buttons to the real pool flow - #21
Merged
sainathr19 merged 1 commit intoAug 19, 2026
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 realcreate/claim/cancel(the Wallet API route from #20).strk20.js:createPlan/claim/cancelnow resolvein_token/out_tokeninternally (one cached view call per contract address) instead of requiring the caller to already know them — matchesdevnet-writer.js's existingviewCallconvention, and letsApp.jsx's demo and pool code paths share the same params shape.App.jsx: buttons are now gated ondemoMode OR an actually-detected, STRK20-capable wallet(detectPrivacyCapablefrom 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 buildsucceedsnpm test(ui) — 4/4 pass (unaffected, doesn't touchiceberg.js)