fix(AccountScreen, SorokitProvider): resolve issues #117 and #128#160
Open
Dominion116 wants to merge 1 commit into
Open
fix(AccountScreen, SorokitProvider): resolve issues #117 and #128#160Dominion116 wants to merge 1 commit into
Dominion116 wants to merge 1 commit into
Conversation
…orokit#128 Closes Sorokit#117 Closes Sorokit#128 ### Issue Sorokit#117 — AccountScreen: duplicate states, no refresh, missing ClaimableBalanceCard - Remove @hugeicons/react / @hugeicons/core-free-icons imports (not in package.json) from AccountScreen; replace with an inline RefreshIcon SVG - AccountScreen no longer renders its own disconnected state — delegates to AccountCard (returns null) and BalanceList (single prompt) - ClaimableBalanceCard returns null when disconnected instead of showing a second "connect your wallet" prompt, satisfying the at-most-one acceptance criterion; test updated accordingly - ClaimableBalanceCard is rendered below BalanceList in AccountScreen ### Issue Sorokit#128 — SorokitProvider: refreshAccount missing, switchNetwork keeps error, useSorokit unsafe outside provider - refreshAccount reimplemented as async () => Promise<void> that calls Promise.all([getAccount, getBalances]) directly and returns when settled; removes the indirect refreshTick/useEffect pattern - SorokitState type updated: refreshAccount: () => Promise<void> - switchNetwork now calls setError(null) on a successful network switch so the TopBar error banner clears automatically - useSorokit returns a typed safe-defaults object instead of throwing when called outside a provider; emits console.warn in all environments - useSorokit test updated to assert safe-defaults shape instead of thrown error - README Hooks section documents refreshAccount signature, Promise return, isLoadingAccount behaviour, and the safe-defaults fallback ### Build fixes (pre-existing, unblocked npm run build) - components/index.ts: fix SorokitProvider/useSorokit paths, remove reference to non-existent ../lib/types - tsconfig.lib.json: fix include (types.ts → client.ts), add @/* alias, switch build script from bare tsc --emitDeclarationOnly to tsc -p tsconfig.lib.json - vite.lib.config.ts: replace missing terser with built-in esbuild - ContractEventFeed: import ContractEvent type; export ContractEventFeedProps - ErrorBoundary / FeeEstimator: export prop interfaces Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@Dominion116 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Closes #117
Closes #128
Issue #117 — AccountScreen: duplicate states, no refresh, missing ClaimableBalanceCard
Issue #128 — SorokitProvider: refreshAccount missing, switchNetwork keeps error, useSorokit unsafe outside provider
Build fixes (pre-existing, unblocked npm run build)
Description
Brief description of the changes in this PR.
Related Issues
Closes #(issue number)
Type of Change
Testing
Describe how you tested your changes:
npm run lint)npm run build)Checklist