From 748f36285786dfd08bcdaa9e47872929639c5cc9 Mon Sep 17 00:00:00 2001 From: David Gorski Date: Tue, 25 Jun 2024 14:52:52 -0400 Subject: [PATCH] Provide correct SOLSCAN cluster url in searcher_client example (#51) If someone is sending to devnet or testnet, currently transaction will not be found with the provided URL. --- searcher_client/src/lib.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/searcher_client/src/lib.rs b/searcher_client/src/lib.rs index dc3abb9..deeaad8 100644 --- a/searcher_client/src/lib.rs +++ b/searcher_client/src/lib.rs @@ -184,8 +184,16 @@ where ))); } info!("Bundle landed successfully"); + let url: String = rpc_client.url(); + let cluster = if url.contains("testnet") { + "testnet" + } else if url.contains("devnet") { + "devnet" + } else { + "mainnet" + }; for sig in bundle_signatures.iter() { - info!("https://solscan.io/tx/{}", sig); + info!("https://solscan.io/tx/{}?cluster={}", sig, cluster); } Ok(()) }