From a4e7cff36ef6296fd5e11f6fb60a83d1154fe48a Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Fri, 3 Jul 2020 13:03:47 -0300 Subject: [PATCH] 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. --- .../confirm-add-suggested-token.component.js | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js b/ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js index f6c47f8946ef..cf4594024aeb 100644 --- a/ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js +++ b/ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js @@ -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())