web3-react improvement (#581)

* fix SC errors

* improve unsupported chain id error

* bump yarn.lock
This commit is contained in:
Noah Zinsmeister 2019-12-31 15:30:43 -05:00 committed by Ian Lapham
parent 64296d8229
commit e92c8ed5e8
3 changed files with 1295 additions and 1048 deletions

@ -1,6 +1,5 @@
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)
}
})
}

2333
yarn.lock

File diff suppressed because it is too large Load Diff