aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/util/buy_quote_updater.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/instant/src/util/buy_quote_updater.ts')
-rw-r--r--packages/instant/src/util/buy_quote_updater.ts10
1 files changed, 7 insertions, 3 deletions
diff --git a/packages/instant/src/util/buy_quote_updater.ts b/packages/instant/src/util/buy_quote_updater.ts
index 14af57660..06474b69f 100644
--- a/packages/instant/src/util/buy_quote_updater.ts
+++ b/packages/instant/src/util/buy_quote_updater.ts
@@ -20,7 +20,7 @@ export const buyQuoteUpdater = {
options: {
setPending: boolean;
dispatchErrors: boolean;
- fetchedVia: QuoteFetchOrigin;
+ fetchOrigin: QuoteFetchOrigin;
affiliateInfo?: AffiliateInfo;
},
): Promise<void> => {
@@ -37,7 +37,11 @@ export const buyQuoteUpdater = {
} catch (error) {
if (options.dispatchErrors) {
dispatch(actions.setQuoteRequestStateFailure());
- analytics.trackQuoteError(error.message ? error.message : 'other', assetUnitAmount, options.fetchedVia);
+ analytics.trackQuoteError(
+ error.message ? error.message : 'other',
+ assetUnitAmount,
+ options.fetchOrigin,
+ );
let errorMessage;
if (error.message === AssetBuyerError.InsufficientAssetLiquidity) {
const assetName = assetUtils.bestNameForAsset(asset, 'of this asset');
@@ -65,6 +69,6 @@ export const buyQuoteUpdater = {
errorFlasher.clearError(dispatch);
// invalidate the last buy quote.
dispatch(actions.updateLatestBuyQuote(newBuyQuote));
- analytics.trackQuoteFetched(newBuyQuote, options.fetchedVia);
+ analytics.trackQuoteFetched(newBuyQuote, options.fetchOrigin);
},
};