Skip to content

Commit

Permalink
bump gevulot-rs and expose the generated id when submitting a pin wit…
Browse files Browse the repository at this point in the history
…hout cid (#26)

* bump gevulot-rs and expose the generated id when submitting a pin without cid

* use tag for mia-installer
  • Loading branch information
trusch authored Dec 9, 2024
1 parent bd5d684 commit 3f225b2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 38 deletions.
39 changes: 5 additions & 34 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description = "Gevulot Control CLI"
# TODO: change rev to tag when available
# NOTE: this revision is aligned with `mia-installer` dependency.
# Be careful changing it.
gevulot-rs = { git = "https://github.com/gevulotnetwork/gevulot-rs.git", rev = "f6657f57771b1c549a83cfe6fc822c3db687707e" }
gevulot-rs = { git = "https://github.com/gevulotnetwork/gevulot-rs.git", rev = "e972c7c73a88182d22121a995f01abed04dff106" }

bip32 = "0.5.1"
clap = { version = "4", features = ["env", "cargo"] }
Expand All @@ -26,7 +26,7 @@ tokio = { version = "1", features = ["full"] }
toml = "0.8.19"

[target.'cfg(target_os = "linux")'.dependencies]
mia-installer = { git = "https://github.com/gevulotnetwork/mia.git", tag = "mia-installer-0.2.3" }
mia-installer = { git = "https://github.com/gevulotnetwork/mia.git", tag = "mia-installer-0.2.4"}

anyhow = "1"
log = "0.4.22"
Expand Down
5 changes: 3 additions & 2 deletions src/commands/pins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ pub async fn create_pin(_sub_m: &clap::ArgMatches) -> Result<(), Box<dyn std::er
.ok_or("No address found, did you set a mnemonic?")?;

// Create the pin using the MsgCreatePinBuilder
client
let resp = client
.pins
.create(
MsgCreatePinBuilder::default()
Expand All @@ -87,7 +87,8 @@ pub async fn create_pin(_sub_m: &clap::ArgMatches) -> Result<(), Box<dyn std::er
// Replace println with print_object for consistent formatting
print_object(_sub_m, &serde_json::json!({
"status": "success",
"message": format!("Created pin with CID: {}", &pin.spec.cid)
"message": format!("Created pin with id: {}", resp.id),
"id": resp.id,
}))?;
Ok(())
}
Expand Down

0 comments on commit 3f225b2

Please sign in to comment.