From d2098e26acc5306094be87d4bc6d5a75d66d4c95 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=9CGoktug?= <“goktug.poyraz@consensys.net”>
Date: Fri, 10 Mar 2023 13:22:51 +0100
Subject: [PATCH 1/9] fix: fix theme issues of desktop pairing page
---
shared/lib/error-utils.js | 4 +-
.../desktop-pairing.test.js.snap | 246 +++++++++---------
.../desktop-pairing.component.js | 132 +++++-----
ui/pages/desktop-pairing/index.scss | 107 +-------
4 files changed, 204 insertions(+), 285 deletions(-)
diff --git a/shared/lib/error-utils.js b/shared/lib/error-utils.js
index d5f5feb3fcd0..b04a2f72a38e 100644
--- a/shared/lib/error-utils.js
+++ b/shared/lib/error-utils.js
@@ -126,7 +126,9 @@ function disableDesktop(backgroundConnection) {
}
export function downloadDesktopApp() {
- global.platform.openTab({ url: 'https://metamask.io/' });
+ global.platform.openTab({
+ url: 'https://github.com/MetaMask/metamask-desktop/releases',
+ });
}
export function downloadExtension() {
diff --git a/ui/pages/desktop-pairing/__snapshots__/desktop-pairing.test.js.snap b/ui/pages/desktop-pairing/__snapshots__/desktop-pairing.test.js.snap
index dcead5fb5d1b..c3a42d0353ed 100644
--- a/ui/pages/desktop-pairing/__snapshots__/desktop-pairing.test.js.snap
+++ b/ui/pages/desktop-pairing/__snapshots__/desktop-pairing.test.js.snap
@@ -3,139 +3,134 @@
exports[`Desktop Pairing page should render otp component 1`] = `
-
-
-
-
-
-
- Pair with Desktop
-
-
- Open your MetaMask Desktop and type this code
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Pair with Desktop
+
+
+ Open your MetaMask Desktop and type this code
+
+
@@ -149,15 +144,16 @@ exports[`Desktop Pairing page should render otp component 1`] = `
-
- If the pairing is successful, extension will restart and you'll have to re-enter your password.
-
+
+ If the pairing is successful, extension will restart and you'll have to re-enter your password.
+
@@ -153,12 +153,10 @@ exports[`Desktop Pairing page should render otp component 1`] = `
diff --git a/ui/pages/desktop-pairing/desktop-pairing.component.js b/ui/pages/desktop-pairing/desktop-pairing.component.js
index 098976b66a71..c529aa2619b1 100644
--- a/ui/pages/desktop-pairing/desktop-pairing.component.js
+++ b/ui/pages/desktop-pairing/desktop-pairing.component.js
@@ -1,7 +1,6 @@
import React, { useState, useEffect, useRef, useContext } from 'react';
import { useHistory } from 'react-router-dom';
import PropTypes from 'prop-types';
-import Button from '../../components/ui/button';
import { SECOND } from '../../../shared/constants/time';
import { I18nContext } from '../../contexts/i18n';
import IconDesktopPairing from '../../components/ui/icon/icon-desktop-pairing';
@@ -10,13 +9,14 @@ import {
TextVariant,
DISPLAY,
AlignItems,
- BLOCK_SIZES,
JustifyContent,
+ BackgroundColor,
+ BorderRadius,
} from '../../helpers/constants/design-system';
import Box from '../../components/ui/box/box';
import { useCopyToClipboard } from '../../hooks/useCopyToClipboard';
import Tooltip from '../../components/ui/tooltip';
-import { Text } from '../../components/component-library';
+import { Text, Button } from '../../components/component-library';
export default function DesktopPairingPage({
generateDesktopOtp,
@@ -104,11 +104,7 @@ export default function DesktopPairingPage({
{t('desktopPageTitle')}
-
+
{t('desktopPageSubTitle')}
-
+
{otp}
@@ -137,9 +137,12 @@ export default function DesktopPairingPage({
marginBottom={6}
>
{t('desktopPairingExpireMessage', [
{
return (
-
+
Pair with Desktop
Open your MetaMask Desktop and type this code
@@ -119,7 +119,7 @@ exports[`Desktop Pairing page should render otp component 1`] = `
>
123456
@@ -130,7 +130,7 @@ exports[`Desktop Pairing page should render otp component 1`] = `
>
@@ -147,7 +147,7 @@ exports[`Desktop Pairing page should render otp component 1`] = `
If the pairing is successful, extension will restart and you'll have to re-enter your password.
@@ -156,7 +156,7 @@ exports[`Desktop Pairing page should render otp component 1`] = `
class="box box--flex-direction-row"
>