Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

rust: document legacy kit wait contract

Neeraj Guptabef1155f2844
diff --git a/mobile/packages/rust/rust/src/api/contacts.rs b/mobile/packages/rust/rust/src/api/contacts.rs
index 02fb5d0d72..9a633eb11e 100644
--- a/mobile/packages/rust/rust/src/api/contacts.rs
+++ b/mobile/packages/rust/rust/src/api/contacts.rs
@@ -286,7 +286,7 @@ pub struct LegacyKitRecoverySession {
pub kit_id: String,
/// Current recovery status.
pub status: LegacyKitRecoveryStatus,
- /// Timestamp when the recovery becomes usable.
+ /// Remaining microseconds until the recovery becomes usable.
pub wait_till: i64,
/// Session creation timestamp.
pub created_at: i64,
diff --git a/rust/e2e/tests/full_e2e.rs b/rust/e2e/tests/full_e2e.rs
index e600afafb8..d5a2f477db 100644
--- a/rust/e2e/tests/full_e2e.rs
+++ b/rust/e2e/tests/full_e2e.rs
@@ -556,6 +556,14 @@ async fn run_legacy_kit_stage(endpoint: &str, owner: &mut legacy_kit::LegacyKitO
waiting_handle.session().status,
LegacyKitRecoveryStatus::Waiting
);
+ assert!(
+ waiting_handle.session().wait_till > 0,
+ "legacy kit waitTill should be remaining wait duration"
+ );
+ assert!(
+ waiting_handle.session().wait_till <= 24 * 60 * 60 * 1_000_000,
+ "legacy kit waitTill should not be an epoch timestamp"
+ );
let resumed_waiting_handle = recovery_client
.open_from_encrypted_challenge(