Skip to content

Commit

Permalink
rename local variables
Browse files Browse the repository at this point in the history
  • Loading branch information
yito88 committed Oct 21, 2022
1 parent 74a52a7 commit ea2852e
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions apps/src/lib/client/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1295,16 +1295,18 @@ pub async fn query_storage_value<T>(
where
T: BorshDeserialize,
{
let (value, _proof) =
let (bytes, _proof) =
query_storage_value_bytes(client, key, None, false).await;
match value {
Some(v) => match T::try_from_slice(&v[..]) {
Ok(value) => return Some(value),
Err(err) => eprintln!("Error decoding the value: {}", err),
match bytes {
Some(b) => match T::try_from_slice(&b[..]) {
Ok(value) => Some(value),
Err(err) => {
eprintln!("Error decoding the value: {}", err);
cli::safe_exit(1)
}
},
None => return None,
None => None,
}
cli::safe_exit(1)
}

/// Query a storage value and the proof without decoding.
Expand Down

0 comments on commit ea2852e

Please sign in to comment.