Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gnd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Inflector = { workspace = true }
semver = { workspace = true }

# Build command
sha1 = "0.10"
sha1 = "0.11"
wasmparser = { workspace = true }

# Interactive prompts
Expand Down
5 changes: 2 additions & 3 deletions gnd/src/commands/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ async fn upload_file_to_ipfs(
let content_hash = {
let mut hasher = Sha1::new();
hasher.update(&content);
format!("{:x}", hasher.finalize())
hex::encode(hasher.finalize())
};

let ipfs_hash = if let Some(hash) = uploaded.content_to_ipfs.get(&content_hash) {
Expand Down Expand Up @@ -911,8 +911,7 @@ fn file_hash(path: &Path) -> Result<String> {
let content = fs::read(path).with_context(|| format!("Failed to read file: {:?}", path))?;
let mut hasher = Sha1::new();
hasher.update(&content);
let result = hasher.finalize();
Ok(format!("{:x}", result))
Ok(hex::encode(hasher.finalize()))
}

#[cfg(test)]
Expand Down
2 changes: 1 addition & 1 deletion gnd/src/commands/test/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ fn deployment_hash_from_path_and_seed(path: &Path, seed: u128) -> Result<Deploym

let input = format!("{}\0{}", path.display(), seed);
let digest = Sha1::digest(input.as_bytes());
let qm = format!("Qm{:x}", digest);
let qm = format!("Qm{}", hex::encode(digest));
DeploymentHash::new(qm).map_err(|e| anyhow!("Failed to create deployment hash: {}", e))
}

Expand Down
Loading