Skip to content

Commit

Permalink
chore: remove ability for owner to set another MPC contract ID
Browse files Browse the repository at this point in the history
  • Loading branch information
denbite committed Sep 24, 2024
1 parent 5178695 commit ee21945
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ impl Contract {
}
}

#[private]
pub fn set_mpc_contract_id(&mut self, account_id: AccountId) {
self.mpc_contract_id = account_id;
}

pub fn get_mpc_contract_id(&self) -> AccountId {
self.mpc_contract_id.clone()
}
Expand Down Expand Up @@ -198,28 +193,6 @@ mod tests {
setup();
}

#[test]
fn test_set_mpc_contract_id() {
let (mut contract, mut context) = setup();

assert_eq!(contract.get_mpc_contract_id(), signer());

context.predecessor_account_id(current());
testing_env!(context.build());

contract.set_mpc_contract_id(user2());

assert_eq!(contract.get_mpc_contract_id(), user2());
}

#[should_panic]
#[test]
fn test_set_mpc_contract_id_panics_on_wrong_predecessor() {
let (mut contract, _) = setup();

contract.set_mpc_contract_id(user2());
}

#[test]
fn test_register_signature_request() {
let (mut contract, _) = setup();
Expand Down

0 comments on commit ee21945

Please sign in to comment.