fix: remove chains parameter from balances() method #1542
Merged
+7
−3
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.
Description
Removes the
chainsparameter from thebalances()method on the Wallet class. The wallet's default chain (this.chain) is now always used for balance queries.Why: The
chainsparameter was misleading because while it was passed to the API, the response processing intransformBalanceResponsealways usedthis.chainto 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
chainsparameter. TypeScript will flag these call sites.Test plan
Package updates
@crossmint/wallets-sdk: patchminorormajorbump instead ofpatchsince 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)