Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
alenmestrov committed Dec 2, 2024
1 parent 28a20c5 commit dbc924a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crates/context/config/src/client/env/config/mutate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ impl<'a> Method<Icp> for Mutate<'a> {
let request = ICPRequest::new(signer_sk.verifying_key().rt()?, self.kind.into());

let signed = ICPSigned::new(request, |b| signer_sk.sign(b))?;

let encoded = candid::encode_one(&signed)?;

Ok(encoded)
Expand Down
8 changes: 4 additions & 4 deletions crates/context/config/src/client/protocol/icp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,16 +234,16 @@ impl Network {
match candid::decode_one::<Result<(), String>>(&data) {
Ok(decoded) => {
match decoded {
Ok(()) => Ok(vec![]), // Return empty vec for success
Err(err_msg) => Ok(err_msg.into_bytes()) // Return error message as bytes
Ok(()) => Ok(vec![]), // Return empty vec for success
Err(err_msg) => Ok(err_msg.into_bytes()), // Return error message as bytes
}
},
}
Err(e) => {
println!("Failed to decode: {}", e);
Ok(e.to_string().into_bytes()) // Return decode error as bytes
}
}
},
}
Ok(CallResponse::Poll(_)) => Ok("Unexpected polling response".as_bytes().to_vec()),
Err(err) => Ok(err.to_string().into_bytes()),
}
Expand Down

0 comments on commit dbc924a

Please sign in to comment.