Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
alenmestrov committed Nov 29, 2024
1 parent 4de522c commit 70a3de1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions contracts/icp/context-config/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ impl<T: CandidType + Serialize + DeserializeOwned> ICPSigned<T> {
F: FnOnce(&[u8]) -> R,
{
let bytes = serde_json::to_vec(&payload)?;

let signature = sign(&bytes)
.into_result()
.map_err(ICPSignedError::DerivationError)?;
Expand All @@ -322,7 +322,7 @@ impl<T: CandidType + Serialize + DeserializeOwned> ICPSigned<T> {
F: FnOnce(&T) -> R,
{
let parsed: T = serde_json::from_slice(&self.payload)?;

let signer_id = f(&parsed)
.into_result()
.map_err(ICPSignedError::DerivationError)?;
Expand Down
8 changes: 4 additions & 4 deletions contracts/icp/context-config/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ fn setup() -> (PocketIc, Principal) {
}

fn create_signed_request(signer_key: &SigningKey, request: Request) -> ICPSigned<Request> {
ICPSigned::new(
request,
|bytes| Ok::<_, std::convert::Infallible>(signer_key.sign(bytes).to_vec())
).expect("Failed to create signed request")
ICPSigned::new(request, |bytes| {
Ok::<_, std::convert::Infallible>(signer_key.sign(bytes).to_vec())
})
.expect("Failed to create signed request")
}

fn get_time_nanos(pic: &PocketIc) -> u64 {
Expand Down

0 comments on commit 70a3de1

Please sign in to comment.