mirror of
https://github.com/stakwork/sphinx-key.git
synced 2025-12-17 23:34:19 +01:00
update hardware signer for new topics
This commit is contained in:
@@ -112,7 +112,9 @@ pub fn make_client(
|
||||
if topic.ends_with(topics::VLS) {
|
||||
tx.send(CoreEvent::VlsMessage(data))
|
||||
.expect("couldnt send Event::VlsMessage");
|
||||
} else if topic.ends_with(topics::LSS_MSG) {
|
||||
} else if topic.ends_with(topics::LSS_MSG)
|
||||
|| topic.ends_with(topics::INIT_MSG)
|
||||
{
|
||||
log::debug!("received data len {}", data.len());
|
||||
tx.send(CoreEvent::LssMessage(data))
|
||||
.expect("couldnt send Event::LssMessage");
|
||||
|
||||
@@ -35,7 +35,12 @@ pub enum Event {
|
||||
|
||||
pub const ROOT_STORE: &str = "/sdcard/store";
|
||||
|
||||
pub const SUB_TOPICS: &[&str] = &[topics::VLS, topics::LSS_MSG, topics::CONTROL];
|
||||
pub const SUB_TOPICS: &[&str] = &[
|
||||
topics::INIT_MSG,
|
||||
topics::LSS_MSG,
|
||||
topics::VLS,
|
||||
topics::CONTROL,
|
||||
];
|
||||
|
||||
fn mqtt_sub(
|
||||
mqtt: &mut EspMqttClient<ConnState<MessageImpl, EspError>>,
|
||||
|
||||
@@ -26,7 +26,7 @@ pub fn init_lss(
|
||||
let server_pubkey = PublicKey::from_slice(&init.server_pubkey)?;
|
||||
|
||||
let (lss_signer, res1) = LssSigner::new(&handler_builder, &server_pubkey);
|
||||
let lss_res_topic = format!("{}/{}", client_id, topics::LSS_RES);
|
||||
let lss_res_topic = format!("{}/{}", client_id, topics::INIT_RES);
|
||||
mqtt.publish(&lss_res_topic, QOS, false, &res1)
|
||||
.expect("could not publish LSS response");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user