Skip to content

Commit

Permalink
show swap input only for correct network
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrkonowrocki committed Mar 27, 2024
1 parent a1499b9 commit 6f40970
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions features/omni-kit/components/sidebars/OmniInputSwap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const OmniInputSwap: FC<OmniInputSwapProps> = ({
type,
}) => {
const {
environment: { extraTokensData, networkId, productType, settings },
environment: { extraTokensData, networkId, productType, settings, shouldSwitchNetwork },
} = useOmniGeneralContext()
const {
form: {
Expand Down Expand Up @@ -193,5 +193,7 @@ export const OmniInputSwap: FC<OmniInputSwapProps> = ({
</Box>
)

return children({ ...(walletAddress && tokensList.length > 1 && { swapController }) })
return children({
...(walletAddress && !shouldSwitchNetwork && tokensList.length > 1 && { swapController }),
})
}

0 comments on commit 6f40970

Please sign in to comment.