Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
37 changes: 4 additions & 33 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" }
trusch marked this conversation as resolved.
Show resolved Hide resolved
mia-installer = { git = "https://github.com/gevulotnetwork/mia.git", rev = "07ac1b6dbba8969cc09b54a6b68b02fb4f0afbbd" }

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