Skip to content

Sequence diagram for wagmi wallet connect/disconnect flow #601

@Dargon789

Description

@Dargon789

Reviewer's Guide

Adds a new wagmi-based Vite demo app and various project-scaffolding/configuration artifacts (security and issue templates, CI pipelines, Fortify SAST workflow), plus bumps the indexer service changelog to 2.0.0 with a placeholder entry.

Sequence diagram for wagmi wallet connect/disconnect flow

sequenceDiagram
  actor User
  participant App
  participant WagmiProvider
  participant useConnect
  participant useAccount
  participant useDisconnect

  User->>App: click connector button
  App->>useConnect: connect({ connector })
  useConnect->>WagmiProvider: connect
  WagmiProvider-->>useAccount: update account.status='connected'
  useAccount-->>App: account (status, addresses, chainId)
  App-->>User: render account info and Disconnect button

  User->>App: click Disconnect
  App->>useDisconnect: disconnect()
  useDisconnect->>WagmiProvider: disconnect
  WagmiProvider-->>useAccount: update account.status='disconnected'
  useAccount-->>App: account (status)
  App-->>User: hide Disconnect button, show Connect buttons
Loading

File-Level Changes

Change Details Files
Introduce a minimal wagmi + React Vite demo application under wagmi-project for wallet connection testing.
  • Bootstrap a Vite React TypeScript app with standard index.html, main entry, React root, and CSS baseline.
  • Configure WagmiProvider with mainnet and sepolia chains, injected/WalletConnect/Coinbase connectors, and a shared QueryClient for react-query.
  • Implement App component to display connection status, addresses, chainId, and allow connecting/disconnecting via available connectors.
  • Add TypeScript, Vite, wagmi, viem, react-query, and build tooling configuration (tsconfig, tsconfig.node, vite.config, biome, .gitignore, .npmrc, vite env types, README).
wagmi-project/package.json
wagmi-project/index.html
wagmi-project/src/main.tsx
wagmi-project/src/App.tsx
wagmi-project/src/wagmi.ts
wagmi-project/src/index.css
wagmi-project/src/vite-env.d.ts
wagmi-project/tsconfig.json
wagmi-project/tsconfig.node.json
wagmi-project/vite.config.ts
wagmi-project/biome.json
wagmi-project/.gitignore
wagmi-project/.npmrc
wagmi-project/README.md
Add security and issue management documentation/templates to standardize project processes.
  • Create SECURITY.md with placeholders for supported versions and vulnerability reporting process.
  • Add GitHub issue templates for bug reports, feature requests, and a custom template.
SECURITY.md
.github/ISSUE_TEMPLATE/bug_report.md
.github/ISSUE_TEMPLATE/feature_request.md
.github/ISSUE_TEMPLATE/custom.md
Add CI workflows for security scanning and basic Node.js builds.
  • Introduce a GitHub Actions workflow to run Fortify AST SAST scans on master pushes, PRs, schedules, and manual runs, configured to use Fortify on Demand secrets.
  • Add an Azure Pipelines configuration that installs Node.js 10.x, runs npm install, and builds the project on master branch.
.github/workflows/fortify.yml
azure-pipelines.yml
Update indexer service changelog to start 2.0.0 with a placeholder major-change entry.
  • Add 2.0.0 section with a 'Major Changes' header and placeholder 'changeset' entry above 1.10.14 in the indexer changelog.
packages/services/indexer/CHANGELOG.md
Check in various repository-level and tooling artifacts for Codesandbox and build caching.
  • Add Codesandbox tasks configuration and related repo-level metadata files.
  • Introduce v8 compile cache map artifacts under v8-compile-cache-0 directory.
.codesandbox/tasks.json
CNAME
v8-compile-cache-0/x64/11.3.244.8-node.19/zSprojectzSsequence.jszSnode_moduleszS.pnpmzS@preconstruct+cli@2.8.7zSnode_moduleszS@preconstructzSclizSbin.js.MAP
v8-compile-cache-0/x64/11.3.244.8-node.19/zSprojectzSworkspacezSnode_moduleszS.pnpmzS@preconstruct+cli@2.8.7zSnode_moduleszS@preconstructzSclizSbin.js.MAP

Possibly linked issues

  • Feature/integration #17: They both describe adding the wagmi React project plus SECURITY.md, Azure Pipelines, and related placeholder/config files.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Originally posted by @sourcery-ai[bot] in #600 (comment)

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdependenciesPull requests that update a dependency filedocumentationImprovements or additions to documentationduplicateThis issue or pull request already existsenhancementNew feature or request

Projects

Status

Done

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions