From da2b3fc4dba97d96e625683c21b91adc7f406ce1 Mon Sep 17 00:00:00 2001 From: Siyu Jiang <91580504+jsy1218@users.noreply.github.com> Date: Fri, 8 Sep 2023 10:00:17 -0700 Subject: [PATCH] expose enableFeeOnTransferFeeFetching post request field --- lib/entities/request/ClassicRequest.ts | 1 + lib/providers/quoters/RoutingApiQuoter.ts | 1 + lib/util/validator.ts | 1 + 3 files changed, 3 insertions(+) diff --git a/lib/entities/request/ClassicRequest.ts b/lib/entities/request/ClassicRequest.ts index 80374186..b7887d7a 100644 --- a/lib/entities/request/ClassicRequest.ts +++ b/lib/entities/request/ClassicRequest.ts @@ -24,6 +24,7 @@ export interface ClassicConfig { debugRoutingConfig?: string; unicornSecret?: string; quoteSpeed?: string; + enableFeeOnTransferFeeFetching?: boolean; } export interface ClassicConfigJSON extends Omit { diff --git a/lib/providers/quoters/RoutingApiQuoter.ts b/lib/providers/quoters/RoutingApiQuoter.ts index 58c2c40f..4ce4c161 100644 --- a/lib/providers/quoters/RoutingApiQuoter.ts +++ b/lib/providers/quoters/RoutingApiQuoter.ts @@ -106,6 +106,7 @@ export class RoutingApiQuoter implements Quoter { // expect web/mobile to send it for the 1st fast quote, // otherwise default not to send it ...(config.quoteSpeed !== undefined && { quoteSpeed: config.quoteSpeed }), + ...(config.enableFeeOnTransferFeeFetching !== undefined && { enableFeeOnTransferFeeFetching: config.enableFeeOnTransferFeeFetching}), }) ); } diff --git a/lib/util/validator.ts b/lib/util/validator.ts index fd15a3dd..740189ac 100644 --- a/lib/util/validator.ts +++ b/lib/util/validator.ts @@ -93,6 +93,7 @@ export class FieldValidator { slippageTolerance: FieldValidator.slippageTolerance.optional(), algorithm: FieldValidator.algorithm.optional(), quoteSpeed: FieldValidator.quoteSpeed.optional(), + enableFeeOnTransferFeeFetching: Joi.boolean().optional(), }); public static readonly dutchLimitConfig = Joi.object({