From 673224a100ddf57313867bcb7babd2989c5cb679 Mon Sep 17 00:00:00 2001 From: Tsachi Herman <24438559+tsachiherman@users.noreply.github.com> Date: Thu, 7 Sep 2023 13:29:13 -0400 Subject: [PATCH] update --- cmd/soroban-cli/src/commands/lab/token/wrap.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/soroban-cli/src/commands/lab/token/wrap.rs b/cmd/soroban-cli/src/commands/lab/token/wrap.rs index 799dc618f..cb7fb4a03 100644 --- a/cmd/soroban-cli/src/commands/lab/token/wrap.rs +++ b/cmd/soroban-cli/src/commands/lab/token/wrap.rs @@ -94,7 +94,6 @@ impl Cmd { }))?; let contract_id = vec_to_hash(&res)?; - state.update(&h); self.config.set_state(&state)?; Ok(stellar_strkey::Contract(contract_id.0).to_string()) @@ -136,9 +135,9 @@ impl Cmd { /// /// Might return an error pub fn vec_to_hash(res: &ScVal) -> Result { - if let ScVal::Bytes(res_hash) = &res { + if let ScVal::Address(ScAddress::Contract(res_contract)) = &res { let mut hash_bytes: [u8; 32] = [0; 32]; - for (i, b) in res_hash.iter().enumerate() { + for (i, b) in res_contract.0.iter().enumerate() { hash_bytes[i] = *b; } Ok(Hash(hash_bytes))