Commit a2271ba4 authored by eddie's avatar eddie Committed by GitHub

fix: widget defaultChainId (#6012)

parent 1845cb3b
......@@ -57,7 +57,7 @@ export default function Widget({
onDefaultTokenChange,
onReviewSwapClick,
}: WidgetProps) {
const { connector, provider } = useWeb3React()
const { connector, provider, chainId } = useWeb3React()
const locale = useActiveLocale()
const theme = useWidgetTheme()
const { inputs, tokenSelector } = useSyncWidgetInputs({
......@@ -168,7 +168,7 @@ export default function Widget({
locale={locale}
theme={theme}
width={width}
// defaultChainId is excluded - it is always inferred from the passed provider
defaultChainId={chainId}
onConnectWalletClick={onConnectWalletClick}
provider={provider}
onSwitchChain={onSwitchChain}
......
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