From 170c80c75840d432722eccff91e970a4ac5996f9 Mon Sep 17 00:00:00 2001 From: Brenzee Date: Sun, 17 Dec 2023 16:28:43 +0200 Subject: [PATCH] fix(import): dont verify options when FCT is imported --- src/batchMultiSigCall/batchMultiSigCall.ts | 4 ++++ src/batchMultiSigCall/classes/Options/index.ts | 4 ++-- src/batchMultiSigCall/methods/FCT.ts | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/batchMultiSigCall/batchMultiSigCall.ts b/src/batchMultiSigCall/batchMultiSigCall.ts index 6adb0662..e5c39ee9 100644 --- a/src/batchMultiSigCall/batchMultiSigCall.ts +++ b/src/batchMultiSigCall/batchMultiSigCall.ts @@ -175,6 +175,10 @@ export class BatchMultiSigCall { getCallByNodeId = getCallByNodeId; getIndexByNodeId = getIndexByNodeId; + protected _setOptionsWithoutValidation(options: DeepPartial) { + return this._options.set(options, false) as RequiredFCTOptions; + } + // Static functions static utils = utils; diff --git a/src/batchMultiSigCall/classes/Options/index.ts b/src/batchMultiSigCall/classes/Options/index.ts index 52e21be9..1896ec26 100644 --- a/src/batchMultiSigCall/classes/Options/index.ts +++ b/src/batchMultiSigCall/classes/Options/index.ts @@ -41,9 +41,9 @@ export class Options { static helpers = helpers; private _options: IFCTOptions = initOptions; - public set>(options: O): IFCTOptions & O { + public set>(options: O, verify = true): IFCTOptions & O { const mergedOptions = deepMerge(this._options, options); - // Options.verify(mergedOptions); + if (verify) Options.verify(mergedOptions); this._options = mergedOptions; return this._options as IFCTOptions & O; } diff --git a/src/batchMultiSigCall/methods/FCT.ts b/src/batchMultiSigCall/methods/FCT.ts index 48bba3f7..0e0a59cc 100644 --- a/src/batchMultiSigCall/methods/FCT.ts +++ b/src/batchMultiSigCall/methods/FCT.ts @@ -357,7 +357,7 @@ export function impFCT(this: BatchMultiSigCall, fct: IFCT, map?: ReturnType