Skip to content

Commit

Permalink
rebase with fixing error
Browse files Browse the repository at this point in the history
  • Loading branch information
seemenkina committed Jul 25, 2024
1 parent 5ebfbd3 commit 379aca7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions sc_key_store/src/sc_ks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,19 @@ impl<T: Transport + Clone, P: Provider<T, N>, N: Network> SCKeyStoreService
"no key packages".to_string(),
));
}
if self
.does_user_exist(ukp.get_id_from_kp().as_slice())
.await?
{
let user_id = ukp.get_id_from_kp();
if self.does_user_exist(user_id.as_slice()).await? {
return Err(KeyStoreError::AlreadyExistedUserError);
}

let ukp_sc: Vec<KeyPackage> = ukp.into();
for (i, kp_sc) in ukp_sc.iter().enumerate() {
if i == 0 {
let add_user_binding = self
.instance
.addUser(Bytes::copy_from_slice(sign_pk), kp_sc.to_owned());
let add_user_binding = self.instance.addUser(
Address::from_slice(user_id.as_slice()),
Bytes::copy_from_slice(sign_pk),
kp_sc.to_owned(),
);
let res = add_user_binding.send().await;
match res {
Ok(_) => continue,
Expand Down

0 comments on commit 379aca7

Please sign in to comment.