diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-30 07:45:35 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-30 07:45:35 +0800 |
commit | 702dbbae54ae2fba3330c7dcda68ad6ffe64abc0 (patch) | |
tree | e5f6da99570de8d0f49695f944e92b2423de0b85 /packages/instant/src/redux | |
parent | 856f4b473b54ecb3dc707ea334890397c98606bf (diff) | |
parent | fc3641b49938ea9dc5e77e633e798ca19aa812ff (diff) | |
download | dexon-sol-tools-702dbbae54ae2fba3330c7dcda68ad6ffe64abc0.tar dexon-sol-tools-702dbbae54ae2fba3330c7dcda68ad6ffe64abc0.tar.gz dexon-sol-tools-702dbbae54ae2fba3330c7dcda68ad6ffe64abc0.tar.bz2 dexon-sol-tools-702dbbae54ae2fba3330c7dcda68ad6ffe64abc0.tar.lz dexon-sol-tools-702dbbae54ae2fba3330c7dcda68ad6ffe64abc0.tar.xz dexon-sol-tools-702dbbae54ae2fba3330c7dcda68ad6ffe64abc0.tar.zst dexon-sol-tools-702dbbae54ae2fba3330c7dcda68ad6ffe64abc0.zip |
Merge branch 'development' into feature/instant/misc-close-analytics
Diffstat (limited to 'packages/instant/src/redux')
-rw-r--r-- | packages/instant/src/redux/analytics_middleware.ts | 14 | ||||
-rw-r--r-- | packages/instant/src/redux/async_data.ts | 10 |
2 files changed, 21 insertions, 3 deletions
diff --git a/packages/instant/src/redux/analytics_middleware.ts b/packages/instant/src/redux/analytics_middleware.ts index 8aa76eb77..3dc5fe924 100644 --- a/packages/instant/src/redux/analytics_middleware.ts +++ b/packages/instant/src/redux/analytics_middleware.ts @@ -3,7 +3,7 @@ import * as _ from 'lodash'; import { Middleware } from 'redux'; import { ETH_DECIMALS } from '../constants'; -import { Account, AccountState } from '../types'; +import { Account, AccountState, StandardSlidingPanelContent } from '../types'; import { analytics } from '../util/analytics'; import { Action, ActionTypes } from './actions'; @@ -77,6 +77,18 @@ export const analyticsMiddleware: Middleware = store => next => middlewareAction }); } break; + case ActionTypes.OPEN_STANDARD_SLIDING_PANEL: + const openSlidingContent = curState.standardSlidingPanelSettings.content; + if (openSlidingContent === StandardSlidingPanelContent.InstallWallet) { + analytics.trackInstallWalletModalOpened(); + } + break; + case ActionTypes.CLOSE_STANDARD_SLIDING_PANEL: + const closeSlidingContent = curState.standardSlidingPanelSettings.content; + if (closeSlidingContent === StandardSlidingPanelContent.InstallWallet) { + analytics.trackInstallWalletModalClosed(); + } + break; } return nextAction; diff --git a/packages/instant/src/redux/async_data.ts b/packages/instant/src/redux/async_data.ts index 6feb760e7..9fdcea3ca 100644 --- a/packages/instant/src/redux/async_data.ts +++ b/packages/instant/src/redux/async_data.ts @@ -4,7 +4,7 @@ import * as _ from 'lodash'; import { Dispatch } from 'redux'; import { BIG_NUMBER_ZERO } from '../constants'; -import { AccountState, ERC20Asset, OrderProcessState, ProviderState } from '../types'; +import { AccountState, ERC20Asset, OrderProcessState, ProviderState, QuoteFetchOrigin } from '../types'; import { analytics } from '../util/analytics'; import { assetUtils } from '../util/asset'; import { buyQuoteUpdater } from '../util/buy_quote_updater'; @@ -84,6 +84,7 @@ export const asyncData = { fetchCurrentBuyQuoteAndDispatchToStore: async ( state: State, dispatch: Dispatch, + fetchOrigin: QuoteFetchOrigin, options: { updateSilently: boolean }, ) => { const { buyOrderState, providerState, selectedAsset, selectedAssetUnitAmount, affiliateInfo } = state; @@ -99,7 +100,12 @@ export const asyncData = { dispatch, selectedAsset as ERC20Asset, selectedAssetUnitAmount, - { setPending: !options.updateSilently, dispatchErrors: !options.updateSilently, affiliateInfo }, + fetchOrigin, + { + setPending: !options.updateSilently, + dispatchErrors: !options.updateSilently, + affiliateInfo, + }, ); } }, |