aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/containers
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-29 06:25:42 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-29 06:25:42 +0800
commit6222c952c3273ba91f20b5616793c534bb6dca28 (patch)
tree0cd65e874a977c24a7bb5f03b3591a138bdfeca3 /packages/instant/src/containers
parentb9c983b4d691e58894b8b47f8e5952fdfcc275f9 (diff)
parente5b09ba2fd366e485a864bc5819ebde5338f166c (diff)
downloaddexon-sol-tools-6222c952c3273ba91f20b5616793c534bb6dca28.tar
dexon-sol-tools-6222c952c3273ba91f20b5616793c534bb6dca28.tar.gz
dexon-sol-tools-6222c952c3273ba91f20b5616793c534bb6dca28.tar.bz2
dexon-sol-tools-6222c952c3273ba91f20b5616793c534bb6dca28.tar.lz
dexon-sol-tools-6222c952c3273ba91f20b5616793c534bb6dca28.tar.xz
dexon-sol-tools-6222c952c3273ba91f20b5616793c534bb6dca28.tar.zst
dexon-sol-tools-6222c952c3273ba91f20b5616793c534bb6dca28.zip
Merge branch 'development' into feature/instant/quote-analytics
Diffstat (limited to 'packages/instant/src/containers')
-rw-r--r--packages/instant/src/containers/connected_account_payment_method.ts37
1 files changed, 21 insertions, 16 deletions
diff --git a/packages/instant/src/containers/connected_account_payment_method.ts b/packages/instant/src/containers/connected_account_payment_method.ts
index cdeb49a25..e9327a288 100644
--- a/packages/instant/src/containers/connected_account_payment_method.ts
+++ b/packages/instant/src/containers/connected_account_payment_method.ts
@@ -11,7 +11,7 @@ import {
import { Action, actions } from '../redux/actions';
import { asyncData } from '../redux/async_data';
import { State } from '../redux/reducer';
-import { Network, Omit, OperatingSystem, ProviderState, StandardSlidingPanelContent } from '../types';
+import { Network, Omit, OperatingSystem, ProviderState, StandardSlidingPanelContent, WalletSuggestion } from '../types';
import { analytics } from '../util/analytics';
import { envUtil } from '../util/env';
@@ -60,23 +60,28 @@ const mergeProps = (
onUnlockWalletClick: () => connectedDispatch.unlockWalletAndDispatchToStore(connectedState.providerState),
onInstallWalletClick: () => {
const isMobile = envUtil.isMobileOperatingSystem();
- if (!isMobile) {
+ const walletSuggestion: WalletSuggestion = isMobile
+ ? WalletSuggestion.CoinbaseWallet
+ : WalletSuggestion.MetaMask;
+
+ analytics.trackInstallWalletClicked(walletSuggestion);
+ if (walletSuggestion === WalletSuggestion.MetaMask) {
connectedDispatch.openInstallWalletPanel();
- 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;
+ } else {
+ 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');
}
- window.open(url, '_blank');
},
});