ConnectButton cleanup
This commit is contained in:
parent
c2e70136ba
commit
36817ba9a3
|
@ -1,6 +1,5 @@
|
||||||
// @flow
|
// @flow
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { connect } from 'react-redux'
|
|
||||||
import Web3Connect from 'web3connect'
|
import Web3Connect from 'web3connect'
|
||||||
// import Torus from '@toruslabs/torus-embed'
|
// import Torus from '@toruslabs/torus-embed'
|
||||||
import WalletConnectProvider from '@walletconnect/web3-provider'
|
import WalletConnectProvider from '@walletconnect/web3-provider'
|
||||||
|
@ -54,15 +53,11 @@ web3Connect.on('connect', (provider: any) => {
|
||||||
})
|
})
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
registerProvider: Function,
|
|
||||||
enqueueSnackbar: Function,
|
enqueueSnackbar: Function,
|
||||||
closeSnackbar: Function,
|
closeSnackbar: Function,
|
||||||
}
|
}
|
||||||
|
|
||||||
const ConnectButton = ({
|
const ConnectButton = (props: Props) => (
|
||||||
registerProvider, ...props
|
|
||||||
}: Props) => (
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
color="primary"
|
color="primary"
|
||||||
variant="contained"
|
variant="contained"
|
||||||
|
@ -76,7 +71,4 @@ const ConnectButton = ({
|
||||||
</Button>
|
</Button>
|
||||||
)
|
)
|
||||||
|
|
||||||
export default connect(
|
export default ConnectButton
|
||||||
null,
|
|
||||||
{ registerProvider: fetchProvider },
|
|
||||||
)(ConnectButton)
|
|
||||||
|
|
Loading…
Reference in New Issue