Skip to content

Commit 45a3010

Browse files
critesjoshclaude
andcommitted
Fix deploy_account.ts and restore isTestnet() for testnet compatibility
The merge mangled deploy_account.ts — restore testnet bridging logic with next's API changes (NO_FROM instead of AztecAddress.ZERO). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 03f397c commit 45a3010

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

config/config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ export class ConfigManager {
6767
return this.config.network;
6868
}
6969

70+
public isTestnet(): boolean {
71+
return this.config.environment === 'testnet';
72+
}
73+
7074
public isLocalNetwork(): boolean {
7175
return this.config.environment === 'local';
7276
}

src/utils/deploy_account.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export async function deploySchnorrAccount(wallet?: EmbeddedWallet): Promise<Acc
5656
logger.info('✅ Fee juice claim ready for account deployment');
5757
}
5858
} else {
59-
// Devnet/local: use sponsored FPC
59+
// Local: use sponsored FPC
6060
logger.info('💰 Setting up sponsored fee payment for account deployment...');
6161
const sponsoredFPC = await getSponsoredFPCInstance();
6262
logger.info(`💰 Sponsored FPC instance obtained at: ${sponsoredFPC.address}`);
@@ -76,8 +76,8 @@ export async function deploySchnorrAccount(wallet?: EmbeddedWallet): Promise<Acc
7676
// Deploy account
7777
await deployMethod.send({
7878
from: NO_FROM,
79-
fee: { paymentMethod: sponsoredPaymentMethod },
80-
wait: { timeout: 120 },
79+
wait: { timeout: timeouts.deployTimeout },
80+
...(paymentMethod ? { fee: { paymentMethod } } : {}),
8181
});
8282

8383
logger.info(`✅ Account deployment transaction successful!`);

0 commit comments

Comments
 (0)