diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-10 02:40:47 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-10 02:40:47 +0800 |
commit | 2e8f74abce7be3a5799bb93a0360d299de55b621 (patch) | |
tree | e052e2d4aeaf85546cde770748ebc5d2058ea109 /packages/instant/src/containers | |
parent | df91d343154bced69be86f7af4c4c702286cfd16 (diff) | |
download | dexon-sol-tools-2e8f74abce7be3a5799bb93a0360d299de55b621.tar dexon-sol-tools-2e8f74abce7be3a5799bb93a0360d299de55b621.tar.gz dexon-sol-tools-2e8f74abce7be3a5799bb93a0360d299de55b621.tar.bz2 dexon-sol-tools-2e8f74abce7be3a5799bb93a0360d299de55b621.tar.lz dexon-sol-tools-2e8f74abce7be3a5799bb93a0360d299de55b621.tar.xz dexon-sol-tools-2e8f74abce7be3a5799bb93a0360d299de55b621.tar.zst dexon-sol-tools-2e8f74abce7be3a5799bb93a0360d299de55b621.zip |
Use existing functions instead of writing our own
Diffstat (limited to 'packages/instant/src/containers')
-rw-r--r-- | packages/instant/src/containers/selected_erc20_asset_amount_input.ts | 6 |
1 files changed, 2 insertions, 4 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 74713327c..93ff3db70 100644 --- a/packages/instant/src/containers/selected_erc20_asset_amount_input.ts +++ b/packages/instant/src/containers/selected_erc20_asset_amount_input.ts @@ -11,7 +11,6 @@ import { Action, actions } from '../redux/actions'; import { State } from '../redux/reducer'; import { ColorOption } from '../style/theme'; import { AffiliateInfo, ERC20Asset, OrderProcessState } from '../types'; -import { updateBuyQuoteOrFlashErrorAsync } from '../util/buy_quote_fetcher'; import { buyQuoteUpdater } from '../util/buy_quote_updater'; export interface SelectedERC20AssetAmountInputProps { @@ -68,10 +67,9 @@ const mapStateToProps = (state: State, _ownProps: SelectedERC20AssetAmountInputP }; }; -// TODO: change to set pending to true const debouncedUpdateBuyQuoteAsync = _.debounce(buyQuoteUpdater.updateBuyQuoteAsync.bind(buyQuoteUpdater), 200, { trailing: true, -}); +}) as typeof buyQuoteUpdater.updateBuyQuoteAsync; const mapDispatchToProps = ( dispatch: Dispatch<Action>, @@ -89,7 +87,7 @@ 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, affiliateInfo); + debouncedUpdateBuyQuoteAsync(assetBuyer, dispatch, asset, value, true, affiliateInfo); } }, }); |