Skip to content

Commit

Permalink
fix: update chainId in trade state (#3340)
Browse files Browse the repository at this point in the history
  • Loading branch information
shoom3301 authored Nov 7, 2023
1 parent 4cc2f1a commit 60a16ec
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ export function useSetupTradeState(): void {
} else if (tokensAreEmpty) {
console.debug('[TRADE STATE]', 'Url does not contain both tokens, resetting')
} else if (onlyChainIdIsChanged) {
// In this case we should update only chainId in the trade state
updateState?.({ ...state, chainId: currentChainId })
console.debug('[TRADE STATE]', 'Only chainId was changed in URL, resetting')
}

Expand Down

0 comments on commit 60a16ec

Please sign in to comment.