Skip to content

Conversation

@brendanw
Copy link
Contributor

Description

Removes the chains parameter from the balances() method on the Wallet class. The wallet's default chain (this.chain) is now always used for balance queries.

Why: The chains parameter was misleading because while it was passed to the API, the response processing in transformBalanceResponse always used this.chain to extract chain-specific metadata (tokenData.chains?.[this.chain]). This meant any chains passed by the user were effectively ignored, making the parameter a no-op that could confuse SDK consumers.

Note: This is a breaking change for any consumers currently passing the chains parameter. TypeScript will flag these call sites.

Test plan

  • Manual code review - the change is straightforward removal of an unused parameter
  • Existing tests should continue to pass as the default behavior (using wallet's chain) is unchanged

Package updates

  • @crossmint/wallets-sdk: patch

⚠️ Reviewer note: Consider whether this should be a minor or major bump instead of patch since it removes a public API parameter (breaking change for TypeScript consumers).


Link to Devin run: https://crossmint.devinenterprise.com/sessions/1a2800df29334d49a5f576ceb42bda1e
Requested by: Brendan Weinstein (@brendanw)

The chains parameter was being passed to the API but ignored during response
processing - the wallet's default chain (this.chain) was always used to extract
chain-specific metadata. This made the parameter misleading.

Now the balances() method only accepts tokens and always uses the wallet's
default chain for both the API request and response processing.

Co-Authored-By: Brendan Weinstein <brendan@basebeta.com>
@changeset-bot
Copy link

changeset-bot bot commented Dec 31, 2025

🦋 Changeset detected

Latest commit: fee9f79

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@crossmint/wallets-sdk Patch
expo-demo Patch
@crossmint/client-sdk-react-base Patch
@crossmint/client-sdk-react-native-ui Patch
@crossmint/client-sdk-react-ui Patch
@crossmint/auth-ssr-nextjs-demo Patch
@crossmint/client-sdk-nextjs-starter Patch
@crossmint/wallets-quickstart-devkit Patch
@crossmint/client-sdk-smart-wallet-next-starter Patch

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

@devin-ai-integration
Copy link
Contributor

Original prompt from Brendan
Please code review https://github.com/Crossmint/crossmint-kotlin-sdk/pull/77

@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@guilleasz-crossmint guilleasz-crossmint merged commit dbb338a into main Jan 8, 2026
2 checks passed
@guilleasz-crossmint guilleasz-crossmint deleted the devin/1767150576-remove-chains-param-from-balances branch January 8, 2026 13: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