Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
Simplify expressions parsing boolean query params
Browse files Browse the repository at this point in the history
  • Loading branch information
feuGeneA committed Apr 16, 2020
1 parent c772d43 commit 735fe3e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/handlers/swap_handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,9 @@ const parseGetSwapQuoteRequestParams = (req: express.Request): GetSwapQuoteReque
: parseStringArrForERC20BridgeSources(req.query.excludedSources.split(','));
const affiliateAddress = req.query.affiliateAddress;
const rfqt =
req.query.intentOnFilling === undefined
? undefined
: { intentOnFilling: req.query.intentOnFilling === 'true' ? true : false };
req.query.intentOnFilling === undefined ? undefined : { intentOnFilling: req.query.intentOnFilling === 'true' };
// tslint:disable-next-line:boolean-naming
const skipValidation =
req.query.skipValidation === undefined ? false : req.query.skipValidation === 'true' ? true : false;
const skipValidation = req.query.skipValidation === undefined ? false : req.query.skipValidation === 'true';
return {
takerAddress,
sellToken,
Expand Down

0 comments on commit 735fe3e

Please sign in to comment.