From 47fe542273587cefdc3deefa60351849d5483c1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albert=20Oliv=C3=A9?= Date: Thu, 13 Jul 2023 18:27:49 +0200 Subject: [PATCH] [MMI] Review interactive replacement token flow (#19974) * Sending showCustodyConfirmLink as a prop and fixing other issues * Upgraded MMI extension monrepo and trying to fix the issue * prevents deeplink from closing * Fixed styles of Custody view and changed the place of it * Fixed CI issues * fixing eslint issues * Update LavaMoat policies * fixing tests * Fixed test * updated snapshots * Improving IRT flow * Fixing everything * Finish fixing all issues * Fixed institutional entity done page styles * Fixing boxes * Fixed issue with checkbox * Fixed tests and styles * Removed duplicated lodash * updated snapshot * Fixing tests * Removed unused test * Fixed snapshot * Fixed snapshot --------- Co-authored-by: Antonio Regadas Co-authored-by: MetaMask Bot --- app/scripts/metamask-controller.js | 4 + .../confirm-remove-jwt-modal.test.js.snap | 136 ++++---- .../__snapshots__/custody-labels.test.js.snap | 2 +- .../custody-labels/custody-labels.js | 8 +- .../institutional/custody-labels/index.scss | 2 +- .../interactive-replacement-token-modal.js | 172 +++++----- ...nteractive-replacement-token-modal.test.js | 19 -- ...eractive-replacement-token-notification.js | 44 ++- ...ive-replacement-token-notification.test.js | 14 +- .../confirm-add-custodian-token.js | 12 +- .../__snapshots__/account-list.test.js.snap | 310 +++++++++--------- .../connect-custody/account-list.js | 111 +++---- ui/pages/institutional/custody/custody.js | 81 +++-- ui/pages/institutional/custody/index.scss | 10 - .../institutional-entity-done-page.js | 47 +-- ...active-replacement-token-page.test.js.snap | 80 ++--- .../interactive-replacement-token-page.js | 234 +++++++------ ...interactive-replacement-token-page.test.js | 4 - ui/pages/pages.scss | 1 - .../institutional/institution-background.ts | 34 +- 20 files changed, 651 insertions(+), 674 deletions(-) delete mode 100644 ui/pages/institutional/custody/index.scss diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 17b8d98dd..eaeb27816 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -2499,6 +2499,10 @@ export default class MetamaskController extends EventEmitter { this.institutionalFeaturesController.removeAddTokenConnectRequest.bind( this.institutionalFeaturesController, ), + showInteractiveReplacementTokenBanner: + appStateController.showInteractiveReplacementTokenBanner.bind( + appStateController, + ), ///: END:ONLY_INCLUDE_IN ///: BEGIN:ONLY_INCLUDE_IN(snaps) diff --git a/ui/components/institutional/confirm-remove-jwt-modal/__snapshots__/confirm-remove-jwt-modal.test.js.snap b/ui/components/institutional/confirm-remove-jwt-modal/__snapshots__/confirm-remove-jwt-modal.test.js.snap index 2c33d3bea..ccca0a8eb 100644 --- a/ui/components/institutional/confirm-remove-jwt-modal/__snapshots__/confirm-remove-jwt-modal.test.js.snap +++ b/ui/components/institutional/confirm-remove-jwt-modal/__snapshots__/confirm-remove-jwt-modal.test.js.snap @@ -44,83 +44,87 @@ exports[`Confirm Remove JWT should render correctly 1`] = ` class="box confirm-action-jwt__accounts-list box--flex-direction-row" >