From bde7454a6d5c85a7825cbcb5e608f624fe9e9a8e Mon Sep 17 00:00:00 2001 From: Jungho Bang Date: Mon, 6 Nov 2023 13:06:24 -0500 Subject: [PATCH] Deprecating wallet picker (#1039) * remove coinbase retail option * Revert "remove coinbase retail option" This reverts commit a8c5453a3b7ccb13dfeea0ef29ca7afa4a2672dd. * Revert "Revert "remove coinbase retail option"" This reverts commit 5b593da3c740ad5b8d65054403f1a73cd2617e36. * update icons * revert appSrc stuff * cleanup --- .../ConnectContent/ConnectContent.scss | 22 +--- .../ConnectContent/ConnectContent.tsx | 118 +++--------------- .../src/components/Snackbar/Snackbar.test.tsx | 1 - .../src/components/Snackbar/Snackbar.tsx | 15 +-- .../src/components/icons/QRCodeIcon.tsx | 15 +-- .../src/components/icons/QRLogoCoinbase.tsx | 9 -- .../src/components/icons/StatusDotIcon.tsx | 13 -- .../src/components/icons/coinbase-round.svg | 4 - .../src/components/icons/coinbase.svg | 20 --- .../wallet-sdk/src/provider/MobileRelayUI.ts | 2 - .../src/provider/WalletLinkRelayUI.test.ts | 2 - .../src/provider/WalletLinkRelayUI.ts | 8 -- .../wallet-sdk/src/provider/WalletUI.ts | 5 - .../wallet-sdk/src/relay/MobileRelay.ts | 4 +- .../wallet-sdk/src/relay/WalletLinkRelay.ts | 14 --- 15 files changed, 29 insertions(+), 223 deletions(-) delete mode 100644 asdf/packages/wallet-sdk/src/components/icons/QRLogoCoinbase.tsx delete mode 100644 asdf/packages/wallet-sdk/src/components/icons/StatusDotIcon.tsx delete mode 100644 asdf/packages/wallet-sdk/src/components/icons/coinbase-round.svg delete mode 100644 asdf/packages/wallet-sdk/src/components/icons/coinbase.svg diff --git a/asdf/packages/wallet-sdk/src/components/ConnectContent/ConnectContent.scss b/asdf/packages/wallet-sdk/src/components/ConnectContent/ConnectContent.scss index bda2a7b66c..589549cef2 100644 --- a/asdf/packages/wallet-sdk/src/components/ConnectContent/ConnectContent.scss +++ b/asdf/packages/wallet-sdk/src/components/ConnectContent/ConnectContent.scss @@ -199,27 +199,17 @@ cursor: pointer; &.light { - color: $black; - - &.selected { - background: $primary-wash; - color: $primary; - } + background: $primary-wash; + color: $primary; } &.dark { - color: $white; - - &.selected { - background: $primary-wash-dark; - color: $primary-dark; - } + background: $primary-wash-dark; + color: $primary-dark; } - &.selected { - border-radius: 100px; - font-weight: 600; - } + border-radius: 100px; + font-weight: 600; &-copy-wrapper { margin: 0 4px 0 8px; diff --git a/asdf/packages/wallet-sdk/src/components/ConnectContent/ConnectContent.tsx b/asdf/packages/wallet-sdk/src/components/ConnectContent/ConnectContent.tsx index f4ae322e3f..4f4e6cfd94 100644 --- a/asdf/packages/wallet-sdk/src/components/ConnectContent/ConnectContent.tsx +++ b/asdf/packages/wallet-sdk/src/components/ConnectContent/ConnectContent.tsx @@ -3,17 +3,13 @@ import clsx from 'clsx'; import { h } from 'preact'; -import { useCallback, useState } from 'preact/hooks'; import { createQrUrl } from '../../util'; import { LIB_VERSION } from '../../version'; import { CloseIcon } from '../icons/CloseIcon'; -import coinbaseRound from '../icons/coinbase-round-svg'; import coinbaseWalletRound from '../icons/coinbase-wallet-round-svg'; import { QRCodeIcon } from '../icons/QRCodeIcon'; -import coinbaseLogo from '../icons/QRLogoCoinbase'; import walletLogo from '../icons/QRLogoWallet'; -import { StatusDotIcon } from '../icons/StatusDotIcon'; import { QRCode } from '../QRCode'; import { Spinner } from '../Spinner/Spinner'; import { Theme } from '../types'; @@ -31,31 +27,11 @@ type ConnectContentProps = { onCancel: (() => void) | null; }; -const wallets = { - 'coinbase-wallet-app': { - title: 'Coinbase Wallet app', - description: 'Connect with your self-custody wallet', - icon: coinbaseWalletRound, - steps: CoinbaseWalletSteps, - }, - 'coinbase-app': { - title: 'Coinbase app', - description: 'Connect with your Coinbase account', - icon: coinbaseRound, - steps: CoinbaseAppSteps, - }, -}; - -type WalletType = keyof typeof wallets; - -const makeQrCodeImage = (app: string) => { - switch (app) { - case 'coinbase-app': - return coinbaseLogo; - case 'coinbase-wallet-app': - default: - return walletLogo; - } +const wallet = { + title: 'Coinbase Wallet app', + description: 'Connect with your self-custody wallet', + icon: coinbaseWalletRound, + steps: CoinbaseWalletSteps, }; const makeIconColor = (theme: Theme) => { @@ -64,11 +40,6 @@ const makeIconColor = (theme: Theme) => { export function ConnectContent(props: ConnectContentProps) { const { theme } = props; - const [selected, setSelected] = useState('coinbase-wallet-app'); - - const handleSelect = useCallback((id: WalletType) => { - setSelected(id); - }, []); const qrUrl = createQrUrl( props.sessionId, @@ -79,19 +50,14 @@ export function ConnectContent(props: ConnectContentProps) { props.chainId ); - const wallet = wallets[selected]; - if (!selected) { - return null; - } const WalletSteps = wallet.steps; - const coinbaseApp = selected === 'coinbase-app'; return (

- Scan to connect with one of our mobile apps + Scan to connect with our mobile app

{props.onCancel && (
-
- {Object.entries(wallets).map(([key, value]) => { - return ( - handleSelect(key as WalletType)} - theme={theme} - /> - ); - })} -
- {coinbaseApp && ( -
- Don’t see a Scan option? Update your Coinbase app to the latest - version and try again. -
- )} +
@@ -132,7 +83,7 @@ export function ConnectContent(props: ConnectContentProps) { fgColor="#000" bgColor="transparent" image={{ - svg: makeQrCodeImage(selected), + svg: walletLogo, width: 25, height: 25, }} @@ -160,21 +111,12 @@ type ConnectItemProps = { title: string; description: string; icon: string; - selected: boolean; - onClick(): void; theme: Theme; }; -export function ConnectItem({ - title, - description, - icon, - selected, - theme, - onClick, -}: ConnectItemProps) { +export function ConnectItem({ title, description, icon, theme }: ConnectItemProps) { return ( -
+
{title}
@@ -211,33 +153,3 @@ export function CoinbaseWalletSteps({ theme }: WalletStepsProps) { ); } - -export function CoinbaseAppSteps({ theme }: WalletStepsProps) { - return ( -
    -
  1. -
    Open Coinbase app
    -
  2. -
  3. -
    - - Tap More - - - - - - then Scan - - - - -
    -
  4. -
- ); -} diff --git a/asdf/packages/wallet-sdk/src/components/Snackbar/Snackbar.test.tsx b/asdf/packages/wallet-sdk/src/components/Snackbar/Snackbar.test.tsx index 9fd862a651..c399759201 100644 --- a/asdf/packages/wallet-sdk/src/components/Snackbar/Snackbar.test.tsx +++ b/asdf/packages/wallet-sdk/src/components/Snackbar/Snackbar.test.tsx @@ -26,7 +26,6 @@ describe('Snackbar', () => { test('@presentItem', async () => { snackbar.presentItem({ message: 'Confirm on phone', - appSrc: 'coinbase-wallet', menuItems: [ { isRed: true, diff --git a/asdf/packages/wallet-sdk/src/components/Snackbar/Snackbar.tsx b/asdf/packages/wallet-sdk/src/components/Snackbar/Snackbar.tsx index 3a56d10d8c..b23bf9fc6a 100644 --- a/asdf/packages/wallet-sdk/src/components/Snackbar/Snackbar.tsx +++ b/asdf/packages/wallet-sdk/src/components/Snackbar/Snackbar.tsx @@ -7,18 +7,9 @@ import { useEffect, useState } from 'preact/hooks'; import css from './Snackbar-css'; +const cblogo = `data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjEx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S40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+`; - } -} - export interface SnackbarOptions { darkMode: boolean; } @@ -27,7 +18,6 @@ export interface SnackbarInstanceProps { message?: string; menuItems?: SnackbarMenuItem[]; autoExpand?: boolean; - appSrc?: string | null; } export interface SnackbarMenuItem { @@ -107,7 +97,6 @@ export const SnackbarInstance: FunctionComponent = ({ autoExpand, message, menuItems, - appSrc, }) => { const [hidden, setHidden] = useState(true); const [expanded, setExpanded] = useState(autoExpand ?? false); @@ -140,7 +129,7 @@ export const SnackbarInstance: FunctionComponent = ({ )} >
- + {' '}
{message}
{!expanded && ( diff --git a/asdf/packages/wallet-sdk/src/components/icons/QRCodeIcon.tsx b/asdf/packages/wallet-sdk/src/components/icons/QRCodeIcon.tsx index 8952d18a53..4c672ad3d0 100644 --- a/asdf/packages/wallet-sdk/src/components/icons/QRCodeIcon.tsx +++ b/asdf/packages/wallet-sdk/src/components/icons/QRCodeIcon.tsx @@ -2,16 +2,11 @@ import { h } from 'preact'; export function QRCodeIcon(props: h.JSX.SVGAttributes) { return ( - - - - - - - - - - + + + + + ); } diff --git a/asdf/packages/wallet-sdk/src/components/icons/QRLogoCoinbase.tsx b/asdf/packages/wallet-sdk/src/components/icons/QRLogoCoinbase.tsx deleted file mode 100644 index 2cb556ee8d..0000000000 --- a/asdf/packages/wallet-sdk/src/components/icons/QRLogoCoinbase.tsx +++ /dev/null @@ -1,9 +0,0 @@ -const svg = ` - - - - - -`; - -export default svg; diff --git a/asdf/packages/wallet-sdk/src/components/icons/StatusDotIcon.tsx b/asdf/packages/wallet-sdk/src/components/icons/StatusDotIcon.tsx deleted file mode 100644 index db4c0bfa64..0000000000 --- a/asdf/packages/wallet-sdk/src/components/icons/StatusDotIcon.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { h } from 'preact'; - -export function StatusDotIcon(props: h.JSX.SVGAttributes) { - return ( - - - - ); -} diff --git a/asdf/packages/wallet-sdk/src/components/icons/coinbase-round.svg b/asdf/packages/wallet-sdk/src/components/icons/coinbase-round.svg deleted file mode 100644 index e877142519..0000000000 --- a/asdf/packages/wallet-sdk/src/components/icons/coinbase-round.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/asdf/packages/wallet-sdk/src/components/icons/coinbase.svg b/asdf/packages/wallet-sdk/src/components/icons/coinbase.svg deleted file mode 100644 index 562f1d43a4..0000000000 --- a/asdf/packages/wallet-sdk/src/components/icons/coinbase.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - diff --git a/asdf/packages/wallet-sdk/src/provider/MobileRelayUI.ts b/asdf/packages/wallet-sdk/src/provider/MobileRelayUI.ts index 2d257f02b2..148bb6d479 100644 --- a/asdf/packages/wallet-sdk/src/provider/MobileRelayUI.ts +++ b/asdf/packages/wallet-sdk/src/provider/MobileRelayUI.ts @@ -155,8 +155,6 @@ export class MobileRelayUI implements WalletUI { setStandalone?(_status: boolean) {} // no-op - setAppSrc(_src: string) {} // no-op - setConnectDisabled(_: boolean) {} // no-op inlineAccountsResponse(): boolean { diff --git a/asdf/packages/wallet-sdk/src/provider/WalletLinkRelayUI.test.ts b/asdf/packages/wallet-sdk/src/provider/WalletLinkRelayUI.test.ts index 59ac5c982e..d9f9f16da7 100644 --- a/asdf/packages/wallet-sdk/src/provider/WalletLinkRelayUI.test.ts +++ b/asdf/packages/wallet-sdk/src/provider/WalletLinkRelayUI.test.ts @@ -41,7 +41,6 @@ describe('WalletLinkRelayUI', () => { expect(snackbarMock).toHaveBeenCalledWith({ message: 'Confirm on phone', - appSrc: null, menuItems: [ { isRed: true, @@ -81,7 +80,6 @@ describe('WalletLinkRelayUI', () => { expect(snackbarMock).toHaveBeenCalledWith({ autoExpand: true, message: 'Connection lost', - appSrc: null, menuItems: [ { isRed: false, diff --git a/asdf/packages/wallet-sdk/src/provider/WalletLinkRelayUI.ts b/asdf/packages/wallet-sdk/src/provider/WalletLinkRelayUI.ts index 4d3903e64d..0570a03372 100644 --- a/asdf/packages/wallet-sdk/src/provider/WalletLinkRelayUI.ts +++ b/asdf/packages/wallet-sdk/src/provider/WalletLinkRelayUI.ts @@ -21,7 +21,6 @@ export class WalletLinkRelayUI implements WalletUI { private readonly snackbar: Snackbar; private standalone: boolean | null = null; private attached = false; - private appSrc: string | null = null; constructor(options: Readonly) { this.snackbar = new Snackbar({ @@ -160,7 +159,6 @@ export class WalletLinkRelayUI implements WalletUI { snackbarProps = { autoExpand: true, message: 'Connection lost', - appSrc: this.appSrc, menuItems: [ { isRed: false, @@ -177,7 +175,6 @@ export class WalletLinkRelayUI implements WalletUI { } else { snackbarProps = { message: 'Confirm on phone', - appSrc: this.appSrc, menuItems: [ { isRed: true, @@ -206,11 +203,6 @@ export class WalletLinkRelayUI implements WalletUI { return this.snackbar.presentItem(snackbarProps); } - /* istanbul ignore next */ - setAppSrc(appSrc: string): void { - this.appSrc = appSrc; - } - /* istanbul ignore next */ reloadUI(): void { document.location.reload(); diff --git a/asdf/packages/wallet-sdk/src/provider/WalletUI.ts b/asdf/packages/wallet-sdk/src/provider/WalletUI.ts index 0efeff3ab0..1210ed03fa 100644 --- a/asdf/packages/wallet-sdk/src/provider/WalletUI.ts +++ b/asdf/packages/wallet-sdk/src/provider/WalletUI.ts @@ -154,11 +154,6 @@ export interface WalletUI { */ isStandalone(): boolean; - /** - * Set the UI's app src for different apps - */ - setAppSrc(src: string): void; - /** * We want to disable showing the qr code for in-page connection if the dapp hasn't provided a json rpc url */ diff --git a/asdf/packages/wallet-sdk/src/relay/MobileRelay.ts b/asdf/packages/wallet-sdk/src/relay/MobileRelay.ts index 5d1880c0d7..aa2ab17136 100644 --- a/asdf/packages/wallet-sdk/src/relay/MobileRelay.ts +++ b/asdf/packages/wallet-sdk/src/relay/MobileRelay.ts @@ -25,9 +25,7 @@ export class MobileRelay extends WalletLinkRelay { return { promise: new Promise(() => { const location = getLocation(); - location.href = `https://www.coinbase.com/connect-dapp?uri=${encodeURIComponent( - location.href - )}`; + location.href = `https://go.cb-w.com/dapp?cb_url=${encodeURIComponent(location.href)}`; }), cancel: () => {}, }; diff --git a/asdf/packages/wallet-sdk/src/relay/WalletLinkRelay.ts b/asdf/packages/wallet-sdk/src/relay/WalletLinkRelay.ts index ce31104b1f..1231bdda73 100644 --- a/asdf/packages/wallet-sdk/src/relay/WalletLinkRelay.ts +++ b/asdf/packages/wallet-sdk/src/relay/WalletLinkRelay.ts @@ -281,20 +281,6 @@ export class WalletLinkRelay extends WalletSDKRelayAbstract { }); }); } - - if (c.metadata.AppSrc !== undefined) { - aes256gcm - .decrypt(c.metadata.AppSrc!, session.secret) - .then((appSrc) => { - this.ui.setAppSrc(appSrc); - }) - .catch(() => { - this.diagnostic?.log(EVENTS.GENERAL_ERROR, { - message: 'Had error decrypting', - value: 'appSrc', - }); - }); - } }); const ui = this.options.uiConstructor({