From 794cfa1f22bb0e3fe15b4c138dd49bbe2999bd37 Mon Sep 17 00:00:00 2001 From: Godwin Igwurube Date: Sat, 27 Apr 2024 16:26:20 +0100 Subject: [PATCH] moved inputAsData option into warpOptions --- src/contract/Contract.ts | 4 ++-- src/contract/HandlerBasedContract.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/contract/Contract.ts b/src/contract/Contract.ts index 9772298c..3f6162dd 100644 --- a/src/contract/Contract.ts +++ b/src/contract/Contract.ts @@ -40,6 +40,7 @@ export interface DREContractStatusResponse { export type WarpOptions = { vrf?: boolean; disableBundling?: boolean; + inputFormatAsData?: boolean; manifestData?: { [path: string]: string }; }; @@ -217,8 +218,7 @@ export interface Contract { */ writeInteraction( input: Input, - options?: WriteInteractionOptions, - inputFormatAsData?: boolean + options?: WriteInteractionOptions ): Promise; /** diff --git a/src/contract/HandlerBasedContract.ts b/src/contract/HandlerBasedContract.ts index f4bca46d..5d3d7951 100644 --- a/src/contract/HandlerBasedContract.ts +++ b/src/contract/HandlerBasedContract.ts @@ -334,8 +334,7 @@ export class HandlerBasedContract implements Contract { async writeInteraction( input: Input, - options?: WriteInteractionOptions, - inputFormatAsData?: boolean + options?: WriteInteractionOptions ): Promise { this.logger.info('Write interaction', { input, options }); if (!this._signature) { @@ -354,6 +353,7 @@ export class HandlerBasedContract implements Contract { const effectiveDisableBundling = options?.disableBundling === true; const effectiveReward = options?.reward; const effectiveManifestData = options?.manifestData; + const effectiveInputFormatOption = options?.inputFormatAsData; const bundleInteraction = interactionsLoader.type() == 'warp' && !effectiveDisableBundling; @@ -382,7 +382,7 @@ export class HandlerBasedContract implements Contract { strict: effectiveStrict, vrf: effectiveVrf, manifestData: effectiveManifestData, - inputFormatAsData: inputFormatAsData + inputFormatAsData: effectiveInputFormatOption }); } else { const interactionTx = await this.createInteraction(