This PR modifies the addQueryToPath.ts utility function to handle query parameters more effectively by ensuring that when the key is 'chain', the chainId is deleted from searchParams.
Detailed summary
Removed the conditional block that deletes chainId when key is 'chain'.
Ensured searchParams.set(key, queryParams[key]) is always executed regardless of the key.
The return statement constructs the URL with updated searchParams.
✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}
PR-Codex overview
This PR modifies the
addQueryToPath.ts
utility function to handle query parameters more effectively by ensuring that when thekey
is'chain'
, thechainId
is deleted fromsearchParams
.Detailed summary
chainId
whenkey
is'chain'
.searchParams.set(key, queryParams[key])
is always executed regardless of thekey
.searchParams
.