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.
Checked out 7702 demo branch and found this error there whenever refreshing the page:
This is due to the
useSma7702Client
hook trying to create the 7702 account client before the signer is fully initialized after rehydrating when the page is refreshed. This results in the 7702 components being fully broken because the client never loads.Added a status check via
useSignerStatus
and the issue is resolved. Now you can refresh the page and everything works correctly.Also added some better loading states for disabling the buttons before the client is ready.
PR-Codex overview
This PR enhances the
useSma7702Client
hook to include anisLoadingClient
state and updates the usage of this hook inuseRecurringTransactions
anduseMint
. It also modifies theWrapper7702
component to reflect these changes, improving loading state management across components.Detailed summary
isLoadingClient
state touseSma7702Client
.useRecurringTransactions
to destructureisLoadingClient
.useMint
to includeisLoadingClient
in loading checks.Wrapper7702
to useisLoadingClient
for disabling theTransactionsCard
.