Skip to content

Commit 01e2d3a

Browse files
authored
Merge pull request #55 from Foundation-Devices/ql-heartbeat
add heartbeat message
2 parents b831107 + 70933ea commit 01e2d3a

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed

api/src/api/message.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use crate::{
1717
fx::{ExchangeRate, ExchangeRateHistory},
1818
pairing::{PairingRequest, PairingResponse},
1919
scv::SecurityCheck,
20-
status::{DeviceStatus, EnvoyStatus},
20+
status::{DeviceStatus, EnvoyStatus, Heartbeat},
2121
};
2222

2323
#[quantum_link]
@@ -112,4 +112,7 @@ pub enum QuantumLinkMessage {
112112
RestoreMagicBackupEvent(RestoreMagicBackupEvent),
113113
#[n(30)]
114114
RestoreMagicBackupResult(RestoreMagicBackupResult),
115+
116+
#[n(31)]
117+
Heartbeat(Heartbeat),
115118
}

api/src/api/status.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ pub struct EnvoyStatus {
1313
#[n(0)]
1414
pub version: String,
1515
}
16+
17+
#[quantum_link]
18+
pub struct Heartbeat {}

api/tests/golden_tests.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,3 +539,8 @@ fn golden_restore_magic_backup_result_error() {
539539
},
540540
));
541541
}
542+
543+
#[test]
544+
fn golden_heartbeat() {
545+
assert_golden!(QuantumLinkMessage::Heartbeat(Heartbeat {}))
546+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
source: api/tests/golden_tests.rs
3+
expression: hex.clone()
4+
---
5+
82181fa0

0 commit comments

Comments
 (0)