diff --git a/packages/entrykit/src/getSessionClient.ts b/packages/entrykit/src/getSessionClient.ts index ea8d8a286f..08ad385e0e 100644 --- a/packages/entrykit/src/getSessionClient.ts +++ b/packages/entrykit/src/getSessionClient.ts @@ -2,7 +2,6 @@ import { Address, Chain, Client, Transport } from "viem"; import { smartAccountActions } from "permissionless"; import { callFrom } from "@latticexyz/world/internal"; import { createBundlerClient } from "./createBundlerClient"; -import { observer } from "@latticexyz/explorer/observer"; import { SessionClient } from "./common"; import { SmartAccount } from "viem/account-abstraction"; import { getBundlerTransport } from "./getBundlerTransport"; @@ -30,7 +29,7 @@ export async function getSessionClient({ }) .extend(smartAccountActions()) .extend(callFrom({ worldAddress, delegatorAddress: userAddress, publicClient: client })) - .extend(observer()) + // TODO: add observer once we conditionally fetch receipts while bridge is open .extend(() => ({ userAddress })); return sessionClient; diff --git a/packages/entrykit/src/passkey/passkeyConnector.ts b/packages/entrykit/src/passkey/passkeyConnector.ts index 767300dd37..f4515b1423 100644 --- a/packages/entrykit/src/passkey/passkeyConnector.ts +++ b/packages/entrykit/src/passkey/passkeyConnector.ts @@ -17,7 +17,6 @@ import { reusePasskey } from "./reusePasskey"; import { createPasskey } from "./createPasskey"; import { defaultClientConfig } from "../common"; import { createBundlerClient } from "../createBundlerClient"; -import { observer } from "@latticexyz/explorer/observer"; import { getPaymasterAddress } from "../getPaymasterAddress"; import { getBundlerTransport } from "../getBundlerTransport"; import { wiresaw } from "@latticexyz/wiresaw/internal"; @@ -199,9 +198,8 @@ export function passkeyConnector({ chainId }: PasskeyConnectorOptions): CreatePa transport: bundlerTransport, client, account, - }) - .extend(smartAccountActions()) - .extend(observer()); + }).extend(smartAccountActions()); + // TODO: add observer once we conditionally fetch receipts while bridge is open }, async getProvider(_params) { diff --git a/packages/wiresaw/src/transports/wiresaw.ts b/packages/wiresaw/src/transports/wiresaw.ts index dc42ee47f9..a78ade5846 100644 --- a/packages/wiresaw/src/transports/wiresaw.ts +++ b/packages/wiresaw/src/transports/wiresaw.ts @@ -1,6 +1,14 @@ -import { BundlerRpcSchema, Hash, Hex, PublicRpcSchema, RpcTransactionReceipt, Transport, http } from "viem"; +import { + BundlerRpcSchema, + Hash, + Hex, + PublicRpcSchema, + RpcTransactionReceipt, + RpcUserOperationReceipt, + Transport, + http, +} from "viem"; import { getRpcMethod, getRpcSchema, TransportRequestFn, TransportRequestFnMapped } from "./common"; -import { getUserOperationReceipt } from "../getUserOperationReceipt"; export type WiresawRpcSchema = [ { @@ -52,7 +60,7 @@ export function wiresaw(getTransport: transpo const getWiresawTransport = args.chain?.rpcUrls && "wiresaw" in args.chain.rpcUrls ? // TODO: enable WS - http(args.chain.rpcUrls.wiresaw.http[0], { batch: true }) + http(args.chain.rpcUrls.wiresaw.http[0]) : undefined; if (!getWiresawTransport) return getTransport(args); @@ -106,7 +114,7 @@ export function wiresaw(getTransport: transpo } if (method === "eth_getUserOperationReceipt") { - const { receipts, userOps } = getCache(await getChainId()); + const { userOps } = getCache(await getChainId()); const [userOpHash] = params; const transactionHash = userOps.get(userOpHash); @@ -116,10 +124,20 @@ export function wiresaw(getTransport: transpo throw new Error(`Could not find transaction hash for user op hash "${userOpHash}".`); } - const receipt = await getReceipt(transactionHash, receipts); - if (!receipt) return null; - - return getUserOperationReceipt(userOpHash, receipt); + // return instant/partial receipt for now until we can find a good way + // to opt-in to this when using things like permissionless actions, which + // call out to `waitForUserOperationReceipt` + return { + success: true, + userOpHash, + receipt: { + transactionHash, + }, + } as RpcUserOperationReceipt; + + // const receipt = await getReceipt(transactionHash, receipts); + // if (!receipt) return null; + // return getUserOperationReceipt(userOpHash, receipt); } return await transport.request({ method, params }, opts);