Skip to content

Commit

Permalink
Minor fixes to entropy-client needed for updating the status page (#1092
Browse files Browse the repository at this point in the history
)

* Use sr25519::Signature from sp-core, not subxt

* Fix conversion of sr25519::Pair to AccountId32 (subxt)
  • Loading branch information
ameba23 authored Oct 2, 2024
1 parent 25ffaac commit cbafc15
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions crates/client/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,12 @@ use base64::prelude::{Engine, BASE64_STANDARD};
use entropy_protocol::RecoverableSignature;
use entropy_shared::HashingAlgorithm;
use futures::stream::StreamExt;
use sp_core::{sr25519, Pair};
use sp_core::{
sr25519::{self, Signature},
Pair,
};
use subxt::{
backend::legacy::LegacyRpcMethods,
ext::sp_core::sr25519::Signature,
utils::{AccountId32 as SubxtAccountId32, H256},
Config, OnlineClient,
};
Expand Down Expand Up @@ -327,7 +329,7 @@ pub async fn put_register_request_on_chain(
let registered_event = registered_events
.find::<entropy::registry::events::AccountRegistered>()
.flatten()
.find_map(|event| (event.0 == signature_request_keypair.public().into()).then_some(event))
.find_map(|event| (event.0 == signature_request_keypair.public().0.into()).then_some(event))
.ok_or(ClientError::NotRegistered);

registered_event
Expand Down

0 comments on commit cbafc15

Please sign in to comment.