Skip to content

Commit

Permalink
fix: bring back new_replica method
Browse files Browse the repository at this point in the history
  • Loading branch information
ncpenke committed Mar 6, 2024
1 parent 94622a3 commit b664e5c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions crates/dscvr-canister-agent/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,18 @@ impl CanisterAgent {
}
}

pub async fn new_replica(
caller: Arc<dyn Identity>,
replica: &str,
canister_id: &str,
) -> Result<Self> {
let agent = Self {
agent: agent_impl::replica_impl::new(caller, replica).await?,
canister_id: Principal::from_text(canister_id)?,
};
Ok(agent)
}

pub async fn clone_with_identity(&self, identity: Arc<dyn Identity>) -> Result<Self> {
Ok(Self {
agent: self.agent.clone_with_identity(identity).await?,
Expand Down

0 comments on commit b664e5c

Please sign in to comment.