Skip to content

Commit 794cfa1

Browse files
Godwin Igwurubeppedziwiatr
authored andcommitted
moved inputAsData option into warpOptions
1 parent 6ce251d commit 794cfa1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/contract/Contract.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export interface DREContractStatusResponse<State> {
4040
export type WarpOptions = {
4141
vrf?: boolean;
4242
disableBundling?: boolean;
43+
inputFormatAsData?: boolean;
4344
manifestData?: { [path: string]: string };
4445
};
4546

@@ -217,8 +218,7 @@ export interface Contract<State = unknown> {
217218
*/
218219
writeInteraction<Input = unknown>(
219220
input: Input,
220-
options?: WriteInteractionOptions,
221-
inputFormatAsData?: boolean
221+
options?: WriteInteractionOptions
222222
): Promise<WriteInteractionResponse | null>;
223223

224224
/**

src/contract/HandlerBasedContract.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,7 @@ export class HandlerBasedContract<State> implements Contract<State> {
334334

335335
async writeInteraction<Input>(
336336
input: Input,
337-
options?: WriteInteractionOptions,
338-
inputFormatAsData?: boolean
337+
options?: WriteInteractionOptions
339338
): Promise<WriteInteractionResponse | null> {
340339
this.logger.info('Write interaction', { input, options });
341340
if (!this._signature) {
@@ -354,6 +353,7 @@ export class HandlerBasedContract<State> implements Contract<State> {
354353
const effectiveDisableBundling = options?.disableBundling === true;
355354
const effectiveReward = options?.reward;
356355
const effectiveManifestData = options?.manifestData;
356+
const effectiveInputFormatOption = options?.inputFormatAsData;
357357

358358
const bundleInteraction = interactionsLoader.type() == 'warp' && !effectiveDisableBundling;
359359

@@ -382,7 +382,7 @@ export class HandlerBasedContract<State> implements Contract<State> {
382382
strict: effectiveStrict,
383383
vrf: effectiveVrf,
384384
manifestData: effectiveManifestData,
385-
inputFormatAsData: inputFormatAsData
385+
inputFormatAsData: effectiveInputFormatOption
386386
});
387387
} else {
388388
const interactionTx = await this.createInteraction(

0 commit comments

Comments
 (0)