Update regv2 result field name.

This commit is contained in:
Nicholas Tinsley 2024-05-14 11:12:35 -04:00
parent f570f1f2c4
commit 13bd4a9c74
2 changed files with 5 additions and 5 deletions

View file

@ -42,8 +42,8 @@ sealed class VerificationCodeRequestResult(cause: Throwable?) : RegistrationResu
Success(
sessionId = networkResult.result.body.id,
allowedToRequestCode = networkResult.result.body.allowedToRequestCode,
nextSms = RegistrationRepository.deriveTimestamp(networkResult.result.headers, networkResult.result.body.nextSms),
nextCall = RegistrationRepository.deriveTimestamp(networkResult.result.headers, networkResult.result.body.nextCall)
nextSmsTimestamp = RegistrationRepository.deriveTimestamp(networkResult.result.headers, networkResult.result.body.nextSms),
nextCallTimestamp = RegistrationRepository.deriveTimestamp(networkResult.result.headers, networkResult.result.body.nextCall)
)
}
}
@ -92,7 +92,7 @@ sealed class VerificationCodeRequestResult(cause: Throwable?) : RegistrationResu
}
}
class Success(val sessionId: String, val allowedToRequestCode: Boolean, val nextSms: Long, val nextCall: Long) : VerificationCodeRequestResult(null)
class Success(val sessionId: String, val allowedToRequestCode: Boolean, val nextSmsTimestamp: Long, val nextCallTimestamp: Long) : VerificationCodeRequestResult(null)
class ChallengeRequired(val challenges: List<String>) : VerificationCodeRequestResult(null)

View file

@ -262,8 +262,8 @@ class RegistrationV2ViewModel : ViewModel() {
store.update {
it.copy(
sessionId = sessionResult.sessionId,
nextSms = sessionResult.nextSms,
nextCall = sessionResult.nextCall,
nextSms = sessionResult.nextSmsTimestamp,
nextCall = sessionResult.nextCallTimestamp,
registrationCheckpoint = RegistrationCheckpoint.VERIFICATION_CODE_REQUESTED
)
}