Skip to content

Commit ba89ef4

Browse files
committed
fix(cli): defer token approval until payment
1 parent 8464f17 commit ba89ef4

1 file changed

Lines changed: 0 additions & 15 deletions

File tree

ant-cli/src/main.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -334,21 +334,6 @@ async fn build_data_client(
334334
let wallet = create_wallet(key, network)?;
335335
info!("Wallet configured for EVM payments");
336336
client = client.with_wallet(wallet);
337-
338-
if !quiet {
339-
info!("Approving token spend");
340-
let spinner = progress::new_spinner("Approving token spend...");
341-
let approval = client.approve_token_spend().await;
342-
spinner.finish_and_clear();
343-
approval.map_err(|e| anyhow::anyhow!("Token approval failed: {e}"))?;
344-
info!("Token spend approved");
345-
eprintln!("Token spend approved");
346-
} else {
347-
client
348-
.approve_token_spend()
349-
.await
350-
.map_err(|e| anyhow::anyhow!("Token approval failed: {e}"))?;
351-
}
352337
}
353338

354339
Ok(client)

0 commit comments

Comments
 (0)