@expensify/react-native-wallet 0.1.33 → 0.1.35

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.
package/ios/RNWallet.mm CHANGED
@@ -1,7 +1,7 @@
1
1
  #import <PassKit/PassKit.h>
2
2
  #import "RNWallet.h"
3
3
 
4
- #if RNWallet_USE_FRAMEWORKS
4
+ #if __has_include(<react_native_wallet/react_native_wallet-Swift.h>)
5
5
  #import <react_native_wallet/react_native_wallet-Swift.h>
6
6
  #else
7
7
  #import <react_native_wallet-Swift.h>
@@ -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.33",
3
+ "version": "0.1.35",
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",
@@ -2,17 +2,6 @@ require "json"
2
2
 
3
3
  package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4
4
 
5
- $RNWallet = Object.new
6
-
7
- def $RNWallet._add_compiler_flags(sp, extra_flags)
8
- exisiting_flags = sp.attributes_hash["compiler_flags"]
9
- if exisiting_flags.present?
10
- sp.compiler_flags = exisiting_flags + " #{extra_flags}"
11
- else
12
- sp.compiler_flags = extra_flags
13
- end
14
- end
15
-
16
5
  Pod::Spec.new do |s|
17
6
  s.name = "react-native-wallet"
18
7
  s.version = package["version"]
@@ -29,8 +18,4 @@ Pod::Spec.new do |s|
29
18
  s.dependency "React-Core"
30
19
 
31
20
  install_modules_dependencies(s);
32
-
33
- if ENV['USE_FRAMEWORKS']
34
- $RNWallet._add_compiler_flags(s, "-DRNWallet_USE_FRAMEWORKS=1")
35
- end
36
21
  end