diff --git a/packages/core/src/client/create-client.ts b/packages/core/src/client/create-client.ts index 018d12ff2c..7209130254 100644 --- a/packages/core/src/client/create-client.ts +++ b/packages/core/src/client/create-client.ts @@ -62,14 +62,14 @@ export const createPublicErc4337FromClient: < }); }, - getUserOperationByHash(hash: Hash): Promise { + getUserOperationByHash(hash: Hash): Promise { return clientAdapter.request({ method: "eth_getUserOperationByHash", params: [hash], }); }, - getUserOperationReceipt(hash: Hash): Promise { + getUserOperationReceipt(hash: Hash): Promise { return clientAdapter.request({ method: "eth_getUserOperationReceipt", params: [hash], diff --git a/packages/core/src/client/types.ts b/packages/core/src/client/types.ts index 6e87dff1ec..7ac461c0b0 100644 --- a/packages/core/src/client/types.ts +++ b/packages/core/src/client/types.ts @@ -36,12 +36,12 @@ export type Erc337RpcSchema = [ { Method: "eth_getUserOperationReceipt"; Parameters: [Hash]; - ReturnType: UserOperationReceipt; + ReturnType: UserOperationReceipt | null; }, { Method: "eth_getUserOperationByHash"; Parameters: [Hash]; - ReturnType: UserOperationResponse; + ReturnType: UserOperationResponse | null; }, { Method: "eth_supportedEntryPoints"; @@ -86,7 +86,7 @@ export interface Erc4337Actions { * @param hash - the hash of the UserOperation to get the receipt for * @returns - {@link UserOperationResponse} */ - getUserOperationByHash(hash: Hash): Promise; + getUserOperationByHash(hash: Hash): Promise; /** * calls `eth_getUserOperationReceipt` and returns the {@link UserOperationReceipt} @@ -94,7 +94,7 @@ export interface Erc4337Actions { * @param hash - the hash of the UserOperation to get the receipt for * @returns - {@link UserOperationResponse} */ - getUserOperationReceipt(hash: Hash): Promise; + getUserOperationReceipt(hash: Hash): Promise; /** * calls `eth_supportedEntryPoints` and returns the entrypoints the RPC diff --git a/packages/core/src/provider/base.ts b/packages/core/src/provider/base.ts index dc0f3227fd..c6fd4bf174 100644 --- a/packages/core/src/provider/base.ts +++ b/packages/core/src/provider/base.ts @@ -301,11 +301,15 @@ export class SmartAccountProvider< throw new Error("Failed to find transaction for User Operation"); }; - getUserOperationByHash = (hash: Hash): Promise => { + getUserOperationByHash = ( + hash: Hash + ): Promise => { return this.rpcClient.getUserOperationByHash(hash); }; - getUserOperationReceipt = (hash: Hash): Promise => { + getUserOperationReceipt = ( + hash: Hash + ): Promise => { return this.rpcClient.getUserOperationReceipt(hash); }; diff --git a/packages/core/src/provider/types.ts b/packages/core/src/provider/types.ts index d945a79641..1386a1e468 100644 --- a/packages/core/src/provider/types.ts +++ b/packages/core/src/provider/types.ts @@ -133,7 +133,7 @@ export interface ISmartAccountProvider< * @param hash - the hash of the UserOperation to get the receipt for * @returns - {@link UserOperationResponse} */ - getUserOperationByHash: (hash: Hash) => Promise; + getUserOperationByHash: (hash: Hash) => Promise; /** * calls `eth_getUserOperationReceipt` and returns the {@link UserOperationReceipt} @@ -141,7 +141,7 @@ export interface ISmartAccountProvider< * @param hash - the hash of the UserOperation to get the receipt for * @returns - {@link UserOperationResponse} */ - getUserOperationReceipt: (hash: Hash) => Promise; + getUserOperationReceipt: (hash: Hash) => Promise; /** * This takes an ethereum transaction and converts it into a UserOperation, sends the UserOperation, and waits