Skip to content

Commit

Permalink
fix: queryFeeFactor 0 situation
Browse files Browse the repository at this point in the history
  • Loading branch information
Xaber20110202 committed Jan 15, 2020
1 parent 6dd24bf commit 0eda292
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils/order.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { MarketMakerConfig, Token, TokenConfig } from '../types'
import { assetDataUtils, generatePseudoRandomSalt, orderHashUtils, signatureUtils, SignerType, SignatureType } from '0x.js'
import * as _ from 'lodash'
import * as ethUtils from 'ethereumjs-util'
import { toBN } from './math'
import { getTokenBySymbol } from './token'
Expand Down Expand Up @@ -89,7 +90,7 @@ const getOrderAndFeeFactor = (params: GetOrderAndFeeFactorParams) => {
}

const foundTokenConfig = tokenConfigs.find(t => t.symbol === takerToken.symbol)
const feeFactor = queryFeeFactor && +queryFeeFactor > 0 ? +queryFeeFactor : (
const feeFactor = !_.isUndefined(queryFeeFactor) && !_.isNaN(+queryFeeFactor) && +queryFeeFactor >= 0 ? +queryFeeFactor : (
foundTokenConfig && foundTokenConfig.feeFactor ? foundTokenConfig.feeFactor : (config.feeFactor ? config.feeFactor : 0)
)

Expand Down

0 comments on commit 0eda292

Please sign in to comment.