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:
parent
4a989c339a
commit
a4e7cff36e
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user