Commit e92c8ed5 authored by Noah Zinsmeister's avatar Noah Zinsmeister Committed by Ian Lapham

web3-react improvement (#581)

* fix SC errors

* improve unsupported chain id error

* bump yarn.lock
parent 64296d82
import React from 'react'
import styled from 'styled-components'
import { transparentize } from 'polished'
import { Link } from '../../theme'
const InfoCard = styled.button`
......@@ -10,7 +9,6 @@ const InfoCard = styled.button`
border: 1px solid;
border-radius: 12px;
width: 100% !important;
: 0 4px 8px 0 ${({ theme, clickable }) => (clickable ? transparentize(0.95, theme.shadowColor) : 'none')};
&:focus {
box-shadow: 0 0 0 1px ${({ theme }) => theme.royalBlue};
}
......
......@@ -171,8 +171,12 @@ export default function WalletModal({ pendingTransactions, confirmedTransactions
})
setPendingWallet(connector) // set wallet for pending view
setWalletView(WALLET_VIEWS.PENDING)
activate(connector, undefined, true).catch(e => {
activate(connector, undefined, true).catch(error => {
if (error instanceof UnsupportedChainIdError) {
activate(connector) // a little janky...can't use setError because the connector isn't set
} else {
setPendingError(true)
}
})
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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