From 8e698b9c926e614b6ffa020d72c00b5ad0d3cf08 Mon Sep 17 00:00:00 2001 From: loziniak Date: Tue, 5 Nov 2024 13:46:00 +0100 Subject: [PATCH] chore(autonomi): unify register name arg type --- autonomi-cli/src/commands/register.rs | 2 +- autonomi/src/client/registers.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/autonomi-cli/src/commands/register.rs b/autonomi-cli/src/commands/register.rs index 0aad3ab844..d8045655f3 100644 --- a/autonomi-cli/src/commands/register.rs +++ b/autonomi-cli/src/commands/register.rs @@ -43,7 +43,7 @@ pub async fn cost(name: &str, peers: Vec) -> Result<()> { let client = crate::actions::connect_to_network(peers).await?; let cost = client - .register_cost(name.to_string(), register_key) + .register_cost(name, register_key) .await .wrap_err("Failed to get cost for register")?; info!("Estimated cost to create a register with name {name}: {cost}"); diff --git a/autonomi/src/client/registers.rs b/autonomi/src/client/registers.rs index 40f79ead0b..731dcce4a2 100644 --- a/autonomi/src/client/registers.rs +++ b/autonomi/src/client/registers.rs @@ -229,7 +229,7 @@ impl Client { /// Get the cost to create a register pub async fn register_cost( &self, - name: String, + name: &str, owner: RegisterSecretKey, ) -> Result { info!("Getting cost for register with name: {name}");