Commit 333c3a28 authored by Vignesh Mohankumar's avatar Vignesh Mohankumar Committed by GitHub

fix: check if supported chainId before calling universal-router-sdk (#6126)

parent d06451cb
......@@ -307,7 +307,7 @@ export default function Swap({ className }: { className?: string }) {
(parsedAmounts[Field.INPUT]?.currency.isToken
? (parsedAmounts[Field.INPUT] as CurrencyAmount<Token>)
: undefined),
chainId ? UNIVERSAL_ROUTER_ADDRESS(chainId) : undefined
isSupportedChain(chainId) ? UNIVERSAL_ROUTER_ADDRESS(chainId) : undefined
)
const isApprovalLoading = allowance.state === AllowanceState.REQUIRED && allowance.isApprovalLoading
const [isAllowancePending, setIsAllowancePending] = useState(false)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment