Repository navigation
Conversation
The options were spread into the top-level options object of useCofheReadContractAndDecrypt, which only reads readQueryOptions, decryptingQueryOptions and meta. So everything but enabled was ignored, and a react-query meta replaced the decrypt meta (its label). Pass them to the decrypt query instead, which is the query whose data the hook returns.
🦋 Changeset detectedLatest commit: 8633307 The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
kutluhaneth46
approved these changes
Oct 18, 2026
kutluhaneth46
left a comment
Contributor
There was a problem hiding this comment.
LGTM — restOptions were previously spread onto useCofheReadContractAndDecrypt's top-level bag (ignored except enabled / colliding meta). Parking them under decryptingQueryOptions with the balance select preserved is the right shape, and the SSR probe covers the regression. Nice catch.
This branch has not been deployed
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.
useCofheTokenDecryptedBalance(input, options)takes react-query options for the balance, but after pulling outenabledit spreads the rest into the top-level options object ofuseCofheReadContractAndDecrypt:useCofheReadContractAndDecryptonly readsreadQueryOptions,decryptingQueryOptionsandmetafrom that object. So:refetchInterval,staleTime,retry,gcTimeetc. never reach a query and are silently ignoredmetalands on themetakey and replaces the decrypt meta, so the card loses its label (token symbol or the caller'sinput.meta.label)The options are now spread into
decryptingQueryOptions, since the decrypt query is the one whose data the hook returns.refetchOnMount: falsestays as the default andselectis still set by the hook. A react-querymetanow goes throughuseCofheDecrypt, which already merges it with its own query meta. The spread needs a cast because the hook's decrypt query types resolve toneverhere (the token ABI is optional), and the options are typed for thebigintbalance.Tests (
packages/react/src/hooks/useCofheTokenDecryptedBalance.test.tsx):refetchInterval/staleTime/retry/metareachdecryptingQueryOptions,selectkeptmetais passed