1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Prevent confirming blank suggested token (#8909)

The "confirm suggested token" page allowed the confirm button to be
pressed even when there were no tokens to confirm. This can happen
sometimes when the page is in the process of redirecting.
This commit is contained in:
Mark Stacey 2020-07-03 13:03:47 -03:00 committed by GitHub
parent 4a989c339a
commit a4e7cff36e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -122,6 +122,7 @@ export default class ConfirmAddSuggestedToken extends Component {
type="secondary"
large
className="page-container__footer-button"
disabled={pendingTokens.length === 0}
onClick={() => {
addToken(pendingToken)
.then(() => removeSuggestedTokens())