Skip to content

Commit

Permalink
Merge branch 'master' into smaskell/android-11
Browse files Browse the repository at this point in the history
  • Loading branch information
smaskell-stripe committed Jul 8, 2020
2 parents 6daeb83 + d7c06e0 commit 1c83658
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.stripe.android
import android.content.Context
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.Observer
import androidx.lifecycle.Transformations
import androidx.lifecycle.switchMap
import java.util.Calendar
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
Expand Down Expand Up @@ -38,7 +38,7 @@ internal interface FingerprintDataRepository {
override fun refresh() {
if (Stripe.advancedFraudSignalsEnabled) {
coroutineScope.launch {
Transformations.switchMap(store.get()) { localFingerprintData ->
store.get().switchMap { localFingerprintData ->
if (localFingerprintData == null ||
localFingerprintData.isExpired(timestampSupplier())) {
fingerprintRequestExecutor.execute(
Expand Down

0 comments on commit 1c83658

Please sign in to comment.