Skip to content

Commit

Permalink
Provide correct SOLSCAN cluster url in searcher_client example (#51)
Browse files Browse the repository at this point in the history
If someone is sending to devnet or testnet, currently transaction will not be found with the provided URL.
  • Loading branch information
dgski authored Jun 25, 2024
1 parent b2cf4f0 commit 748f362
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion searcher_client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
}
Expand Down

0 comments on commit 748f362

Please sign in to comment.