Skip to content

Commit

Permalink
running lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jumaallan committed Jul 19, 2023
1 parent c5c1b48 commit 9cccbe0
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ enum class OtpDeliveryMode {
}

enum class BvnCountry(val country: String) {
NIGERIA("NG")
NIGERIA("NG"),
}

enum class CountryIdType(val idType: String) {
NIGERIA_BVN("BVN_MFA")
}
NIGERIA_BVN("BVN_MFA"),
}
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ fun BvnInputScreen(
Text(text = stringResource(id = R.string.si_continue))
}
AnimatedVisibility(visible = uiState.showLoading) {
CircularProgressIndicator(modifier = Modifier.align(alignment = Alignment.CenterHorizontally))
CircularProgressIndicator(
modifier = Modifier.align(alignment = Alignment.CenterHorizontally),
)
}
if (showAttribution) {
SmileIDAttribution()
Expand Down
2 changes: 1 addition & 1 deletion lib/src/main/java/com/smileidentity/models/Bvn.kt
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@ data class SubmitBvnToptResponse(
val success: Boolean,
@Json(name = "timestamp")
val timestamp: String,
)
)
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,17 @@ interface SmileIDService {
* Returns the different modes of getting the BVN OTP, either via sms or email
*/
@POST("/v1/totp_consent")
suspend fun requestBvnTotp(@Body bvnToptRequest: BvnToptRequest): BvnToptResponse
suspend fun requestBvnTotp(@Body request: BvnToptRequest): BvnToptResponse

/**
* Returns the BVN OTP via the selected mode
*/
@POST("/v1/totp_consent/mode")
suspend fun requestBvnTotpMode(@Body bvnToptModeRequest: BvnToptModeRequest): BvnToptModeResponse
suspend fun requestBvnTotpMode(@Body request: BvnToptModeRequest): BvnToptModeResponse

/**
* Submits the BVN OTP for verification
*/
@POST("/v1/totp_consent/otp")
suspend fun submitBvnTotp(@Body submitBvnToptRequest: SubmitBvnToptRequest): SubmitBvnToptResponse
suspend fun submitBvnTotp(@Body request: SubmitBvnToptRequest): SubmitBvnToptResponse
}
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class BvnConsentViewModel : ViewModel() {
signature = authResponse.signature,
timestamp = authResponse.timestamp,
)
val response = SmileID.api.requestBvnTotp(bvnToptRequest = bvnToptRequest)
val response = SmileID.api.requestBvnTotp(request = bvnToptRequest)
_uiState.update {
it.copy(
showLoading = false,
Expand Down Expand Up @@ -150,7 +150,7 @@ class BvnConsentViewModel : ViewModel() {
signature = authResponse.signature,
timestamp = authResponse.timestamp,
)
val response = SmileID.api.requestBvnTotpMode(bvnToptModeRequest = bvnToptModeRequest)
val response = SmileID.api.requestBvnTotpMode(request = bvnToptModeRequest)
if (response.success) {
_uiState.update {
it.copy(
Expand Down Expand Up @@ -195,7 +195,7 @@ class BvnConsentViewModel : ViewModel() {
signature = authResponse.signature,
timestamp = authResponse.timestamp,
)
val response = SmileID.api.submitBvnTotp(submitBvnToptRequest = submitBvnToptRequest)
val response = SmileID.api.submitBvnTotp(request = submitBvnToptRequest)
_uiState.getAndUpdate {
if (it.showWrongOtp) {
it.copy(
Expand Down

0 comments on commit 9cccbe0

Please sign in to comment.