@expensify/react-native-wallet 0.1.32 → 0.1.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -111,13 +111,7 @@ class WalletModule internal constructor(context: ReactApplicationContext) :
|
|
|
111
111
|
@ReactMethod
|
|
112
112
|
override fun checkWalletAvailability(promise: Promise) {
|
|
113
113
|
tapAndPayClient.environment.addOnCompleteListener { task ->
|
|
114
|
-
|
|
115
|
-
promise.resolve(true)
|
|
116
|
-
} else {
|
|
117
|
-
promise.resolve(false)
|
|
118
|
-
}
|
|
119
|
-
}.addOnFailureListener { e ->
|
|
120
|
-
promise.reject(E_OPERATION_FAILED, "Checking Wallet availability failed: ${e.localizedMessage}")
|
|
114
|
+
promise.resolve(task.isSuccessful)
|
|
121
115
|
}
|
|
122
116
|
}
|
|
123
117
|
|
package/ios/WalletManager.swift
CHANGED
|
@@ -119,13 +119,16 @@ open class WalletManager: UIViewController {
|
|
|
119
119
|
return
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
presentAddPaymentPassCompletionHandler = completion
|
|
123
122
|
DispatchQueue.main.async {
|
|
124
123
|
if self.addPassViewController == nil {
|
|
124
|
+
self.presentAddPaymentPassCompletionHandler = completion
|
|
125
125
|
self.addPassViewController = enrollViewController
|
|
126
126
|
RCTPresentedViewController()?.present(enrollViewController, animated: true, completion: nil)
|
|
127
127
|
} else {
|
|
128
128
|
self.logInfo(message: "EnrollViewController is already presented.")
|
|
129
|
+
completion(.error, [
|
|
130
|
+
"errorMessage": "EnrollViewController is already presented."
|
|
131
|
+
])
|
|
129
132
|
}
|
|
130
133
|
}
|
|
131
134
|
}
|
|
@@ -165,7 +168,7 @@ open class WalletManager: UIViewController {
|
|
|
165
168
|
let paymentPasses = passLibrary.passes(of: .payment)
|
|
166
169
|
if paymentPasses.isEmpty {
|
|
167
170
|
self.logInfo(message: "No passes found in Wallet.")
|
|
168
|
-
return -1
|
|
171
|
+
return NSNumber(value: -1)
|
|
169
172
|
}
|
|
170
173
|
|
|
171
174
|
for pass in paymentPasses {
|
|
@@ -174,7 +177,7 @@ open class WalletManager: UIViewController {
|
|
|
174
177
|
return NSNumber(value: securePassElement.passActivationState.rawValue)
|
|
175
178
|
}
|
|
176
179
|
}
|
|
177
|
-
return -1
|
|
180
|
+
return NSNumber(value: -1)
|
|
178
181
|
}
|
|
179
182
|
|
|
180
183
|
@objc public func getCardStatusBySuffix(last4Digits: NSString) -> NSNumber {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expensify/react-native-wallet",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.34",
|
|
4
4
|
"description": "A React Native module designed for seamless integration of Card Push Provisioning into Apple Wallet and Google Wallet, enabling easy and secure addition of payment cards directly from your application.",
|
|
5
5
|
"source": "./src/index.tsx",
|
|
6
6
|
"main": "lib/commonjs/index",
|