forked from 0xsequence/sequence.js
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
1 / 11 of 1 issue completedLabels
dependenciesPull requests that update a dependency filePull requests that update a dependency filedocumentationImprovements or additions to documentationImprovements or additions to documentationduplicateThis issue or pull request already existsThis issue or pull request already existsenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededinvalidThis doesn't seem rightThis doesn't seem rightjavascriptPull requests that update javascript codePull requests that update javascript codequestionFurther information is requestedFurther information is requested
Description
Reviewer's Guide
Introduces a new secure ID generation strategy for the dapp client, adds a wagmi-based demo app scaffold, and configures multiple CI/security workflows and project metadata files (issue templates, security policy, pipelines, and funding).
Sequence diagram for wallet connection flow in wagmi demo app
sequenceDiagram
actor User
participant Browser
participant App
participant WagmiProvider
participant ConnectHook
participant Connector
participant Blockchain
User->>Browser: Load page
Browser->>App: Render App component
App->>WagmiProvider: Initialize with config
App->>ConnectHook: useConnect()
ConnectHook-->>App: connectors, connect, status, error
User->>App: Click connect button for connector
App->>ConnectHook: connect(connector)
ConnectHook->>Connector: initiate connection
Connector->>Blockchain: wallet RPC / authorization
Blockchain-->>Connector: connection approved
Connector-->>ConnectHook: connection result (account, chainId)
ConnectHook-->>App: status updated to connected
App-->>User: Render connected state and Disconnect button
User->>App: Click Disconnect
App->>Connector: disconnect()
Connector->>Blockchain: terminate session
Blockchain-->>Connector: disconnected
Connector-->>App: status updated to disconnected
App-->>User: Render disconnected state
Class diagram for updated DappTransport ID generation
classDiagram
class DappTransport {
-someInternalState
+sendMessage(message)
+receiveMessage(message)
-generateId() string
}
class WindowCrypto {
+getRandomValues(array Uint32Array) Uint32Array
}
class MathRandomLegacy {
+random() number
}
DappTransport ..> WindowCrypto : uses
DappTransport ..> MathRandomLegacy : replaces
Class diagram for wagmi React demo app structure
classDiagram
class App {
+App() JSXElement
}
class MainEntrypoint {
+main() void
}
class WagmiProvider {
+WagmiProvider(config Config, children ReactNode)
}
class QueryClientProvider {
+QueryClientProvider(client QueryClient, children ReactNode)
}
class QueryClient {
+QueryClient()
}
class Config {
+chains Chain[]
+connectors Connector[]
+transports Map<int, Transport>
}
class Chain {
+id int
+name string
}
class Connector {
+uid string
+name string
+connect() Promise<Account>
+disconnect() Promise<void>
}
class AccountHookResult {
+status string
+addresses string[]
+chainId int
}
class ConnectHookResult {
+connect(connector Connector) void
+connectors Connector[]
+status string
+error Error
}
class DisconnectHookResult {
+disconnect() void
}
MainEntrypoint --> WagmiProvider : wraps
WagmiProvider --> QueryClientProvider : wraps
QueryClientProvider --> App : renders
MainEntrypoint --> QueryClient : creates
WagmiProvider --> Config : uses
App --> AccountHookResult : useAccount
App --> ConnectHookResult : useConnect
App --> DisconnectHookResult : useDisconnect
Config --> Chain : contains
Config --> Connector : contains
File-Level Changes
| Change | Details | Files |
|---|---|---|
| Use cryptographically secure randomness for DappTransport ID generation. |
|
packages/wallet/dapp-client/src/DappTransport.ts |
| Add wagmi-based React demo application scaffolded with Vite. |
|
wagmi-project/package.jsonwagmi-project/tsconfig.jsonwagmi-project/tsconfig.node.jsonwagmi-project/vite.config.tswagmi-project/index.htmlwagmi-project/src/main.tsxwagmi-project/src/App.tsxwagmi-project/src/wagmi.tswagmi-project/src/index.csswagmi-project/src/vite-env.d.tswagmi-project/.gitignorewagmi-project/.npmrcwagmi-project/biome.jsonwagmi-project/README.md |
| Introduce security scanning and CI pipeline configurations across multiple platforms. |
|
.github/workflows/fortify.yml.circleci/config.ymlazure-pipelines.yml |
| Add repository templates and security policy documentation. |
|
.github/ISSUE_TEMPLATE/bug_report.md.github/ISSUE_TEMPLATE/feature_request.md.github/ISSUE_TEMPLATE/custom.mdSECURITY.mdFUNDING.jsonCNAME |
| Add auxiliary project and cache-related files. |
|
.codesandbox/tasks.jsonv8-compile-cache-0/x64/11.3.244.8-node.19/zSprojectzSsequence.jszSnode_moduleszS.pnpmzS@preconstruct+cli@2.8.7zSnode_moduleszS@preconstructzSclizSbin.js.MAPv8-compile-cache-0/x64/11.3.244.8-node.19/zSprojectzSworkspacezSnode_moduleszS.pnpmzS@preconstruct+cli@2.8.7zSnode_moduleszS@preconstructzSclizSbin.js.MAPwagmi-project/.gitignorewagmi-project/.npmrcwagmi-project/biome.json |
Possibly linked issues
- Fix merge branch 0xsequence/master #86: They match: this PR implements the wagmi app, Fortify workflow, CI, and templates requested in the issue.
- Feature/integration #17: They both describe adding the wagmi React app plus SECURITY.md, Azure pipeline, and related scaffolding files.
- 0xsequence/master #79: PR implements the Fortify workflow, CircleCI config, issue templates, and React Query upgrade described in the issue.
Tips and commands
Interacting with Sourcery
- Trigger a new review: Comment
@sourcery-ai reviewon 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 issueto create an issue from it. - Generate a pull request title: Write
@sourcery-aianywhere in the pull
request title to generate a title at any time. You can also comment
@sourcery-ai titleon the pull request to (re-)generate the title at any time. - Generate a pull request summary: Write
@sourcery-ai summaryanywhere in
the pull request body to generate a PR summary at any time exactly where you
want it. You can also comment@sourcery-ai summaryon the pull request to
(re-)generate the summary at any time. - Generate reviewer's guide: Comment
@sourcery-ai guideon the pull
request to (re-)generate the reviewer's guide at any time. - Resolve all Sourcery comments: Comment
@sourcery-ai resolveon 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 dismisson 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 reviewto 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
- Contact our support team for questions or feedback.
- Visit our documentation for detailed guides and information.
- Keep in touch with the Sourcery team by following us on X/Twitter, LinkedIn or GitHub.
Originally posted by @sourcery-ai[bot] in #136 (comment)
Reactions are currently unavailable
Sub-issues
Metadata
Metadata
Assignees
Labels
dependenciesPull requests that update a dependency filePull requests that update a dependency filedocumentationImprovements or additions to documentationImprovements or additions to documentationduplicateThis issue or pull request already existsThis issue or pull request already existsenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededinvalidThis doesn't seem rightThis doesn't seem rightjavascriptPull requests that update javascript codePull requests that update javascript codequestionFurther information is requestedFurther information is requested
Projects
Status
In Review
Status
Todo