diff options
Diffstat (limited to 'packages/instant')
-rw-r--r-- | packages/instant/src/containers/selected_erc20_asset_amount_input.ts | 11 | ||||
-rw-r--r-- | packages/instant/src/redux/async_data.ts | 3 | ||||
-rw-r--r-- | packages/instant/src/util/buy_quote_updater.ts | 5 |
3 files changed, 7 insertions, 12 deletions
diff --git a/packages/instant/src/containers/selected_erc20_asset_amount_input.ts b/packages/instant/src/containers/selected_erc20_asset_amount_input.ts index 3e6ef41a0..2c2661e1a 100644 --- a/packages/instant/src/containers/selected_erc20_asset_amount_input.ts +++ b/packages/instant/src/containers/selected_erc20_asset_amount_input.ts @@ -81,14 +81,11 @@ const mapDispatchToProps = ( // even if it's debounced, give them the illusion it's loading dispatch(actions.setQuoteRequestStatePending()); // tslint:disable-next-line:no-floating-promises - debouncedUpdateBuyQuoteAsync( - assetBuyer, - dispatch, - asset, - value, - { setPending: true, dispatchErrors: true }, + debouncedUpdateBuyQuoteAsync(assetBuyer, dispatch, asset, value, { + setPending: true, + dispatchErrors: true, affiliateInfo, - ); + }); } }, }); diff --git a/packages/instant/src/redux/async_data.ts b/packages/instant/src/redux/async_data.ts index f4b3f94bf..5d30388b8 100644 --- a/packages/instant/src/redux/async_data.ts +++ b/packages/instant/src/redux/async_data.ts @@ -97,8 +97,7 @@ export const asyncData = { dispatch, selectedAsset as ERC20Asset, selectedAssetUnitAmount, - { setPending: !options.updateSilently, dispatchErrors: !options.updateSilently }, - affiliateInfo, + { setPending: !options.updateSilently, dispatchErrors: !options.updateSilently, affiliateInfo }, ); } }, diff --git a/packages/instant/src/util/buy_quote_updater.ts b/packages/instant/src/util/buy_quote_updater.ts index eeb792bcf..2fd16d781 100644 --- a/packages/instant/src/util/buy_quote_updater.ts +++ b/packages/instant/src/util/buy_quote_updater.ts @@ -16,8 +16,7 @@ export const buyQuoteUpdater = { dispatch: Dispatch<Action>, asset: ERC20Asset, assetUnitAmount: BigNumber, - options: { setPending: boolean; dispatchErrors: boolean }, - affiliateInfo?: AffiliateInfo, + options: { setPending: boolean; dispatchErrors: boolean; affiliateInfo?: AffiliateInfo }, ): Promise<void> => { // get a new buy quote. const baseUnitValue = Web3Wrapper.toBaseUnitAmount(assetUnitAmount, asset.metaData.decimals); @@ -25,7 +24,7 @@ export const buyQuoteUpdater = { // mark quote as pending dispatch(actions.setQuoteRequestStatePending()); } - const feePercentage = oc(affiliateInfo).feePercentage(); + const feePercentage = oc(options.affiliateInfo).feePercentage(); let newBuyQuote: BuyQuote | undefined; try { newBuyQuote = await assetBuyer.getBuyQuoteAsync(asset.assetData, baseUnitValue, { feePercentage }); |