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

Commit 735fe3e

Browse files
committed
Simplify expressions parsing boolean query params
1 parent c772d43 commit 735fe3e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/handlers/swap_handlers.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,9 @@ const parseGetSwapQuoteRequestParams = (req: express.Request): GetSwapQuoteReque
178178
: parseStringArrForERC20BridgeSources(req.query.excludedSources.split(','));
179179
const affiliateAddress = req.query.affiliateAddress;
180180
const rfqt =
181-
req.query.intentOnFilling === undefined
182-
? undefined
183-
: { intentOnFilling: req.query.intentOnFilling === 'true' ? true : false };
181+
req.query.intentOnFilling === undefined ? undefined : { intentOnFilling: req.query.intentOnFilling === 'true' };
184182
// tslint:disable-next-line:boolean-naming
185-
const skipValidation =
186-
req.query.skipValidation === undefined ? false : req.query.skipValidation === 'true' ? true : false;
183+
const skipValidation = req.query.skipValidation === undefined ? false : req.query.skipValidation === 'true';
187184
return {
188185
takerAddress,
189186
sellToken,

0 commit comments

Comments
 (0)