Skip to content

Commit

Permalink
fix: build
Browse files Browse the repository at this point in the history
  • Loading branch information
frdomovic committed Dec 6, 2024
1 parent 6871025 commit 3c97311
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions crates/context/config/src/client/protocol/icp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ impl Network {
.await
.map_err(|_| IcpError::Custom {
operation: ErrorOperation::Query,
reason: "Failed to fetch root key".to_string(),
reason: "Failed to fetch root key".to_owned(),
})?;

let response = self
Expand All @@ -209,7 +209,7 @@ impl Network {
response.map_or(
Err(IcpError::Custom {
operation: ErrorOperation::Query,
reason: "Error while quering".to_string(),
reason: "Error while quering".to_owned(),
}),
|response| Ok(response),
)
Expand All @@ -226,7 +226,7 @@ impl Network {
.await
.map_err(|_| IcpError::Custom {
operation: ErrorOperation::Mutate,
reason: "Failed to fetch root key".to_string(),
reason: "Failed to fetch root key".to_owned(),
})?;

let response = self
Expand Down
8 changes: 4 additions & 4 deletions crates/context/config/src/icp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ impl TryFrom<ProxyMutateRequest> for ICProxyMutateRequest {
let request = match request {
ProxyMutateRequest::Propose { proposal } => ICProxyMutateRequest::Propose {
proposal: ICProposal {
id: proposal.id.rt().expect("infallible conversion"),
author_id: proposal.author_id.rt().expect("infallible conversion"),
id: proposal.id.rt().map_err(|e| e.to_string())?,
author_id: proposal.author_id.rt().map_err(|e| e.to_string())?,
actions: proposal
.actions
.into_iter()
Expand All @@ -185,8 +185,8 @@ impl TryFrom<ProxyMutateRequest> for ICProxyMutateRequest {
},
ProxyMutateRequest::Approve { approval } => ICProxyMutateRequest::Approve {
approval: ICProposalApprovalWithSigner {
proposal_id: approval.proposal_id.rt().expect("infallible conversion"),
signer_id: approval.signer_id.rt().expect("infallible conversion"),
proposal_id: approval.proposal_id.rt().map_err(|e| e.to_string())?,
signer_id: approval.signer_id.rt().map_err(|e| e.to_string())?,
added_timestamp: approval.added_timestamp,
},
},
Expand Down

0 comments on commit 3c97311

Please sign in to comment.