Skip to content

Commit

Permalink
fix: correctly use test wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelmauro committed Aug 19, 2024
1 parent 6f708cf commit db43e49
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions zk_toolbox/crates/zk_supervisor/src/commands/test/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pub async fn run(shell: &Shell, args: IntegrationArgs) -> anyhow::Result<()> {
.init_test_wallet(&ecosystem_config, &chain_config)
.await?;

let private_key = wallets.get_main_wallet()?.private_key.unwrap();
let private_key = wallets.get_test_wallet(chain_config)?.private_key.unwrap();

let mut command = cmd!(shell, "yarn jest --forceExit --testTimeout 60000")
.env("CHAIN_NAME", ecosystem_config.current_chain())
Expand Down Expand Up @@ -121,13 +121,18 @@ impl TestWallets {
self.get("test_mnemonic".to_string())
}

fn get_test_wallet(&self, chain_config: &ChainConfig,) -> anyhow::Result<Wallet> {
let test_wallet_id: String = format!("test_mnemonic{}", chain_config.id + 1);

self.get(test_wallet_id)?
}

async fn init_test_wallet(
&self,
ecosystem_config: &EcosystemConfig,
chain_config: &ChainConfig,
) -> anyhow::Result<()> {
let test_wallet_id: String = format!("test_mnemonic{}", chain_config.id + 1);
let wallet = self.get(test_wallet_id)?;
let wallet = self.get_test_wallet(chain_config)?;

let l1_rpc = chain_config
.get_secrets_config()?
Expand Down

0 comments on commit db43e49

Please sign in to comment.