aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/components
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-11-16 04:40:28 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-11-16 04:41:49 +0800
commit4da574560d50f661227ec4d91acf20917c26b17b (patch)
treeb4d17a68db63cc788b4980848be99d9a42acd5b0 /packages/instant/src/components
parentf9e012398606a85d286087f3e94bf8b95a52df55 (diff)
downloaddexon-sol-tools-4da574560d50f661227ec4d91acf20917c26b17b.tar
dexon-sol-tools-4da574560d50f661227ec4d91acf20917c26b17b.tar.gz
dexon-sol-tools-4da574560d50f661227ec4d91acf20917c26b17b.tar.bz2
dexon-sol-tools-4da574560d50f661227ec4d91acf20917c26b17b.tar.lz
dexon-sol-tools-4da574560d50f661227ec4d91acf20917c26b17b.tar.xz
dexon-sol-tools-4da574560d50f661227ec4d91acf20917c26b17b.tar.zst
dexon-sol-tools-4da574560d50f661227ec4d91acf20917c26b17b.zip
fix: remove redundant handler
Diffstat (limited to 'packages/instant/src/components')
-rw-r--r--packages/instant/src/components/payment_method.tsx22
1 files changed, 1 insertions, 21 deletions
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');
- };
}