Skip to content

Commit

Permalink
fix: broken build (#2382)
Browse files Browse the repository at this point in the history
  • Loading branch information
ohassine authored Oct 31, 2023
1 parent f94ee95 commit c340d50
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,16 @@ class DeviceDetailsViewModel @Inject constructor(
}

private fun getE2eiCertificate() {
val certificate = e2eiCertificate(deviceId)
state = if (certificate is GetE2EICertificateUseCaseResult.Success) {
state.copy(
isE2eiCertificateActivated = true,
e2eiCertificate = certificate.certificate
)
} else {
state.copy(isE2eiCertificateActivated = false)
viewModelScope.launch {
val certificate = e2eiCertificate(deviceId)
state = if (certificate is GetE2EICertificateUseCaseResult.Success) {
state.copy(
isE2eiCertificateActivated = true,
e2eiCertificate = certificate.certificate
)
} else {
state.copy(isE2eiCertificateActivated = false)
}
}
}

Expand Down

0 comments on commit c340d50

Please sign in to comment.