From 4da574560d50f661227ec4d91acf20917c26b17b Mon Sep 17 00:00:00 2001
From: fragosti <francesco.agosti93@gmail.com>
Date: Thu, 15 Nov 2018 12:40:28 -0800
Subject: fix: remove redundant handler

---
 packages/instant/src/components/payment_method.tsx | 22 +---------------------
 1 file changed, 1 insertion(+), 21 deletions(-)

(limited to 'packages/instant/src/components/payment_method.tsx')

diff --git a/packages/instant/src/components/payment_method.tsx b/packages/instant/src/components/payment_method.tsx
index 21bb2902b..66ebe1f20 100644
--- a/packages/instant/src/components/payment_method.tsx
+++ b/packages/instant/src/components/payment_method.tsx
@@ -102,7 +102,7 @@ export class PaymentMethod extends React.Component<PaymentMethodProps> {
                 );
             case AccountState.None:
                 return (
-                    <WalletPrompt onClick={this._handleInstallWalletClick} image={logo} {...colors}>
+                    <WalletPrompt onClick={this.props.onInstallWalletClick} image={logo} {...colors}>
                         {isMobile ? 'Install Coinbase Wallet' : 'Install MetaMask'}
                     </WalletPrompt>
                 );
@@ -116,24 +116,4 @@ export class PaymentMethod extends React.Component<PaymentMethodProps> {
                 );
         }
     };
-    private readonly _handleInstallWalletClick = (): void => {
-        const isMobile = envUtil.isMobileOperatingSystem();
-        if (!isMobile) {
-            this.props.onInstallWalletClick();
-            return;
-        }
-        const operatingSystem = envUtil.getOperatingSystem();
-        let url = COINBASE_WALLET_SITE_URL;
-        switch (operatingSystem) {
-            case OperatingSystem.Android:
-                url = COINBASE_WALLET_ANDROID_APP_STORE_URL;
-                break;
-            case OperatingSystem.iOS:
-                url = COINBASE_WALLET_IOS_APP_STORE_URL;
-                break;
-            default:
-                break;
-        }
-        window.open(url, '_blank');
-    };
 }
-- 
cgit v1.2.3

