diff --git a/yarn-project/aztec.js/src/contract/deploy_sent_tx.ts b/yarn-project/aztec.js/src/contract/deploy_sent_tx.ts index 5f9ee97b9d60..0eb61ae4805c 100644 --- a/yarn-project/aztec.js/src/contract/deploy_sent_tx.ts +++ b/yarn-project/aztec.js/src/contract/deploy_sent_tx.ts @@ -62,7 +62,7 @@ export class DeploySentTx extends SentTx } protected async getContractObject(wallet?: Wallet): Promise { - const isWallet = (pxe: PXE | Wallet): pxe is Wallet => !!(pxe as Wallet).createTxExecutionRequest; + const isWallet = (pxe: typeof this.pxe | Wallet): pxe is Wallet => !!(pxe as Wallet).createTxExecutionRequest; const contractWallet = wallet ?? (isWallet(this.pxe) && this.pxe); if (!contractWallet) { throw new Error(`A wallet is required for creating a contract instance`); diff --git a/yarn-project/aztec.js/src/contract/sent_tx.ts b/yarn-project/aztec.js/src/contract/sent_tx.ts index 82c9efa8c4f7..96e58f2bd045 100644 --- a/yarn-project/aztec.js/src/contract/sent_tx.ts +++ b/yarn-project/aztec.js/src/contract/sent_tx.ts @@ -1,6 +1,6 @@ import { retryUntil } from '@aztec/foundation/retry'; import type { FieldsOf } from '@aztec/foundation/types'; -import type { GetPublicLogsResponse, PXE } from '@aztec/stdlib/interfaces/client'; +import type { AztecNode, GetPublicLogsResponse, PXE } from '@aztec/stdlib/interfaces/client'; import { type TxHash, type TxReceipt, TxStatus } from '@aztec/stdlib/tx'; /** Options related to waiting for a tx. */ @@ -34,7 +34,7 @@ export const DefaultWaitOpts: WaitOpts = { * its hash, receipt, and mining status. */ export class SentTx { - constructor(protected pxe: PXE, protected txHashPromise: Promise) {} + constructor(protected pxe: PXE | AztecNode, protected txHashPromise: Promise) {} /** * Retrieves the transaction hash of the SentTx instance.