1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-11-14 09:14:52 +01:00

use logout

This commit is contained in:
Matthias Kretschmann 2020-07-14 16:41:54 +02:00
parent 9680468943
commit 3e0473e8f7
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -6,7 +6,7 @@ import Web3Feedback from './Feedback'
import { formatNumber } from '../../../utils'
export default function Details({ attrs }: { attrs: any }): ReactElement {
const { balance, web3Modal } = useOcean()
const { balance, web3Modal, logout } = useOcean()
const ethBalanceText = 'hello test'
// || formatNumber(Number(balance.eth))
const oceanBalanceText = 'hello test'
@ -25,7 +25,10 @@ export default function Details({ attrs }: { attrs: any }): ReactElement {
<Button
style="text"
size="small"
onClick={() => web3Modal.toggleModal()}
onClick={async () => {
logout()
await web3Modal.toggleModal()
}}
>
Switch Wallet
</Button>