Commit 015c9f85 authored by Ian Lapham's avatar Ian Lapham Committed by Noah Zinsmeister

Hosted wallets (#528)

* formnatic setup

* stable with new hosted

* stable version, fortmatic and portis

* fix safari bug

* cleanup

* add white version of arrow

* update options to tabbable buttons

* update injected version

* style tweaks

* style tweaks, remove portis connector
parent a11dc4cd
......@@ -7,9 +7,11 @@ import Transaction from './Transaction'
import { SUPPORTED_WALLETS } from '../../constants'
import { ReactComponent as Close } from '../../assets/images/x.svg'
import { getEtherscanLink } from '../../utils'
import { injected, walletconnect, walletlink } from '../../connectors'
import { injected, walletconnect, walletlink, fortmatic, portis } from '../../connectors'
import CoinbaseWalletIcon from '../../assets/images/coinbaseWalletIcon.svg'
import WalletConnectIcon from '../../assets/images/walletConnectIcon.svg'
import FortmaticIcon from '../../assets/images/fortmaticIcon.png'
import PortisIcon from '../../assets/images/portisIcon.png'
import Identicon from '../Identicon'
import { Link } from '../../theme'
......@@ -115,14 +117,16 @@ const GreenCircle = styled.div`
width: 8px;
margin-left: 12px;
margin-right: 2px;
margin-top: -6px;
background-color: ${({ theme }) => theme.connectedGreen};
border-radius: 50%;
}
`
const GreenText = styled.div`
const CircleWrapper = styled.div`
color: ${({ theme }) => theme.connectedGreen};
display: flex;
justify-content: center;
align-items: center;
`
const LowerSection = styled.div`
......@@ -208,6 +212,20 @@ const TransactionListWrapper = styled.div`
${({ theme }) => theme.flexColumnNoWrap};
`
const WalletAction = styled.div`
color: ${({ theme }) => theme.chaliceGray};
margin-left: 16px;
font-weight: 400;
:hover {
cursor: pointer;
text-decoration: underline;
}
`
const MainWalletAction = styled(WalletAction)`
color: ${({ theme }) => theme.royalBlue};
`
function renderTransactions(transactions, pending) {
return (
<TransactionListWrapper>
......@@ -228,14 +246,13 @@ export default function AccountDetails({
const { chainId, account, connector } = useWeb3React()
function formatConnectorName() {
const isMetaMask = window.ethereum && window.ethereum.isMetaMask
const isMetaMask = window.ethereum && window.ethereum.isMetaMask ? true : false
const name = Object.keys(SUPPORTED_WALLETS)
.filter(
k =>
SUPPORTED_WALLETS[k].connector === connector && (connector !== injected || isMetaMask === (k === 'METAMASK'))
)
.map(k => SUPPORTED_WALLETS[k].name)[0]
return <WalletName>{name}</WalletName>
}
......@@ -258,6 +275,27 @@ export default function AccountDetails({
<img src={CoinbaseWalletIcon} alt={''} /> {formatConnectorName()}
</IconWrapper>
)
} else if (connector === fortmatic) {
return (
<IconWrapper size={16}>
<img src={FortmaticIcon} alt={''} /> {formatConnectorName()}
</IconWrapper>
)
} else if (connector === portis) {
return (
<>
<IconWrapper size={16}>
<img src={PortisIcon} alt={''} /> {formatConnectorName()}
<MainWalletAction
onClick={() => {
portis.portis.showPortis()
}}
>
Show Portis
</MainWalletAction>
</IconWrapper>
</>
)
}
}
......@@ -273,11 +311,22 @@ export default function AccountDetails({
<InfoCard>
<AccountGroupingRow>
{getStatusIcon()}
<GreenText>
<div>
{connector !== injected && connector !== walletlink && (
<WalletAction
onClick={() => {
connector.close()
}}
>
Disconnect
</WalletAction>
)}
<CircleWrapper>
<GreenCircle>
<div />
</GreenCircle>
</GreenText>
</CircleWrapper>
</div>
</AccountGroupingRow>
<AccountGroupingRow>
{ENSName ? (
......@@ -298,7 +347,8 @@ export default function AccountDetails({
</AccountGroupingRow>
</InfoCard>
</YourAccount>
{!isMobile && (
{!(isMobile && (window.web3 || window.ethereum)) && (
<ConnectButtonRow>
<OptionButton
onClick={() => {
......
......@@ -3,42 +3,67 @@ import styled from 'styled-components'
import { transparentize } from 'polished'
import { Link } from '../../theme'
const InfoCard = styled.div`
background-color: ${({ theme }) => theme.backgroundColor};
const InfoCard = styled.button`
background-color: ${({ theme, active }) => (active ? theme.activeGray : theme.backgroundColor)};
padding: 1rem;
border: 1px solid ${({ theme }) => theme.placeholderGray};
border-radius: 20px;
box-shadow: 0 4px 8px 0 ${({ theme }) => transparentize(0.95, theme.shadowColor)};
outline: none;
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};
}
border-color: ${({ theme, active }) => (active ? 'transparent' : theme.placeholderGray)};
`
const OptionCard = styled(InfoCard)`
display: grid;
grid-template-columns: 1fr 48px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
margin-top: 2rem;
padding: 1rem;
${({ theme }) => theme.mediaWidth.upToMedium`
height: 40px;
grid-template-columns: 1fr 40px;
padding: 0.6rem 1rem;
`};
`
const OptionCardLeft = styled.div`
${({ theme }) => theme.flexColumnNoWrap};
height: 100%;
justify-content: center;
height: 100%;
`
const OptionCardClickable = styled(OptionCard)`
margin-top: 0;
margin-bottom: 1rem;
&:hover {
cursor: pointer;
border: 1px solid ${({ theme }) => theme.malibuBlue};
cursor: ${({ clickable }) => (clickable ? 'pointer' : '')};
border: ${({ clickable, theme }) => (clickable ? `1px solid ${theme.malibuBlue}` : ``)};
}
opacity: ${({ disabled }) => (disabled ? '0.5' : '1')};
`
const GreenCircle = styled.div`
${({ theme }) => theme.flexRowNoWrap}
justify-content: center;
align-items: center;
&:first-child {
height: 8px;
width: 8px;
margin-right: 8px;
background-color: ${({ theme }) => theme.connectedGreen};
border-radius: 50%;
}
`
const CircleWrapper = styled.div`
color: ${({ theme }) => theme.connectedGreen};
display: flex;
justify-content: center;
align-items: center;
`
const HeaderText = styled.div`
${({ theme }) => theme.flexRowNoWrap};
color: ${props => (props.color === 'blue' ? ({ theme }) => theme.royalBlue : props.color)};
font-size: 1rem;
font-weight: 500;
......@@ -62,22 +87,44 @@ const IconWrapper = styled.div`
justify-content: center;
& > img,
span {
height: ${({ size }) => (size ? size + 'px' : '32px')};
width: ${({ size }) => (size ? size + 'px' : '32px')};
height: ${({ size }) => (size ? size + 'px' : '24px')};
width: ${({ size }) => (size ? size + 'px' : '24px')};
}
${({ theme }) => theme.mediaWidth.upToMedium`
align-items: flex-end;
`};
`
export default function Option({ link = null, size = null, onClick = null, color, header, subheader = null, icon }) {
export default function Option({
link = null,
clickable = true,
size = null,
onClick = null,
color,
header,
subheader = null,
icon,
active = false
}) {
const content = (
<OptionCardClickable onClick={onClick}>
<OptionCardClickable onClick={onClick} clickable={clickable && !active} active={active}>
<OptionCardLeft>
<HeaderText color={color}>{header}</HeaderText>
<HeaderText color={color}>
{' '}
{active ? (
<CircleWrapper>
<GreenCircle>
<div />
</GreenCircle>
</CircleWrapper>
) : (
''
)}
{header}
</HeaderText>
{subheader && <SubHeader>{subheader}</SubHeader>}
</OptionCardLeft>
<IconWrapper size={size}>
<IconWrapper size={size} active={active}>
<img src={icon} alt={'Icon'} />
</IconWrapper>
</OptionCardClickable>
......
import React from 'react'
import styled from 'styled-components'
import Option from './Option'
import { SUPPORTED_WALLETS } from '../../constants'
import WalletConnectData from './WalletConnectData'
import { walletconnect, injected } from '../../connectors'
import { Spinner } from '../../theme'
import Circle from '../../assets/images/circle.svg'
import { darken } from 'polished'
const PendingSection = styled.div`
${({ theme }) => theme.flexColumnNoWrap};
align-items: center;
justify-content: center;
width: 100%;
& > * {
width: 100%;
}
`
const SpinnerWrapper = styled(Spinner)`
font-size: 4rem;
margin-right: 1rem;
svg {
path {
color: ${({ theme }) => theme.placeholderGray};
}
}
`
const LoadingMessage = styled.div`
${({ theme }) => theme.flexRowNoWrap};
align-items: center;
justify-content: flex-start;
border-radius: 12px;
margin-bottom: 20px;
color: ${({ theme, error }) => (error ? theme.salmonRed : 'inherit')};
border: 1px solid ${({ theme, error }) => (error ? theme.salmonRed : theme.placeholderGray)};
& > * {
padding: 1rem;
}
`
const ErrorGroup = styled.div`
${({ theme }) => theme.flexRowNoWrap};
align-items: center;
justify-content: flex-start;
`
const ErrorButton = styled.div`
border-radius: 8px;
font-size: 12px;
color: ${({ theme }) => theme.textColor};
background-color: ${({ theme }) => theme.placeholderGray};
margin-left: 1rem;
padding: 0.5rem;
font-weight: 600;
user-select: none;
&:hover {
cursor: pointer;
background-color: ${({ theme }) => darken(0.1, theme.placeholderGray)};
}
`
export default function PendingView({ uri = '', size, connector, error = false, tryActivation }) {
const isMetamask = window.ethereum && window.ethereum.isMetaMask
return (
<PendingSection>
<LoadingMessage error={error}>
<div>
{!error && <SpinnerWrapper src={Circle} />}
{error ? (
<ErrorGroup>
<div>Error connecting.</div>
<ErrorButton
onClick={() => {
tryActivation(connector)
}}
>
Try Again
</ErrorButton>
</ErrorGroup>
) : connector === walletconnect ? (
'Scan QR code with a compatible wallet...'
) : (
'Waiting for connection...'
)}
</div>
</LoadingMessage>
{!error && connector === walletconnect && <WalletConnectData size={size} uri={uri} />}
{Object.keys(SUPPORTED_WALLETS).map(key => {
const option = SUPPORTED_WALLETS[key]
if (option.connector === connector) {
if (option.connector === injected && isMetamask && option.name !== 'MetaMask') {
return null
} else {
return (
<Option
key={key}
clickable={false}
color={option.color}
header={option.name}
subheader={option.description}
icon={require('../../assets/images/' + option.iconName)}
/>
)
}
}
return true
})}
</PendingSection>
)
}
import React from 'react'
import styled from 'styled-components'
import QRCode from 'qrcode.react'
import Option from './Option'
import { useDarkModeManager } from '../../contexts/LocalStorage'
const QRSection = styled.div`
${({ theme }) => theme.flexColumnNoWrap};
align-items: center;
justify-content: center;
h5 {
padding-bottom: 1rem;
}
`
const QRCodeWrapper = styled.div`
${({ theme }) => theme.flexColumnNoWrap};
align-items: center;
justify-content: center;
width: 280px;
height: 280px;
border-radius: 20px;
border-radius: 12px;
margin-bottom: 20px;
border: 1px solid ${({ theme }) => theme.placeholderGray};
`
export default function QrCode({ uri, size, header, subheader, icon }) {
export default function WalletConnectData({ uri = '', size }) {
const [isDark] = useDarkModeManager()
return (
<QRSection>
<h5>Scan QR code with a compatible wallet</h5>
<QRCodeWrapper>
{uri && (
<QRCode size={size} value={uri} bgColor={isDark ? '#333639' : 'white'} fgColor={isDark ? 'white' : 'black'} />
)}
</QRCodeWrapper>
<Option color={'#4196FC'} header={header} subheader={subheader} icon={icon} />
</QRSection>
)
}
......@@ -6,16 +6,16 @@ import { URI_AVAILABLE } from '@web3-react/walletconnect-connector'
import Modal from '../Modal'
import AccountDetails from '../AccountDetails'
import QrCode from './QrCode'
import PendingView from './PendingView'
import Option from './Option'
import { SUPPORTED_WALLETS, MOBILE_DEEP_LINKS } from '../../constants'
import { SUPPORTED_WALLETS } from '../../constants'
import { usePrevious } from '../../hooks'
import { Link } from '../../theme'
import WalletConnectIcon from '../../assets/images/walletConnectIcon.svg'
import MetamaskIcon from '../../assets/images/metamask.png'
import { ReactComponent as Close } from '../../assets/images/x.svg'
import { injected, walletconnect } from '../../connectors'
import { injected, walletconnect, fortmatic } from '../../connectors'
import { useWalletModalToggle, useWalletModalOpen } from '../../contexts/Application'
import { OVERLAY_READY } from '../../connectors/Fortmatic'
const CloseIcon = styled.div`
position: absolute;
......@@ -107,8 +107,9 @@ const HoverText = styled.div`
const WALLET_VIEWS = {
OPTIONS: 'options',
OPTIONS_SECONDARY: 'options_secondary',
ACCOUNT: 'account',
WALLET_CONNECT: 'walletConnect'
PENDING: 'pending'
}
export default function WalletModal({ pendingTransactions, confirmedTransactions, ENSName }) {
......@@ -116,12 +117,17 @@ export default function WalletModal({ pendingTransactions, confirmedTransactions
const [walletView, setWalletView] = useState(WALLET_VIEWS.ACCOUNT)
const [pendingWallet, setPendingWallet] = useState()
const [pendingError, setPendingError] = useState()
const walletModalOpen = useWalletModalOpen()
const toggleWalletModal = useWalletModalToggle()
// always reset to account view
useEffect(() => {
if (walletModalOpen) {
setPendingError(false)
setWalletView(WALLET_VIEWS.ACCOUNT)
}
}, [walletModalOpen])
......@@ -131,7 +137,7 @@ export default function WalletModal({ pendingTransactions, confirmedTransactions
useEffect(() => {
const activateWC = uri => {
setUri(uri)
setWalletView(WALLET_VIEWS.WALLET_CONNECT)
// setWalletView(WALLET_VIEWS.PENDING)
}
walletconnect.on(URI_AVAILABLE, activateWC)
return () => {
......@@ -148,33 +154,48 @@ export default function WalletModal({ pendingTransactions, confirmedTransactions
}
}, [setWalletView, active, error, connector, walletModalOpen, activePrevious, connectorPrevious])
const tryActivation = async connector => {
setPendingWallet(connector) // set wallet for pending view
setWalletView(WALLET_VIEWS.PENDING)
activate(connector, undefined, true).catch(e => {
setPendingError(true)
})
}
// close wallet modal if fortmatic modal is active
useEffect(() => {
fortmatic.on(OVERLAY_READY, () => {
toggleWalletModal()
})
}, [toggleWalletModal])
// get wallets user can switch too, depending on device/browser
function getOptions() {
const isMetamask = window.ethereum && window.ethereum.isMetaMask
if (isMobile && !window.web3 && !window.ethereum) {
return Object.keys(MOBILE_DEEP_LINKS).map(key => {
const option = MOBILE_DEEP_LINKS[key]
return Object.keys(SUPPORTED_WALLETS).map(key => {
const option = SUPPORTED_WALLETS[key]
// check for mobile options
if (isMobile) {
if (!window.web3 && !window.ethereum && option.mobile) {
return (
<Option
onClick={() => {
option.connector !== connector && !option.href && tryActivation(option.connector)
}}
key={key}
active={option.connector && option.connector === connector}
color={option.color}
header={option.name}
link={option.href}
subheader={option.description}
header={option.name}
subheader={null}
icon={require('../../assets/images/' + option.iconName)}
/>
)
})
} else {
return Object.keys(SUPPORTED_WALLETS).map(key => {
const option = SUPPORTED_WALLETS[key]
// don't show the option we're currently connected to
if (option.connector === connector) {
}
return null
}
// overwrite injected when needed
if (option.connector === injected) {
// don't show injected if there's no injected provider
if (!(window.web3 || window.ethereum)) {
......@@ -184,7 +205,7 @@ export default function WalletModal({ pendingTransactions, confirmedTransactions
key={key}
color={'#E8831D'}
header={'Install Metamask'}
subheader={'Easy to use browser extension.'}
subheader={null}
link={'https://metamask.io/'}
icon={MetamaskIcon}
/>
......@@ -203,21 +224,26 @@ export default function WalletModal({ pendingTransactions, confirmedTransactions
}
}
// return rest of options
return (
!isMobile &&
!option.mobileOnly && (
<Option
onClick={() => {
activate(option.connector)
option.connector !== connector && !option.href && tryActivation(option.connector)
}}
key={key}
active={option.connector === connector}
color={option.color}
link={option.href}
header={option.name}
subheader={walletView === WALLET_VIEWS.OPTIONS ? null : option.description}
subheader={null} //use option.descriptio to bring back multi-line
icon={require('../../assets/images/' + option.iconName)}
/>
)
)
})
}
}
function getModalContent() {
if (error) {
......@@ -254,13 +280,15 @@ export default function WalletModal({ pendingTransactions, confirmedTransactions
<CloseColor alt={'close icon'} />
</CloseIcon>
{walletView !== WALLET_VIEWS.ACCOUNT ? (
<HeaderRow
color="blue"
<HeaderRow color="blue">
<HoverText
onClick={() => {
setPendingError(false)
setWalletView(WALLET_VIEWS.ACCOUNT)
}}
>
<HoverText>Back</HoverText>
Back
</HoverText>
</HeaderRow>
) : (
<HeaderRow>
......@@ -268,25 +296,25 @@ export default function WalletModal({ pendingTransactions, confirmedTransactions
</HeaderRow>
)}
<ContentWrapper>
{walletView === WALLET_VIEWS.WALLET_CONNECT ? (
<QrCode
{walletView === WALLET_VIEWS.PENDING ? (
<PendingView
uri={uri}
header={'Connect with Wallet Connect'}
subheader={'Open protocol supported by major mobile wallets'}
size={220}
icon={WalletConnectIcon}
connector={pendingWallet}
error={pendingError}
tryActivation={tryActivation}
/>
) : !account ? (
getOptions()
) : (
<OptionGrid>{getOptions()}</OptionGrid>
)}
{walletView !== WALLET_VIEWS.PENDING && (
<Blurb>
<span>New to Ethereum? &nbsp;</span>{' '}
<Link href="https://ethereum.org/use/#3-what-is-a-wallet-and-which-one-should-i-use">
Learn more about wallets
</Link>
</Blurb>
)}
</ContentWrapper>
</UpperSection>
)
......
......@@ -12,9 +12,11 @@ import { useAllTransactions } from '../../contexts/Transactions'
import { useWalletModalToggle } from '../../contexts/Application'
import { Spinner } from '../../theme'
import Circle from '../../assets/images/circle.svg'
import { injected, walletconnect, walletlink } from '../../connectors'
import { injected, walletconnect, walletlink, fortmatic, portis } from '../../connectors'
import WalletConnectIcon from '../../assets/images/walletConnectIcon.svg'
import CoinbaseWalletIcon from '../../assets/images/coinbaseWalletIcon.svg'
import FortmaticIcon from '../../assets/images/fortmaticIcon.png'
import PortisIcon from '../../assets/images/portisIcon.png'
import { NetworkContextName } from '../../constants'
import Identicon from '../Identicon'
......@@ -147,6 +149,18 @@ export default function Web3Status() {
<img src={CoinbaseWalletIcon} alt={''} />
</IconWrapper>
)
} else if (connector === fortmatic) {
return (
<IconWrapper size={16}>
<img src={FortmaticIcon} alt={''} />
</IconWrapper>
)
} else if (connector === portis) {
return (
<IconWrapper size={16}>
<img src={PortisIcon} alt={''} />
</IconWrapper>
)
}
}
......
import { FortmaticConnector as FortmaticConnectorCore } from '@web3-react/fortmatic-connector'
export const OVERLAY_READY = 'OVERLAY_READY'
const chainIdToNetwork = {
1: 'mainnet',
3: 'ropsten',
4: 'rinkeby',
42: 'kovan'
}
export class FortmaticConnector extends FortmaticConnectorCore {
async activate() {
if (!this.fortmatic) {
const { default: Fortmatic } = await import('fortmatic')
this.fortmatic = new Fortmatic(
this.apiKey,
this.chainId === 1 || this.chainId === 4 ? undefined : chainIdToNetwork[this.chainId]
)
}
const provider = this.fortmatic.getProvider()
const pollForOverlayReady = new Promise(resolve => {
const interval = setInterval(() => {
if (provider.overlayReady) {
clearInterval(interval)
this.emit(OVERLAY_READY)
resolve()
}
}, 200)
})
const [account] = await Promise.all([provider.enable().then(accounts => accounts[0]), pollForOverlayReady])
return { provider: this.fortmatic.getProvider(), chainId: this.chainId, account }
}
}
import {
InjectedConnector as InjectedConnectorCore,
NoEthereumProviderError,
UserRejectedRequestError
} from '@web3-react/injected-connector'
export class InjectedConnector extends InjectedConnectorCore {
async activate() {
if (!window.ethereum) {
throw new NoEthereumProviderError()
}
if (window.ethereum.on) {
window.ethereum.on('connect', this.handleConnect)
window.ethereum.on('chainChanged', this.handleChainChanged)
window.ethereum.on('networkChanged', this.handleNetworkChanged)
window.ethereum.on('accountsChanged', this.handleAccountsChanged)
window.ethereum.on('close', this.handleClose)
}
// provides support for most dapp browsers
let account = undefined
if (window.ethereum.isMetaMask) {
window.ethereum.autoRefreshOnNetworkChange = false
account = await window.ethereum
.send('eth_requestAccounts')
.then(({ result: accounts }) => accounts[0])
.catch(error => {
if (error && error.code === 4001) {
throw new UserRejectedRequestError()
} else {
throw error
}
})
} else {
account = await window.ethereum
.enable()
.then(accounts => accounts[0])
.catch(error => {
if (error && error.code === 4001) {
throw new UserRejectedRequestError()
} else {
throw error
}
})
}
return { provider: window.ethereum, account }
}
async getChainId() {
if (!window.ethereum) {
throw new NoEthereumProviderError()
}
if (window.ethereum.isMetaMask) {
return window.ethereum.send('eth_chainId').then(({ result: chainId }) => chainId)
} else {
return window.ethereum.networkVersion ? window.ethereum.networkVersion : 1
}
}
async getAccount() {
if (!window.ethereum) {
throw new NoEthereumProviderError()
}
if (window.ethereum.isMetaMask) {
return window.ethereum.send('eth_accounts').then(({ result: accounts }) => accounts[0])
} else {
return window.ethereum.enable().then(accounts => accounts[0])
}
}
deactivate() {
if (window.ethereum && window.ethereum.removeListener) {
window.ethereum.removeListener('connect', this.handleConnect)
window.ethereum.removeListener('chainChanged', this.handleChainChanged)
window.ethereum.removeListener('networkChanged', this.handleNetworkChanged)
window.ethereum.removeListener('accountsChanged', this.handleAccountsChanged)
window.ethereum.removeListener('close', this.handleClose)
}
}
async isAuthorized() {
if (window.ethereum) {
if (window.ethereum.isMetaMask) {
return window.ethereum
.send('eth_accounts')
.then(({ result: accounts }) => {
if (accounts.length > 0) {
return true
}
return false
})
.catch(() => {
return false
})
} else {
return window.ethereum
.enable()
.then(accounts => {
if (accounts.length > 0) {
return true
}
return false
})
.catch(() => {
return false
})
}
}
return false
}
}
import { InjectedConnector } from '@web3-react/injected-connector'
import { WalletConnectConnector } from '@web3-react/walletconnect-connector'
import { WalletLinkConnector } from '@web3-react/walletlink-connector'
import { PortisConnector } from '@web3-react/portis-connector'
import { InjectedConnector } from './Injected'
import { NetworkConnector } from './Network'
import { FortmaticConnector } from './Fortmatic'
const POLLING_INTERVAL = 10000
export const injected = new InjectedConnector({
supportedChainIds: [1]
})
export const network = new NetworkConnector({
urls: { 1: process.env.REACT_APP_NETWORK_URL },
pollingInterval: POLLING_INTERVAL
})
export const injected = new InjectedConnector({
supportedChainIds: [1]
})
export const walletconnect = new WalletConnectConnector({
rpc: { 1: process.env.REACT_APP_NETWORK_URL },
bridge: 'https://bridge.walletconnect.org',
......@@ -22,6 +24,16 @@ export const walletconnect = new WalletConnectConnector({
pollingInterval: POLLING_INTERVAL
})
export const fortmatic = new FortmaticConnector({
apiKey: process.env.REACT_APP_FORTMATIC_KEY,
chainId: 1
})
export const portis = new PortisConnector({
dAppId: process.env.REACT_APP_PORTIS_ID,
networks: [1]
})
export const walletlink = new WalletLinkConnector({
url: process.env.REACT_APP_NETWORK_URL,
appName: 'Uniswap',
......
import { injected, walletconnect, walletlink } from '../connectors'
import { injected, walletconnect, walletlink, fortmatic, portis } from '../connectors'
export const FACTORY_ADDRESSES = {
1: '0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95',
......@@ -15,52 +15,72 @@ export const SUPPORTED_THEMES = {
export const SUPPORTED_WALLETS = {
INJECTED: {
connector: injected,
id: 'Injected',
name: 'Injected',
iconName: 'arrow-right.svg',
description: 'Injected web3 provider.',
color: '#010101'
href: null,
color: '#010101',
primary: true
},
METAMASK: {
connector: injected,
id: 'MetaMask',
name: 'MetaMask',
iconName: 'metamask.png',
description: 'Easy-to-use browser extension.',
href: null,
color: '#E8831D'
},
WALLET_CONNECT: {
connector: walletconnect,
id: 'WalletConnect',
name: 'Wallet Connect',
iconName: 'walletConnectIcon.svg',
description: 'Connect to Trust Wallet, Rainbow Wallet and more...',
href: null,
color: '#4196FC'
},
WALLET_LINK: {
connector: walletlink,
id: 'WalletLink',
name: 'Coinbase Wallet',
iconName: 'coinbaseWalletIcon.svg',
description: 'Use Coinbase Wallet app on mobile device',
href: null,
color: '#315CF5'
}
}
export const MOBILE_DEEP_LINKS = {
},
COINBASE_LINK: {
name: 'Open in Coinbase Wallet',
iconName: 'coinbaseWalletIcon.svg',
description: 'Open in Coinbase Wallet app.',
href: 'https://go.cb-w.com/mtUDhEZPy1',
color: '#315CF5'
color: '#315CF5',
mobile: true,
mobileOnly: true
},
TRUST_WALLET_LINK: {
name: 'Open in Trust Wallet',
iconName: 'trustWallet.png',
description: 'iOS and Android app.',
href: 'https://link.trustwallet.com/open_url?coin_id=60&url=https://uniswap.exchange/swap',
color: '#1C74CC'
color: '#1C74CC',
mobile: true,
mobileOnly: true
},
FORTMATIC: {
connector: fortmatic,
name: 'Fortmatic',
iconName: 'fortmaticIcon.png',
description: 'Login using Fortmatic hosted wallet',
href: null,
color: '#6748FF',
mobile: true
},
Portis: {
connector: portis,
name: 'Portis',
iconName: 'portisIcon.png',
description: 'Login using Portis hosted wallet',
href: null,
color: '#4A6C9B',
mobile: true
}
}
......
import { useState, useMemo, useCallback, useEffect, useRef } from 'react'
import { useWeb3React as useWeb3ReactCore } from '@web3-react/core'
import copy from 'copy-to-clipboard'
import { isMobile } from 'react-device-detect'
import { NetworkContextName } from '../constants'
import ERC20_ABI from '../constants/abis/erc20'
......@@ -25,9 +26,15 @@ export function useEagerConnect() {
activate(injected, undefined, true).catch(() => {
setTried(true)
})
} else {
if (isMobile && window.ethereum) {
activate(injected, undefined, true).catch(() => {
setTried(true)
})
} else {
setTried(true)
}
}
})
}, [activate]) // intentionally only running on mount (make sure it's only mounted once :))
......@@ -52,7 +59,7 @@ export function useInactiveListener(suppress = false) {
const { ethereum } = window
if (ethereum && ethereum.on && !active && !error && !suppress) {
const handleNetworkChanged = () => {
const handleChainChanged = () => {
// eat errors
activate(injected, undefined, true).catch(() => {})
}
......@@ -64,14 +71,23 @@ export function useInactiveListener(suppress = false) {
}
}
const handleNetworkChanged = () => {
// eat errors
activate(injected, undefined, true).catch(() => {})
}
ethereum.on('chainChanged', handleChainChanged)
ethereum.on('networkChanged', handleNetworkChanged)
ethereum.on('accountsChanged', handleAccountsChanged)
return () => {
if (ethereum.removeListener) {
ethereum.removeListener('chainChanged', handleChainChanged)
ethereum.removeListener('networkChanged', handleNetworkChanged)
ethereum.removeListener('accountsChanged', handleAccountsChanged)
}
}
}
return () => {}
}, [active, error, suppress, activate])
......
......@@ -61,6 +61,7 @@ const theme = darkMode => ({
chaliceGray: darkMode ? '#7B7B7B' : '#AEAEAE',
doveGray: darkMode ? '#C4C4C4' : '#737373',
mineshaftGray: darkMode ? '#E1E1E1' : '#2B2B2B',
activeGray: darkMode ? '#292C2F' : '#F7F8FA',
buttonOutlineGrey: darkMode ? '#FAFAFA' : '#F2F2F2',
tokenRowHover: darkMode ? '#404040' : '#F2F2F2',
......
......@@ -996,6 +996,13 @@
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-typescript" "^7.6.0"
"@babel/runtime@7.3.4":
version "7.3.4"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.3.4.tgz#73d12ba819e365fcf7fd152aed56d6df97d21c83"
integrity sha512-IvfvnMdSaLBateu0jfsYIpZTxAc2cKEXEMiezGGN75QcBcecDUKd3PgLAncT0oOgxKy8dd8hrJKj9MfzgfZd6g==
dependencies:
regenerator-runtime "^0.12.0"
"@babel/runtime@7.6.0":
version "7.6.0"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.6.0.tgz#4fc1d642a9fd0299754e8b5de62c631cf5568205"
......@@ -1412,6 +1419,64 @@
resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b"
integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==
"@portis/eth-json-rpc-middleware@^4.1.2":
version "4.1.2"
resolved "https://registry.yarnpkg.com/@portis/eth-json-rpc-middleware/-/eth-json-rpc-middleware-4.1.2.tgz#391e392da03dea348c8111a8111ce4550aa24a02"
integrity sha512-LUV0JgV6jphhfmYyElpFYfEzKhxaW2VYB/trWJK7+68s4PNyMMYR94hheXRh9T2lBomSVpdbySfYxjWVLAMKwA==
dependencies:
btoa "^1.2.1"
clone "^2.1.1"
eth-query "^2.1.2"
eth-sig-util "^1.4.2"
ethereumjs-block "^1.6.0"
ethereumjs-tx "^1.3.3"
ethereumjs-util "^5.1.2"
ethereumjs-vm "2.2.2"
fetch-ponyfill "^4.0.0"
json-rpc-engine "^5.0.0"
json-rpc-error "^2.0.0"
json-stable-stringify "^1.0.1"
pify "^3.0.0"
safe-event-emitter "^1.0.1"
"@portis/web3-provider-engine@1.1.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@portis/web3-provider-engine/-/web3-provider-engine-1.1.0.tgz#4e502fe363dd5156505ea54a5c902537944b9cf5"
integrity sha512-443QwQqgO/D0gEn7voMfo/dBc0SNzvJ4vVSOUJj1r2W9MsN3f5HeU2wDeXLc8bQryGsmemBxmghK/G+XQTXA6w==
dependencies:
"@portis/eth-json-rpc-middleware" "^4.1.2"
async "^2.5.0"
backoff "^2.5.0"
clone "^2.0.0"
cross-fetch "^2.1.0"
eth-block-tracker "^4.2.0"
eth-json-rpc-filters "^4.0.2"
eth-json-rpc-infura "^3.1.0"
eth-sig-util "^1.4.2"
ethereumjs-block "^1.2.2"
ethereumjs-tx "^1.2.0"
ethereumjs-util "^5.1.5"
ethereumjs-vm "^2.3.4"
json-rpc-error "^2.0.0"
json-stable-stringify "^1.0.1"
promise-to-callback "^1.0.0"
readable-stream "^2.2.9"
request "^2.85.0"
semaphore "^1.0.3"
ws "^5.1.1"
xhr "^2.2.0"
xtend "^4.0.1"
"@portis/web3@^2.0.0-beta.54":
version "2.0.0-beta.54"
resolved "https://registry.yarnpkg.com/@portis/web3/-/web3-2.0.0-beta.54.tgz#a46f21375bec90bb247f66e9fde776d863a6f25b"
integrity sha512-BrhlbEXUEtlJhElXMI32S8q/2hzQpuGNRLsRxEURxonWkDMzK/CjtpKO2ACoJ205Y96lMH4S3xQB0Vuc8dC/WQ==
dependencies:
"@portis/web3-provider-engine" "1.1.0"
ethereumjs-util "5.2.0"
penpal "3.0.7"
pocket-js-core "0.0.3"
"@reach/auto-id@0.2.0":
version "0.2.0"
resolved "https://registry.yarnpkg.com/@reach/auto-id/-/auto-id-0.2.0.tgz#97f9e48fe736aa5c6f4f32cf73c1f19d005f8550"
......@@ -1830,63 +1895,84 @@
web3-provider-engine "github:walletconnect/web3-provider-engine"
xhr2-cookies "^1.1.0"
"@web3-react/abstract-connector@^6.0.0-beta.15":
version "6.0.0-beta.15"
resolved "https://registry.yarnpkg.com/@web3-react/abstract-connector/-/abstract-connector-6.0.0-beta.15.tgz#6f33705e573fb4b4e665743dfe973c1af5b83d68"
integrity sha512-76bf7DuGXm2aFkzI7tfXoLX1yIPDFEil/f+vZFUPktbhN3a/GnGyU0W2xQ03sVsMqYfNAhAAA31OTbRYIN55IQ==
"@web3-react/abstract-connector@^6.0.0-beta.19":
version "6.0.0-beta.19"
resolved "https://registry.yarnpkg.com/@web3-react/abstract-connector/-/abstract-connector-6.0.0-beta.19.tgz#c4565249977344c2ca6b06c0545d76ef9ffdf225"
integrity sha512-aSh3ZvdNBeCXoe9QP7d0Xj19w4nwL+RVvB29rmpylTNpsGJ41nPxXCOXY08olHA+aGmwm8bLhIv3ArFMc29qrA==
dependencies:
"@web3-react/types" "^6.0.0-beta.15"
"@web3-react/types" "^6.0.0-beta.19"
"@web3-react/core@^6.0.0-beta.15":
version "6.0.0-beta.15"
resolved "https://registry.yarnpkg.com/@web3-react/core/-/core-6.0.0-beta.15.tgz#363a6da18361f5bed169631d3a258b32a4ce525c"
integrity sha512-ah/eJbCtMgd6JIEbepidZfwYY0OGxayGJJF73rabaGauIbsmSwokgZFY9+Yc/Qyk9WsxGmTc7NwbRPdklH2Wqg==
"@web3-react/core@6.0.0-beta.19":
version "6.0.0-beta.19"
resolved "https://registry.yarnpkg.com/@web3-react/core/-/core-6.0.0-beta.19.tgz#ec62b2bacc2d87fedb5c8e3f2542abd3a64f1f74"
integrity sha512-wGPIk+SxoJQRsn8Z05ozXQFKlGlnufqgvvqkFE6hMQOo/LrAdpIzmYt/VH5AQ6H/GgYnj1JdWjk/7qLGbz6v9g==
dependencies:
"@ethersproject/keccak256" "^5.0.0-beta.130"
"@web3-react/types" "^6.0.0-beta.15"
"@web3-react/types" "^6.0.0-beta.19"
tiny-invariant "^1.0.6"
tiny-warning "^1.0.3"
"@web3-react/injected-connector@^6.0.0-beta.17":
version "6.0.0-beta.17"
resolved "https://registry.yarnpkg.com/@web3-react/injected-connector/-/injected-connector-6.0.0-beta.17.tgz#b70256464cd3f08472a681a1347bc48978abaede"
integrity sha512-Q83vlFlOomy4yt8EClpCwa9V8e7GoEuEr+QDQr/gGM+9i6Aseuzn0l4MTrllSE0Ntb5sfkUZRJrKOvCAZ49Q6g==
"@web3-react/fortmatic-connector@6.0.0-beta.19":
version "6.0.0-beta.19"
resolved "https://registry.yarnpkg.com/@web3-react/fortmatic-connector/-/fortmatic-connector-6.0.0-beta.19.tgz#b760a37cec33a86518a2df4d006d7408bd194b3b"
integrity sha512-fD5Z4oqUAQ36P67tHBKtr/KctaTrX5PjJtVldDnVeGFZWy7kF3vyBehzGKBNh/LuFXSYb2F7TC/489ogq8DecQ==
dependencies:
"@web3-react/abstract-connector" "^6.0.0-beta.15"
"@web3-react/types" "^6.0.0-beta.15"
"@web3-react/abstract-connector" "^6.0.0-beta.19"
"@web3-react/types" "^6.0.0-beta.19"
fortmatic "^1.0.0"
tiny-invariant "^1.0.6"
"@web3-react/network-connector@^6.0.0-beta.15":
version "6.0.0-beta.15"
resolved "https://registry.yarnpkg.com/@web3-react/network-connector/-/network-connector-6.0.0-beta.15.tgz#be793849eb2dd47c8943a97b53720d69f9be5dce"
integrity sha512-yF6hHoSet7Zu/zSeZn9l95HB7yyjUvEL98v68MOHKkPVfRiMHzXL1EVVxV8iZqwEKJm2f9GQmBqjI/mBono1wQ==
"@web3-react/injected-connector@6.0.0-beta.20":
version "6.0.0-beta.20"
resolved "https://registry.yarnpkg.com/@web3-react/injected-connector/-/injected-connector-6.0.0-beta.20.tgz#b04787a4f036eaa6eb4c5ea327bc941a9383303e"
integrity sha512-uXVgSn8qUUEFd0figiaxHY9yF5RenpHx4sUDxTjAZrSUwkg2jPBoV7BjPcXPP2LGwqVzFDL4059usNXSV1FVqg==
dependencies:
"@web3-react/abstract-connector" "^6.0.0-beta.19"
"@web3-react/types" "^6.0.0-beta.19"
tiny-warning "^1.0.3"
"@web3-react/network-connector@6.0.0-beta.19":
version "6.0.0-beta.19"
resolved "https://registry.yarnpkg.com/@web3-react/network-connector/-/network-connector-6.0.0-beta.19.tgz#e79f798284bd712a33780fabe655b90b173ba93c"
integrity sha512-1RzNx58Kkkh/ktAh+/twpwDpf/gmIrMZRogEv1EpCAYlrDFlMz/NUF4oW6UY/ZsTvkYRbGm3MvDFdUZreEIhag==
dependencies:
"@0x/subproviders" "^5.0.4"
"@web3-react/abstract-connector" "^6.0.0-beta.15"
"@web3-react/types" "^6.0.0-beta.15"
"@web3-react/abstract-connector" "^6.0.0-beta.19"
"@web3-react/types" "^6.0.0-beta.19"
tiny-invariant "^1.0.6"
"@web3-react/portis-connector@6.0.0-beta.19":
version "6.0.0-beta.19"
resolved "https://registry.yarnpkg.com/@web3-react/portis-connector/-/portis-connector-6.0.0-beta.19.tgz#c2eb0db36e56768c9e89c802f1d72fe6f0b579a5"
integrity sha512-30qT/kNf7zIPkL669j8CtRJycFqgqg6ZQ4CpaqG3JZHjBblo/GdUTxOjyuvsCarC2Jh5o92BNHqtOz0XAOcjrA==
dependencies:
"@portis/web3" "^2.0.0-beta.54"
"@web3-react/abstract-connector" "^6.0.0-beta.19"
"@web3-react/types" "^6.0.0-beta.19"
tiny-invariant "^1.0.6"
"@web3-react/types@^6.0.0-beta.15":
version "6.0.0-beta.15"
resolved "https://registry.yarnpkg.com/@web3-react/types/-/types-6.0.0-beta.15.tgz#ea6b4d49d7c1f87fdcdde80e5a23a5356b359c87"
integrity sha512-Jloib32SYxGo9HB+//qZ/3XV3KlmzWYexnWU2cs/rIYt+zsJhdQAW1PAWvH3F3w2IpMZ1C72hImAlazmtjxF5A==
"@web3-react/types@^6.0.0-beta.19":
version "6.0.0-beta.19"
resolved "https://registry.yarnpkg.com/@web3-react/types/-/types-6.0.0-beta.19.tgz#06e32c1c83069c5dd0f18d87c083204057b6a9ea"
integrity sha512-8V2ORhdMOrmrdw+Er2b863KsOgatpbelTaBizJ5IcJdKS1NwBQerhyBJucSXwplQWPbuXnSDYCL2Vgv/mzpmUw==
"@web3-react/walletconnect-connector@^6.0.0-beta.18":
version "6.0.0-beta.18"
resolved "https://registry.yarnpkg.com/@web3-react/walletconnect-connector/-/walletconnect-connector-6.0.0-beta.18.tgz#3757e4448ab5ceab9a8686833027fb1b7cf1dc4b"
integrity sha512-74zIc8zSV/fRSQ99s1SKukNZmLshhX8BrH/VIIRiDqezXvytmY9palOxhwBfC9Rp4MG8u9IU/Fo7TPO4WWydlw==
"@web3-react/walletconnect-connector@6.0.0-beta.19":
version "6.0.0-beta.19"
resolved "https://registry.yarnpkg.com/@web3-react/walletconnect-connector/-/walletconnect-connector-6.0.0-beta.19.tgz#135618cdd0c31222d7e27b9905bd9c9f23e35a38"
integrity sha512-uDNc6HuTcHRRXvrvMcwTcX2tg86SE6BhaTQ+aCsP+2qqmMxeEtBFKWrI2RTzeuuIb5fIwWCodT31t9hwmJR4/w==
dependencies:
"@walletconnect/web3-provider" "^1.0.0-beta.39"
"@web3-react/abstract-connector" "^6.0.0-beta.15"
"@web3-react/types" "^6.0.0-beta.15"
"@web3-react/abstract-connector" "^6.0.0-beta.19"
"@web3-react/types" "^6.0.0-beta.19"
tiny-invariant "^1.0.6"
"@web3-react/walletlink-connector@^6.0.0-beta.15":
version "6.0.0-beta.15"
resolved "https://registry.yarnpkg.com/@web3-react/walletlink-connector/-/walletlink-connector-6.0.0-beta.15.tgz#ad86279743527913d84a16787899a411f841dc7a"
integrity sha512-aYjuhiNHAu0WnyVEopxz+rLMYI8C7OXoU1O39zYN6JjLoJJTxI7QEWl7sSqWxHu1BxynWXTplC/vzf61DIiRGQ==
"@web3-react/walletlink-connector@6.0.0-beta.19":
version "6.0.0-beta.19"
resolved "https://registry.yarnpkg.com/@web3-react/walletlink-connector/-/walletlink-connector-6.0.0-beta.19.tgz#0982b374411d0c0cf6ef9eafa567bcefa91f9086"
integrity sha512-5w8ixZMFl5UYorsWIrPKJYJka1RcEosNTx6jDEnCfSFv71zN5ZDCE/WPJJrqbllQ3iw924hGcQqLatvalHJ6eg==
dependencies:
"@web3-react/abstract-connector" "^6.0.0-beta.15"
"@web3-react/types" "^6.0.0-beta.15"
"@web3-react/abstract-connector" "^6.0.0-beta.19"
"@web3-react/types" "^6.0.0-beta.19"
walletlink "^1.0.0"
"@webassemblyjs/ast@1.8.5":
......@@ -2566,6 +2652,14 @@ aws4@^1.8.0:
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f"
integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==
axios@^0.18.0:
version "0.18.1"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.18.1.tgz#ff3f0de2e7b5d180e757ad98000f1081b87bcea3"
integrity sha512-0BfJq4NSfQXd+SkFdrvFbG7addhYSBA2mQwISr46pD6E5iqkWg02RAs8vyTT/j0RTnoYmeXauBuSv1qKwR179g==
dependencies:
follow-redirects "1.5.10"
is-buffer "^2.0.2"
axobject-query@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-2.0.2.tgz#ea187abe5b9002b377f925d8bf7d1c561adf38f9"
......@@ -4725,6 +4819,13 @@ debug@3.2.6, debug@^3.0.0, debug@^3.1.1, debug@^3.2.5, debug@^3.2.6:
dependencies:
ms "^2.1.1"
debug@=3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==
dependencies:
ms "2.0.0"
debug@^4.0.1, debug@^4.1.0, debug@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
......@@ -5807,16 +5908,21 @@ ethashjs@~0.0.7:
ethereumjs-util "^4.0.1"
miller-rabin "^4.0.0"
ethereum-common@0.0.18, ethereum-common@^0.0.18:
version "0.0.18"
resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.0.18.tgz#2fdc3576f232903358976eb39da783213ff9523f"
integrity sha1-L9w1dvIykDNYl26znaeDIT/5Uj8=
ethereum-common@0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.1.0.tgz#874dd0fae5e962a56c50ebf28efa6fe39492b0e7"
integrity sha1-h03Q+uXpYqVsUOvyjvpv45SSsOc=
ethereum-common@0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.2.0.tgz#13bf966131cce1eeade62a1b434249bb4cb120ca"
integrity sha512-XOnAR/3rntJgbCdGhqdaLIxDLWKLmsZOGhHdBKadEr6gEnJLH52k93Ou+TUdFaPN3hJc3isBZBal3U/XZ15abA==
ethereum-common@^0.0.18:
version "0.0.18"
resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.0.18.tgz#2fdc3576f232903358976eb39da783213ff9523f"
integrity sha1-L9w1dvIykDNYl26znaeDIT/5Uj8=
ethereum-types@^2.1.6:
version "2.1.6"
resolved "https://registry.yarnpkg.com/ethereum-types/-/ethereum-types-2.1.6.tgz#57d9d515fad86ab987c0f6962c4203be37da8579"
......@@ -5888,6 +5994,17 @@ ethereumjs-block@^1.2.2, ethereumjs-block@^1.4.1, ethereumjs-block@^1.6.0:
ethereumjs-util "^5.0.0"
merkle-patricia-tree "^2.1.2"
ethereumjs-block@~1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/ethereumjs-block/-/ethereumjs-block-1.6.0.tgz#cded4962deaca1eef17372b4d290e84b35c84372"
integrity sha1-ze1JYt6soe7xc3K00pDoSzXIQ3I=
dependencies:
async "^2.0.1"
ethereum-common "0.0.18"
ethereumjs-tx "^1.2.2"
ethereumjs-util "^5.0.0"
merkle-patricia-tree "^2.1.2"
ethereumjs-block@~2.2.0:
version "2.2.1"
resolved "https://registry.yarnpkg.com/ethereumjs-block/-/ethereumjs-block-2.2.1.tgz#5fba423305b40ab6486a6b81922e5312b2667c8d"
......@@ -5936,20 +6053,7 @@ ethereumjs-tx@^2.1.1:
ethereumjs-common "^1.3.1"
ethereumjs-util "^6.0.0"
ethereumjs-util@6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.1.0.tgz#e9c51e5549e8ebd757a339cc00f5380507e799c8"
integrity sha512-URESKMFbDeJxnAxPppnk2fN6Y3BIatn9fwn76Lm8bQlt+s52TpG8dN9M66MLPuRAiAOIqL3dfwqWJf0sd0fL0Q==
dependencies:
bn.js "^4.11.0"
create-hash "^1.1.2"
ethjs-util "0.1.6"
keccak "^1.0.2"
rlp "^2.0.0"
safe-buffer "^5.1.1"
secp256k1 "^3.0.1"
ethereumjs-util@^4.0.1, ethereumjs-util@^4.3.0:
ethereumjs-util@4.5.0, ethereumjs-util@^4.0.1, ethereumjs-util@^4.3.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-4.5.0.tgz#3e9428b317eebda3d7260d854fddda954b1f1bc6"
integrity sha1-PpQosxfuvaPXJg2FT93alUsfG8Y=
......@@ -5960,7 +6064,7 @@ ethereumjs-util@^4.0.1, ethereumjs-util@^4.3.0:
rlp "^2.0.0"
secp256k1 "^3.0.1"
ethereumjs-util@^5.0.0, ethereumjs-util@^5.0.1, ethereumjs-util@^5.1.1, ethereumjs-util@^5.1.2, ethereumjs-util@^5.1.3, ethereumjs-util@^5.1.5:
ethereumjs-util@5.2.0, ethereumjs-util@^5.0.0, ethereumjs-util@^5.0.1, ethereumjs-util@^5.1.1, ethereumjs-util@^5.1.2, ethereumjs-util@^5.1.3, ethereumjs-util@^5.1.5:
version "5.2.0"
resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz#3e0c0d1741471acf1036052d048623dee54ad642"
integrity sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==
......@@ -5973,6 +6077,19 @@ ethereumjs-util@^5.0.0, ethereumjs-util@^5.0.1, ethereumjs-util@^5.1.1, ethereum
safe-buffer "^5.1.1"
secp256k1 "^3.0.1"
ethereumjs-util@6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.1.0.tgz#e9c51e5549e8ebd757a339cc00f5380507e799c8"
integrity sha512-URESKMFbDeJxnAxPppnk2fN6Y3BIatn9fwn76Lm8bQlt+s52TpG8dN9M66MLPuRAiAOIqL3dfwqWJf0sd0fL0Q==
dependencies:
bn.js "^4.11.0"
create-hash "^1.1.2"
ethjs-util "0.1.6"
keccak "^1.0.2"
rlp "^2.0.0"
safe-buffer "^5.1.1"
secp256k1 "^3.0.1"
ethereumjs-util@^6.0.0:
version "6.2.0"
resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.2.0.tgz#23ec79b2488a7d041242f01e25f24e5ad0357960"
......@@ -5999,6 +6116,22 @@ ethereumjs-util@~6.0.0:
safe-buffer "^5.1.1"
secp256k1 "^3.0.1"
ethereumjs-vm@2.2.2:
version "2.2.2"
resolved "https://registry.yarnpkg.com/ethereumjs-vm/-/ethereumjs-vm-2.2.2.tgz#786317d2c63e547d936c1a468607510e70b4c262"
integrity sha512-sAus9UxYjUnA42G91Q1/hR7ff35IJRpcLrUfbaIH7V4cl8qKsNs3wqf3dHvtj3wRqy12ke2Wd0tYdARyGKdD6g==
dependencies:
async "^2.1.2"
async-eventemitter "^0.2.2"
ethereum-common "0.1.0"
ethereumjs-account "^2.0.3"
ethereumjs-block "~1.6.0"
ethereumjs-util "4.5.0"
fake-merkle-patricia-tree "^1.0.1"
functional-red-black-tree "^1.0.1"
merkle-patricia-tree "^2.1.2"
safe-buffer "^5.1.1"
ethereumjs-vm@3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/ethereumjs-vm/-/ethereumjs-vm-3.0.0.tgz#70fea2964a6797724b0d93fe080f9984ad18fcdd"
......@@ -6566,6 +6699,13 @@ focus-lock@^0.6.3:
resolved "https://registry.yarnpkg.com/focus-lock/-/focus-lock-0.6.6.tgz#98119a755a38cfdbeda0280eaa77e307eee850c7"
integrity sha512-Dx69IXGCq1qsUExWuG+5wkiMqVM/zGx/reXSJSLogECwp3x6KeNQZ+NAetgxEFpnC41rD8U3+jRCW68+LNzdtw==
follow-redirects@1.5.10:
version "1.5.10"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a"
integrity sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==
dependencies:
debug "=3.1.0"
follow-redirects@^1.0.0:
version "1.9.0"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.9.0.tgz#8d5bcdc65b7108fe1508649c79c12d732dcedb4f"
......@@ -6632,6 +6772,13 @@ form-data@~2.3.2:
combined-stream "^1.0.6"
mime-types "^2.1.12"
fortmatic@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fortmatic/-/fortmatic-1.0.0.tgz#44d557168ea0afcd80777fb0b2a84a6ce06cea37"
integrity sha512-EQB50lszlh+9nLmNNHoNWHaoclVn631RBZeG15bir65BNvqWjFaRtVPsV3eBTqTjEhoYzZit5quXHhqawvTd3Q==
dependencies:
"@babel/runtime" "7.3.4"
forwarded@~0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84"
......@@ -7792,6 +7939,11 @@ is-buffer@^1.0.2, is-buffer@^1.1.5:
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==
is-buffer@^2.0.2:
version "2.0.4"
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.4.tgz#3e572f23c8411a5cfd9557c849e3665e0b290623"
integrity sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==
is-callable@^1.1.3, is-callable@^1.1.4:
version "1.1.4"
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75"
......@@ -10640,6 +10792,11 @@ pend@~1.2.0:
resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50"
integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA=
penpal@3.0.7:
version "3.0.7"
resolved "https://registry.yarnpkg.com/penpal/-/penpal-3.0.7.tgz#d252711ed93b30f1d867eb82342785b3a95f5f75"
integrity sha512-WSXiq5HnEvzvY05SHhaXcsviUmCvh4Ze8AiIZzvmdzaaYAAx4rx8c6Xq6+MaVDG/Nfve3VmGD8HyRP3CkPvPbQ==
performance-now@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
......@@ -10719,6 +10876,13 @@ pnp-webpack-plugin@1.5.0:
dependencies:
ts-pnp "^1.1.2"
pocket-js-core@0.0.3:
version "0.0.3"
resolved "https://registry.yarnpkg.com/pocket-js-core/-/pocket-js-core-0.0.3.tgz#1ab278b9a6a5775e2bdc3c2c2e218057774061e4"
integrity sha512-OUTEvEVutdjLT6YyldvAlSebpBueUUWg2XKxGNt5u3QqrmLpBOOBmdDnGMNJ+lEwXtko+JqgwFq+HTi4g1QDVg==
dependencies:
axios "^0.18.0"
polished@^3.3.2:
version "3.4.2"
resolved "https://registry.yarnpkg.com/polished/-/polished-3.4.2.tgz#b4780dad81d64df55615fbfc77acb52fd17d88cd"
......@@ -12191,6 +12355,11 @@ regenerator-runtime@^0.11.0:
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9"
integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==
regenerator-runtime@^0.12.0:
version "0.12.1"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz#fa1a71544764c036f8c49b13a08b2594c9f8a0de"
integrity sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==
regenerator-transform@^0.10.0:
version "0.10.1"
resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd"
......
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