MetaMask / MetaMask/test-dapp

MetaMaskOnboarding

Open
#110 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
642
Forks
369
PR merge metrics
No merged PRs in 30d

Description

At line 184 `isMetamaskInstalled()` will return `undefined` so turning it into a false positive will go for Onboarding

```
const updateButtons = () => {
const accountButtonsDisabled = !isMetaMaskInstalled() || !isMetaMaskConnected()
if (accountButtonsDisabled) {
for (const button of accountButtons) {
button.disabled = true
}
clearTextDisplays()
} else {
deployButton.disabled = false
sendButton.disabled = false
createToken.disabled = false
personalSign.disabled = false
signTypedData.disabled = false
getEncryptionKeyButton.disabled = false
ethSign.disabled = false
personalSign.disabled = false
signTypedData.disabled = false
signTypedDataV3.disabled = false
signTypedDataV4.disabled = false
}

if (!isMetaMaskInstalled()) {
addEthereumChain.disabled = true
onboardButton.innerText = 'Click here to install MetaMask!'
onboardButton.onclick = onClickInstall
onboardButton.disabled = false
} else if (isMetaMaskConnected()) {
addEthereumChain.disabled = false
onboardButton.innerText = 'Connected'
onboardButton.disabled = true
if (onboarding) {
onboarding.stopOnboarding()
}
} else {
addEthereumChain.disabled = true
onboardButton.innerText = 'Connect'
onboardButton.onclick = onClickConnect
onboardButton.disabled = false
}
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at line 184 and inspect isMetaMaskInstalled() together with updateButtons and its onboarding branches. Verify the undefined result follows the intended not-installed path, showing the install prompt rather than the connected state, and confirm the account buttons remain disabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.