Skip to content

Commit

Permalink
fix: add back missing method (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
ncpenke authored Apr 24, 2024
1 parent b25fd6a commit c81768b
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 c81768b

Please sign in to comment.