Skip to content

Commit

Permalink
[FEATURE] - support sortKey or blockHeight in viewState #504
Browse files Browse the repository at this point in the history
  • Loading branch information
ppedziwiatr committed Jan 31, 2024
1 parent 1cddefc commit 02b414b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/contract/Contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ export interface Contract<State = unknown> {
tags?: Tags,
transfer?: ArTransfer,
caller?: string,
signal?: AbortSignal
signal?: AbortSignal,
sortKey?: string
): Promise<InteractionResult<State, View>>;

/**
Expand Down
5 changes: 3 additions & 2 deletions src/contract/HandlerBasedContract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,14 +281,15 @@ export class HandlerBasedContract<State> implements Contract<State> {
tags: Tags = [],
transfer: ArTransfer = emptyTransfer,
caller?: string,
signal?: AbortSignal
signal?: AbortSignal,
sortKey?: string
): Promise<InteractionResult<State, View>> {
this.logger.info('View state for', this._contractTxId);
return await this.callContract<Input, View>(
input,
'view',
caller,
undefined,
sortKey,
tags,
transfer,
false,
Expand Down

0 comments on commit 02b414b

Please sign in to comment.