changes on affiliate fee and other changes

bumped version to 7 and added changelog

updated package.json

revert change to package.json

trying this package.json config
This commit is contained in:
David Sun
2019-06-25 10:55:53 -07:00
parent ed02f4ca88
commit 11d5fec59b
6 changed files with 45 additions and 15 deletions

View File

@@ -1,14 +1,14 @@
import { BigNumber } from '@0x/utils';
import * as _ from 'lodash';
import { SwapQuote, SwapQuoteInfo } from '../types';
import { SwapQuote, SwapQuoteInfo, SwapQuoteWithAffiliateFee } from '../types';
export const affiliateFeeUtils = {
getSwapQuoteWithAffiliateFee(quote: SwapQuote, feePercentage: number): SwapQuote {
getSwapQuoteWithAffiliateFee(quote: SwapQuote, feePercentage: number): SwapQuoteWithAffiliateFee {
const newQuote = _.clone(quote);
newQuote.bestCaseQuoteInfo = getSwapQuoteInfoWithAffiliateFee(newQuote.bestCaseQuoteInfo, feePercentage);
newQuote.worstCaseQuoteInfo = getSwapQuoteInfoWithAffiliateFee(newQuote.worstCaseQuoteInfo, feePercentage);
return newQuote;
return { ...newQuote, ...{ feePercentage } };
},
};