Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit 93d51f0

Browse files
committed
fix(format-common): fix incorrect TOTP emission delay
Fixes #2167
1 parent 5c35acd commit 93d51f0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

format-common/src/main/kotlin/app/passwordstore/data/passfile/PasswordEntry.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import dagger.assisted.AssistedFactory
1515
import dagger.assisted.AssistedInject
1616
import kotlin.collections.set
1717
import kotlin.coroutines.coroutineContext
18+
import kotlin.time.Duration.Companion.milliseconds
1819
import kotlin.time.Duration.Companion.seconds
1920
import kotlin.time.ExperimentalTime
2021
import kotlinx.coroutines.awaitCancellation
@@ -63,7 +64,7 @@ constructor(
6364
do {
6465
val otp = calculateTotp()
6566
emit(otp)
66-
delay(ONE_SECOND.seconds)
67+
delay(ONE_SECOND.milliseconds)
6768
} while (coroutineContext.isActive)
6869
} else {
6970
awaitCancellation()

0 commit comments

Comments
 (0)