Skip to content

fix(wallet-integration): wrap top-level await, add npm versions and evals#103

Open
marc0olo wants to merge 1 commit intomainfrom
fix/wallet-integration-skill-improvements
Open

fix(wallet-integration): wrap top-level await, add npm versions and evals#103
marc0olo wants to merge 1 commit intomainfrom
fix/wallet-integration-skill-improvements

Conversation

@marc0olo
Copy link
Member

Summary

Wraps all top-level await in code examples, adds npm package versions to prerequisites, strengthens the async wrapping signal, and creates the first evaluation suite.

Mentions #97, #95, #96, #100.

Changes

Skill (wallet-integration/SKILL.md):

  • Wrap all await in named async functions across 7 code blocks (connectWallet, icpWalletTransfers, icrcWalletTransfers, queryAndDisconnect, safeTransfer, connectLocalWallet, connectPseudoWallet, connectMainnetWallet)
  • Add npm versions to prerequisites (@dfinity/oisy-wallet-signer >= 4.1.0, @dfinity/utils >= 4.2.0, @dfinity/zod-schemas >= 3.2.0, @icp-sdk/canisters >= 3.5.0, @icp-sdk/core >= 5.0.0)
  • Add explicit note and code comment explaining why wallet operations must be wrapped in async functions (Vite's default es2020 target lacks top-level await)
  • Remove generic "running local network" prerequisite (covered by icp-cli skill)

Evaluations (evaluations/wallet-integration.json): New file with 4 output evals + 12 trigger evals

  • No top-level await in wallet code (Vite context)
  • IcpWallet vs IcrcWallet class selection
  • Error handling pattern (RelyingPartyResponseError codes)
  • Signer implementation (all 4 required prompts)

🤖 Generated with Claude Code

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