Skip to content

Commit

Permalink
moved inputAsData option into warpOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Godwin Igwurube authored and ppedziwiatr committed Apr 29, 2024
1 parent 6ce251d commit 794cfa1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/contract/Contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export interface DREContractStatusResponse<State> {
export type WarpOptions = {
vrf?: boolean;
disableBundling?: boolean;
inputFormatAsData?: boolean;
manifestData?: { [path: string]: string };
};

Expand Down Expand Up @@ -217,8 +218,7 @@ export interface Contract<State = unknown> {
*/
writeInteraction<Input = unknown>(
input: Input,
options?: WriteInteractionOptions,
inputFormatAsData?: boolean
options?: WriteInteractionOptions
): Promise<WriteInteractionResponse | null>;

/**
Expand Down
6 changes: 3 additions & 3 deletions src/contract/HandlerBasedContract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,7 @@ export class HandlerBasedContract<State> implements Contract<State> {

async writeInteraction<Input>(
input: Input,
options?: WriteInteractionOptions,
inputFormatAsData?: boolean
options?: WriteInteractionOptions
): Promise<WriteInteractionResponse | null> {
this.logger.info('Write interaction', { input, options });
if (!this._signature) {
Expand All @@ -354,6 +353,7 @@ export class HandlerBasedContract<State> implements Contract<State> {
const effectiveDisableBundling = options?.disableBundling === true;
const effectiveReward = options?.reward;
const effectiveManifestData = options?.manifestData;
const effectiveInputFormatOption = options?.inputFormatAsData;

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

Expand Down Expand Up @@ -382,7 +382,7 @@ export class HandlerBasedContract<State> implements Contract<State> {
strict: effectiveStrict,
vrf: effectiveVrf,
manifestData: effectiveManifestData,
inputFormatAsData: inputFormatAsData
inputFormatAsData: effectiveInputFormatOption
});
} else {
const interactionTx = await this.createInteraction(
Expand Down

0 comments on commit 794cfa1

Please sign in to comment.