feat: add @autonomys/auto-wallet and @autonomys/auto-wallet-react packages#511
Merged
jim-counter merged 12 commits intomainfrom Feb 10, 2026
Merged
feat: add @autonomys/auto-wallet and @autonomys/auto-wallet-react packages#511jim-counter merged 12 commits intomainfrom
jim-counter merged 12 commits intomainfrom
Conversation
…kages Extract reusable wallet connection functionality into two new packages: - @autonomys/auto-wallet: Framework-agnostic core with configurable Zustand store factory, wallet detection/connection, types, and utils. Supports configurable dappName, ss58Prefix, storageKey, and more. - @autonomys/auto-wallet-react: React components (WalletProvider, WalletButton, WalletModal, WalletOption) and useWallet hook. Bundles its own shadcn UI primitives. Consumers provide Tailwind + CSS vars. Designed to be consumed by multiple Autonomys dApps (beneficiary portal, staking portal, etc.) with per-app configuration via WalletProvider. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add --passWithNoTests to jest so the test step doesn't fail with exit code 1 when no test files exist. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Update selectedAccount with fresh data on reconnection so it stays in sync with the accounts array (stale metadata bug) - Track lastFailedWallet explicitly so the retry button reconnects to the correct wallet instead of always picking the first one on timeout Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Member
Author
|
bugbot run |
- Clear timeout timer on successful wallet connection to prevent unhandled promise rejection (connect.ts) - Use .catch() instead of try/catch for async initializeConnection call in onRehydrateStorage callback (store.ts) - Fix unicode × symbol rendered literally in JSX close button (wallet-modal.tsx) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Member
Author
|
@cursor review |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Show a disabled "Unavailable" button instead of rendering an anchor tag with a missing href when a wallet has no installUrl configured. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Member
Author
|
bugbot run |
Swap bg-white, text-gray-*, hover:bg-gray-* with bg-background, text-muted-foreground, hover:bg-accent etc. across AccountDropdown, WalletModal, and WalletOption so components respect dark mode theming. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Member
Author
|
bugbot run |
- connectWallet now throws when already loading so the modal catch block fires instead of silently closing the modal on a no-op return. - Both connectWallet and initializeConnection check that isLoading is still true after the async connectToWallet call, so a disconnect issued mid-flight is not overwritten by the late-arriving success. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Member
Author
|
bugbot run |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the isLoading guard with a monotonically-increasing _connectionSeq counter so that only the latest connection attempt can write state. Disconnect also bumps the counter, invalidating any in-flight connection that resolves after the user disconnected. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Previously selectedWallet and selectedAccount were kept after a failed reconnection attempt, creating an inconsistent state where selectedAccount referenced an account not present in accounts[]. Now all state is cleared so the user starts from a clean slate. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
EmilFattakhov
approved these changes
Feb 10, 2026
Member
EmilFattakhov
left a comment
There was a problem hiding this comment.
LGTM, thanks @jim-counter!
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
@autonomys/auto-wallet— framework-agnostic core package with a configurable Zustand store factory (createWalletStore), wallet detection/connection logic, TypeScript types, and utilities likeshortenAddress@autonomys/auto-wallet-react— React package withWalletProvider,useWallethook, and pre-built components (WalletButton,WalletModal,WalletOption) using shadcn-style TailwindWalletConfig(dappName, ss58Prefix, storageKey, supportedWallets, connectionTimeout, installUrls)Consumer usage
Consumers need Tailwind CSS 3.x with shadcn-style CSS variables and must add
node_modules/@autonomys/auto-wallet-react/dist/**/*.{js,mjs}to their Tailwindcontentconfig.Test plan
yarn build)file:links🤖 Generated with Claude Code