Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: undefined useAccountsFetch queryFn return #8543

Merged
merged 2 commits into from
Jan 14, 2025

Conversation

0xApotheosis
Copy link
Member

Description

Query functions need to return something. Fixes console spew when a Ledger is connected:

Screenshot 2025-01-13 at 13 29 15

Issue (if applicable)

QOL

Risk

Minimal

What protocols, transaction types, wallets or contract interactions might be affected by this PR?

N/A

Testing

The above console spew when connected to a Ledger should now longer show.

Engineering

☝️

Operations

☝️

Screenshots (if applicable)

See above.

@0xApotheosis 0xApotheosis requested a review from a team as a code owner January 13, 2025 03:02
Copy link
Collaborator

@NeOMakinG NeOMakinG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Looks good so far

There is another error with receiveAddress as a query key, I guess it's because of those early returns in useReceiveAddress

          // Already partially covered in isInitializing, but TypeScript lyfe mang.
          if (!buyAsset || !wallet || !buyAccountId || !buyAccountMetadata) {
            return undefined
          }

          const buyAssetChainId = buyAsset.chainId
          const buyAssetAccountChainId = buyAccountId
            ? fromAccountId(buyAccountId).chainId
            : undefined

          /**
           * do NOT remove
           * super dangerous - don't use the wrong bip44 params to generate receive addresses
           */
          if (buyAssetChainId !== buyAssetAccountChainId) {
            return undefined
          }

We might be able to fix them the same way!

@0xApotheosis
Copy link
Member Author

Thanks @NeOMakinG! I'll merge this and then check out the receiveAddress one 🙏

@0xApotheosis 0xApotheosis merged commit 20edb47 into develop Jan 14, 2025
3 checks passed
@0xApotheosis 0xApotheosis deleted the fix-undefined-qf-2 branch January 14, 2025 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants