Skip to content

Commit

Permalink
fix: proxy contract selection
Browse files Browse the repository at this point in the history
  • Loading branch information
MatejVukosav committed Nov 8, 2024
1 parent b774674 commit 0f14436
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions crates/context/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1078,14 +1078,19 @@ impl ContextManager {
bail!("No private key found for signer");
};

let proxy_contract = self.get_proxy_contract(context_id).await?;
let _ = self
.config_client
.mutate::<ContextProxy>(
context_config.protocol.as_ref().into(),
context_config.network.as_ref().into(),
context_config.contract.as_ref().into(),
proxy_contract.into(),
)
.propose(
proposal_id,
signer_id.rt().expect("infallible conversion"),
actions,
)
.propose(proposal_id, signer_id.rt().unwrap(), actions)
.send(signing_key)
.await?;

Expand All @@ -1111,14 +1116,15 @@ impl ContextManager {
bail!("No private key found for signer");
};

let proxy_contract = self.get_proxy_contract(context_id).await?;
let _ = self
.config_client
.mutate::<ContextProxy>(
context_config.protocol.as_ref().into(),
context_config.network.as_ref().into(),
context_config.contract.as_ref().into(),
proxy_contract.into(),
)
.approve(signer_id.rt().unwrap(), proposal_id)
.approve(signer_id.rt().expect("infallible conversion"), proposal_id)
.send(signing_key)
.await?;

Expand Down

0 comments on commit 0f14436

Please sign in to comment.