refactor: centralize constants, eliminate unwraps, remove dead code, resolve TODOs
- R13+R16: Replace .expect() with .context()? in main.rs and identity.rs - R17+R18+R19: Fix unwrap() calls in helpers and js-engine - R20+R21: Remove #[allow(dead_code)] annotations and delete truly dead code - R22-R26: Create constants.rs module, replace 21 hardcoded values across 12 files - R28+R29: LND/DWN timeouts already present — verified - R30-R33: Remove TODO comments, implement marketplace payment check Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
c3d4a7063b
commit
94f2de4a64
@@ -73,7 +73,7 @@ pub async fn get_dwn_status() -> Result<DwnStatusResponse> {
|
||||
.context("Failed to build HTTP client")?;
|
||||
|
||||
let res = client
|
||||
.get("http://127.0.0.1:3100/health")
|
||||
.get(crate::constants::DWN_HEALTH_URL)
|
||||
.send()
|
||||
.await
|
||||
.context("DWN server not reachable")?;
|
||||
@@ -108,7 +108,7 @@ pub async fn sync_with_peers(data_dir: &Path, peer_onions: &[String]) -> Result<
|
||||
state.status = SyncStatus::Syncing;
|
||||
save_sync_state(data_dir, &state).await?;
|
||||
|
||||
let socks_proxy = reqwest::Proxy::all("socks5h://127.0.0.1:9050")
|
||||
let socks_proxy = reqwest::Proxy::all(crate::constants::TOR_SOCKS_PROXY)
|
||||
.context("Failed to create SOCKS proxy")?;
|
||||
|
||||
let client = reqwest::Client::builder()
|
||||
|
||||
Reference in New Issue
Block a user