diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-28 07:10:40 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-28 07:13:32 +0800 |
commit | c5d6b925e4e04d5b6cfd0623d0a1449ba69d3a30 (patch) | |
tree | 55fbd82f4bb9c5f8e689684238d539bcd4e2fee1 /packages/instant/src/redux | |
parent | 47a87e57f1cfa82375c87829320f30049217d657 (diff) | |
download | dexon-sol-tools-c5d6b925e4e04d5b6cfd0623d0a1449ba69d3a30.tar dexon-sol-tools-c5d6b925e4e04d5b6cfd0623d0a1449ba69d3a30.tar.gz dexon-sol-tools-c5d6b925e4e04d5b6cfd0623d0a1449ba69d3a30.tar.bz2 dexon-sol-tools-c5d6b925e4e04d5b6cfd0623d0a1449ba69d3a30.tar.lz dexon-sol-tools-c5d6b925e4e04d5b6cfd0623d0a1449ba69d3a30.tar.xz dexon-sol-tools-c5d6b925e4e04d5b6cfd0623d0a1449ba69d3a30.tar.zst dexon-sol-tools-c5d6b925e4e04d5b6cfd0623d0a1449ba69d3a30.zip |
feat(instant): Quote fetch tracking
Diffstat (limited to 'packages/instant/src/redux')
-rw-r--r-- | packages/instant/src/redux/async_data.ts | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/packages/instant/src/redux/async_data.ts b/packages/instant/src/redux/async_data.ts index 6feb760e7..2efc3698f 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, QuoteFetchedVia } from '../types'; import { analytics } from '../util/analytics'; import { assetUtils } from '../util/asset'; import { buyQuoteUpdater } from '../util/buy_quote_updater'; @@ -84,7 +84,7 @@ export const asyncData = { fetchCurrentBuyQuoteAndDispatchToStore: async ( state: State, dispatch: Dispatch, - options: { updateSilently: boolean }, + options: { updateSilently: boolean; fetchedVia: QuoteFetchedVia }, ) => { const { buyOrderState, providerState, selectedAsset, selectedAssetUnitAmount, affiliateInfo } = state; const assetBuyer = providerState.assetBuyer; @@ -99,7 +99,12 @@ export const asyncData = { dispatch, selectedAsset as ERC20Asset, selectedAssetUnitAmount, - { setPending: !options.updateSilently, dispatchErrors: !options.updateSilently, affiliateInfo }, + { + setPending: !options.updateSilently, + dispatchErrors: !options.updateSilently, + fetchedVia: options.fetchedVia, + affiliateInfo, + }, ); } }, |