diff --git a/automated-orders/packages/blockchain-library/src/clients/warden.ts b/automated-orders/packages/blockchain-library/src/clients/warden.ts index f91b27044..fa910a27a 100644 --- a/automated-orders/packages/blockchain-library/src/clients/warden.ts +++ b/automated-orders/packages/blockchain-library/src/clients/warden.ts @@ -6,12 +6,12 @@ import { INewSignatureRequest } from '../types/warden/newSignatureRequest.js'; import { LRUCache } from 'lru-cache' import { EvmClient } from './evm.js'; import { - BroadcastType, IPageRequest, ISignRequest, SignRequestsAbi, SignRequestStatus, - ISignRequestResponse as Response + ISignRequestResponse as Response, + OptionalBroadcastType } from '../types/warden/functions.js'; import { Hex } from 'viem'; @@ -85,7 +85,7 @@ export class WardenClient { reverse: false }; - const args: unknown[] = [pagination, BigInt(1), SignRequestStatus.SIGN_REQUEST_STATUS_FULFILLED, BroadcastType.AUTOMATIC]; + const args: unknown[] = [pagination, BigInt(1), SignRequestStatus.SIGN_REQUEST_STATUS_FULFILLED, OptionalBroadcastType.AUTOMATIC]; const response = await this.evm.callView( this.configuration.wardenPrecompileAddress, SignRequestsAbi, diff --git a/automated-orders/packages/blockchain-library/src/types/warden/functions.ts b/automated-orders/packages/blockchain-library/src/types/warden/functions.ts index 0a59cba59..be76b8d1c 100644 --- a/automated-orders/packages/blockchain-library/src/types/warden/functions.ts +++ b/automated-orders/packages/blockchain-library/src/types/warden/functions.ts @@ -39,6 +39,12 @@ export interface ISignRequest { broadcastType: BroadcastType; }; +export enum OptionalBroadcastType { + UNSPECIFIED = 0, + DISABLED = 1, + AUTOMATIC = 2, +}; + export enum BroadcastType { DISABLED = 0, AUTOMATIC = 1, @@ -96,8 +102,8 @@ export const SignRequestsAbi: AbiFunction = { type: "uint8" }, { - internalType: "enum BroadcastType", - name: "broadcastType", + internalType: "enum OptionalBroadcastType", + name: "optionalBroadcastType", type: "uint8" } ],