aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/util
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-16 07:12:43 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-16 07:12:43 +0800
commit33a156d9b5278c0e85a1fa0fe158440a41bcc60e (patch)
tree9f4cdc79c0217b7fdb81ae8744ca350cb43c37e5 /packages/instant/src/util
parent447b0f91f9bdc200d14897be94796873c95490c7 (diff)
downloaddexon-sol-tools-33a156d9b5278c0e85a1fa0fe158440a41bcc60e.tar
dexon-sol-tools-33a156d9b5278c0e85a1fa0fe158440a41bcc60e.tar.gz
dexon-sol-tools-33a156d9b5278c0e85a1fa0fe158440a41bcc60e.tar.bz2
dexon-sol-tools-33a156d9b5278c0e85a1fa0fe158440a41bcc60e.tar.lz
dexon-sol-tools-33a156d9b5278c0e85a1fa0fe158440a41bcc60e.tar.xz
dexon-sol-tools-33a156d9b5278c0e85a1fa0fe158440a41bcc60e.tar.zst
dexon-sol-tools-33a156d9b5278c0e85a1fa0fe158440a41bcc60e.zip
Send in affiliate info as option
Diffstat (limited to 'packages/instant/src/util')
-rw-r--r--packages/instant/src/util/buy_quote_updater.ts5
1 files changed, 2 insertions, 3 deletions
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 });