1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

hide wallet selection in non-Web3 browsers

This commit is contained in:
Matthias Kretschmann 2019-07-11 14:54:43 +02:00
parent b4db8a6556
commit 4f051deefa
Signed by: m
GPG Key ID: 606EEEF3C479A91F
3 changed files with 7 additions and 3 deletions

View File

@ -23,7 +23,7 @@ export default class Account extends PureComponent<
} }
public render() { public render() {
const { account, isBurner, loginMetamask } = this.context const { account, isBurner, loginMetamask, isWeb3Capable } = this.context
const { isAccountInfoOpen } = this.state const { isAccountInfoOpen } = this.state
const seedphrase = localStorage.getItem('seedphrase') as string const seedphrase = localStorage.getItem('seedphrase') as string
const blockies = account && toDataUrl(account) const blockies = account && toDataUrl(account)
@ -72,7 +72,7 @@ export default class Account extends PureComponent<
) : ( ) : (
'MetaMask' 'MetaMask'
)} )}
<WalletSelector /> {isWeb3Capable && <WalletSelector />}
</div> </div>
{isBurner && isAccountInfoOpen && ( {isBurner && isAccountInfoOpen && (

View File

@ -40,12 +40,15 @@ $popoverWidth: 18rem;
border-bottom: 0; border-bottom: 0;
} }
/* stylelint-disable */
button { button {
svg, svg,
&:last-child { &[data-action] {
display: none; display: none;
} }
} }
/* stylelint-enable */
} }
.balance { .balance {

View File

@ -81,6 +81,7 @@ export default class WalletSelector extends PureComponent<
link link
className={styles.openLink} className={styles.openLink}
onClick={this.toggleModal} onClick={this.toggleModal}
data-action="wallet"
> >
{content.title} {content.title}
</Button> </Button>