Monorepo implementation, resolves FRONT-597 - #1498
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
3 Skipped Deployments
|
|
Deployment failed with the following error: Learn More: https://vercel.com/docs/concepts/projects/project-configuration |
|
Deployment failed with the following error: Learn More: https://vercel.com/docs/concepts/projects/project-configuration |
…idget internals Every chain package's create*Connection factory reimplemented the same ~40-line cycle: compute snapshot inputs, compare by identity, rebuild the provider snapshot only on change, notify the store only on a new reference, plus subscription wiring and teardown. A memoization fix in one copy would never propagate to the other seven. Add createMemoizedConnectionStore to @layerswap/widget/internal (next to its hook-based twin createConnectionStoreFromHook — no new dependency edges, all wallet packages already import from that subpath) and migrate the eight vanilla-store factories (evm, svm, bitcoin, fuel, starknet, ton, tron, paradex) to declare only computeInputs / buildSnapshot / subscribe / onUpdateProps / onDestroy. Per-recompute side effects (EVM/SVM registry configure) stay in buildSnapshot, which runs exactly when the old recompute path did; Starknet's dispose moves to onDestroy. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…es, split Paradex service - Add a WalletConnectionService interface to @layerswap/widget/types and implement it in all 8 chain *ConnectionService classes, so a missing or renamed core method fails at compile time instead of breaking the create*Connection factory at runtime. - Move the WalletConnectConfig type to @layerswap/widget/types; the EVM and SVM packages now re-export the shared definition instead of each keeping a verbatim copy that could silently drift. - Extract ParadexAccountMapper from ParadexConnectionService: the persisted L1 <-> Paradex account mapping, selected-account state, address integrity validation, and active-connection resolution now live in an SDK-free class, leaving the service with provider coordination and SDK connect flows only. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Gate the destination auto-connect effect on useProvidersConnectReady so it can't open an unscoped wallet modal (and permanently mark the destination as prompted) before the destination's provider hydrates. - Compare array fields element-by-element in shallowEqualProvider so the first hook-based provider adapted through createConnectionStoreFromHook doesn't broadcast a store update on every parent render. - Memoize additionalConnectorsStore snapshots on their inputs (cached pages and recents identity) and skip listener notification when nothing changed, preserving the identity-based memoization in EVM/SVM connection snapshots. - Apply button role/tabIndex/keyboard handling in AddressPickerItem only when onClick is passed, so the AddressBook usage inside cmdk's role="option" item no longer nests an interactive control or leaves a dead Tab stop. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…live list connect() freezes a provider snapshot in state, and ConnectorsList re-resolved it against filteredProviders — which excludes hideFromList providers like Paradex. A Paradex-scoped modal opened before its EVM/Starknet peers published their connectors was stuck with the empty snapshot until closed and reopened. Resolve against the full live provider list from useWallet instead, so the modal re-renders in place as connectors arrive. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The L1 -> Paradex account mapping is persisted (ls-paradex-accounts), but the Paradex descriptor never declared a hasPersistedSession probe, so a refreshed page never hydrated the lazy provider and the restored wallet stayed invisible until the connect modal forced a load. Probe the persisted store's partialized payload (mapping contents, not key presence — the key exists for every visitor) so LayerswapProvider's phase-2 hydration loads Paradex on mount, the same way Bitcoin/Starknet/TON/SVM/Fuel sessions resurface. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…e claim The `hasPersistedSession` comments in the paradex and starknet descriptors claimed the persisted key "exists for every visitor once the store hydrates"; zustand v4's persist only writes on migration or on a store write, so the key appears after any wallet-store set(), not on hydration. Restate the actual constraint (key presence isn't a session signal) and cut the narration-heavy comments in imtblPassport/persistedSession down to their load-bearing facts. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
refactor(wallets): migrate chain wallet providers to class + Zustand stores
change widget packages folderization
some fixes related to tron wallet detection. connection and reconnection
…ered by visibility
…ect modal The wallet list is fed by several async sources (lazy ecosystem SDK chunks, per-namespace WalletConnect Explorer fetches), and the modal made decisions from incomplete snapshots: - The multichain ecosystem picker rendered the variants array frozen at click time, so ecosystems that settled later (e.g. MetaMask's Solana side) never appeared. The picker now re-derives variants live and keeps whichever version knows more. - Multichain-ness had two disagreeing definitions (tile-level registry chains synthesis vs click-time availableConnectors name scan). Both now go through resolveChainConnectors via getLiveVariants(), scoped to the modal's featured providers so scoped connects never offer foreign ecosystems. - Provider `ready` never covered the WalletConnect registry fetch. The page-1 browse fetch now has a tracked status (idle/loading/ready/error) plus a deduped, retryable ensureBrowseLoaded(), and awaitProvidersSettled gates on it (timeout 1200ms -> 3000ms to absorb the network round-trip). - Registry page-1 fetches are prefetched on connect-button hover/focus and on modal open, re-fired after descriptor hydration since that can instantiate new namespace stores. - The tile grid shows a bounded loading tail while any source is still publishing and a retry row when a registry fetch failed, instead of silently reading as complete. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The deposit widget derived hasWalletMethods from the wallet-providers registry, which is only populated in WalletProvidersProvider's post-commit effect. On first paint the registry was always empty, so the step stack rooted on transfer-crypto (easy deposit) and re-rooted to method-picker one effect tick later — a visible flash of the wrong flow on every load. Expose the fact the decision actually needs — "did the integrator configure any wallet-connection providers" — via a render-time context computed from the walletProviders prop (mirroring exactly which providers produce a registry entry), and use it in DepositStepProvider. The first render (and SSR) now roots the stack on the correct step directly; the re-root effect remains as the safety net for runtime provider-list changes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…hydrate A partially-hydrated wallet list invites clicks that commit to the one loaded ecosystem before a wallet's other ecosystems are known (MetaMask -> EVM-only connect with no ecosystem picker). Instead of deciding from an incomplete snapshot: - Block the connector grid with a skeleton (tiles mirroring the real Connector geometry, so nothing jumps) while any featured provider is still a stub or not ready. Bounded at 5s so a broken SDK chunk can't lock the modal; past the deadline the list renders progressively with the existing loading tail. - Registry (WalletConnect API) wallets never block - they only append tiles, so they keep the progressive tail and the retry row. - Fold the gate into isListVisible so the load-more IntersectionObserver re-attaches when the sentinel mounts after the gate lifts. - Show a "Checking for more networks..." row in the multichain ecosystem picker while sources are still settling, so late-appearing ecosystem rows read as loading instead of popping in silently. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…better provider representation
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.
No description provided.