Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions android/src/main/java/com/expensify/wallet/WalletModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ class WalletModule internal constructor(context: ReactApplicationContext) :
override fun addCardToGoogleWallet(
data: ReadableMap, promise: Promise
) {
if (pendingPushTokenizePromise != null) {
return promise.reject(E_OPERATION_FAILED, "A tokenization request is already in progress")
}
try {
val cardData = data.toCardData() ?: return promise.reject(E_INVALID_DATA, "Insufficient data")
val cardNetwork = getCardNetwork(cardData.network)
Expand All @@ -210,6 +213,9 @@ class WalletModule internal constructor(context: ReactApplicationContext) :

@ReactMethod
override fun resumeAddCardToGoogleWallet(data: ReadableMap, promise: Promise) {
if (pendingPushTokenizePromise != null) {
return promise.reject(E_OPERATION_FAILED, "A tokenization request is already in progress")
}
try {
val tokenReferenceID = data.getString("tokenReferenceID")
?: return promise.reject(E_INVALID_DATA, "Missing tokenReferenceID")
Expand Down