@exodus/react-native-wallet 0.1.16 → 0.1.18

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.
@@ -67,10 +67,6 @@ android {
67
67
  }
68
68
  }
69
69
 
70
- lintOptions {
71
- disable "GradleCompatible"
72
- }
73
-
74
70
  compileOptions {
75
71
  sourceCompatibility JavaVersion.VERSION_1_8
76
72
  targetCompatibility JavaVersion.VERSION_1_8
@@ -121,6 +121,7 @@ class WalletModule internal constructor(context: ReactApplicationContext) :
121
121
  override fun checkWalletAvailability(promise: Promise) {
122
122
  tapAndPayClient.environment.addOnCompleteListener { task ->
123
123
  promise.resolve(task.isSuccessful)
124
+ }
124
125
  }
125
126
 
126
127
  @ReactMethod
package/ios/RNWallet.mm CHANGED
@@ -7,7 +7,6 @@
7
7
  #import <react_native_wallet-Swift.h>
8
8
  #endif
9
9
 
10
-
11
10
  @interface RNWallet () <WalletDelegate>
12
11
  @end
13
12
 
@@ -34,17 +33,33 @@ RCT_REMAP_METHOD(checkWalletAvailability,
34
33
  }
35
34
 
36
35
  RCT_REMAP_METHOD(IOSPresentAddPaymentPassView,
36
+ #if RCT_NEW_ARCH_ENABLED
37
37
  IOSPresentAddPaymentPassView:(JS::NativeWallet::IOSCardData &)cardData
38
+ #else
39
+ IOSPresentAddPaymentPassView:(NSDictionary *)cardData
40
+ #endif
38
41
  resolve:(RCTPromiseResolveBlock)resolve
39
42
  reject:(RCTPromiseRejectBlock)reject)
40
43
  {
41
44
  @try {
42
- NSDictionary *cardDataDict = @{
45
+ NSDictionary *cardDataDict = nil;
46
+
47
+ #if RCT_NEW_ARCH_ENABLED
48
+ cardDataDict = @{
43
49
  @"network": [self safeString:cardData.network()],
44
50
  @"cardHolderName": [self safeString:cardData.cardHolderName()],
45
51
  @"lastDigits": [self safeString:cardData.lastDigits()],
46
52
  @"cardDescription": [self safeString:cardData.cardDescription()],
47
53
  };
54
+ #else
55
+ cardDataDict = @{
56
+ @"network": [self safeString:cardData[@"network"]],
57
+ @"cardHolderName": [self safeString:cardData[@"cardHolderName"]],
58
+ @"lastDigits": [self safeString:cardData[@"lastDigits"]],
59
+ @"cardDescription": [self safeString:cardData[@"cardDescription"]],
60
+ };
61
+ #endif
62
+
48
63
  dispatch_async(dispatch_get_main_queue(), ^{
49
64
  [self->walletManager IOSPresentAddPaymentPassViewWithCardData:cardDataDict completion:^(OperationResult result, NSDictionary* data) {
50
65
  [self handleWalletResponse:result data:data completedBlock:resolve errorPrefix:@"present_payment_pass_view_failed" defaultErrorMessage:@"Failed to present the payment pass view" rejecter:reject];
@@ -56,16 +71,31 @@ RCT_REMAP_METHOD(IOSPresentAddPaymentPassView,
56
71
  }
57
72
 
58
73
  RCT_REMAP_METHOD(IOSHandleAddPaymentPassResponse,
74
+ #if RCT_NEW_ARCH_ENABLED
59
75
  IOSHandleAddPaymentPassResponse:(JS::NativeWallet::IOSEncryptPayload &)payload
76
+ #else
77
+ IOSHandleAddPaymentPassResponse:(NSDictionary *)payload
78
+ #endif
60
79
  resolve:(RCTPromiseResolveBlock)resolve
61
80
  reject:(RCTPromiseRejectBlock)reject)
62
81
  {
63
82
  @try {
64
- NSDictionary *payloadDict = @{
83
+ NSDictionary *payloadDict = nil;
84
+
85
+ #if RCT_NEW_ARCH_ENABLED
86
+ payloadDict = @{
65
87
  @"encryptedPassData": [self safeString:payload.encryptedPassData()],
66
88
  @"activationData": [self safeString:payload.activationData()],
67
89
  @"ephemeralPublicKey": [self safeString:payload.ephemeralPublicKey()],
68
90
  };
91
+ #else
92
+ payloadDict = @{
93
+ @"encryptedPassData": [self safeString:payload[@"encryptedPassData"]],
94
+ @"activationData": [self safeString:payload[@"activationData"]],
95
+ @"ephemeralPublicKey": [self safeString:payload[@"ephemeralPublicKey"]],
96
+ };
97
+ #endif
98
+
69
99
  dispatch_async(dispatch_get_main_queue(), ^{
70
100
  [self->walletManager IOSHandleAddPaymentPassResponseWithPayload:payloadDict completion:^(OperationResult result, NSDictionary* data) {
71
101
  [self handleWalletResponse:result data:data completedBlock:resolve errorPrefix:@"add_card_failed" defaultErrorMessage:@"Failed to add the card to the wallet" rejecter:reject];
@@ -93,7 +123,15 @@ RCT_REMAP_METHOD(getCardStatusByIdentifier,
93
123
  resolve([walletManager getCardStatusByIdentifierWithIdentifier:identifier]);
94
124
  }
95
125
 
96
- - (void)addCardToGoogleWallet:(JS::NativeWallet::AndroidCardData &)cardData resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
126
+ - (void)addCardToGoogleWallet:
127
+ #if RCT_NEW_ARCH_ENABLED
128
+ (JS::NativeWallet::AndroidCardData &)cardData
129
+ #else
130
+ (NSDictionary *)cardData
131
+ #endif
132
+ resolve:(RCTPromiseResolveBlock)resolve
133
+ reject:(RCTPromiseRejectBlock)reject
134
+ {
97
135
  // no-op
98
136
  }
99
137
 
@@ -149,5 +187,4 @@ RCT_REMAP_METHOD(getCardStatusByIdentifier,
149
187
  }
150
188
  #endif
151
189
 
152
-
153
190
  @end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/react-native-wallet",
3
- "version": "0.1.16",
3
+ "version": "0.1.18",
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",
@@ -35,8 +35,7 @@
35
35
  "lint:example": "eslint example --ext .js,.ts,.tsx",
36
36
  "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
37
37
  "prepare": "bob build",
38
- "build:watch": "nodemon --watch src --ext .ts,.tsx,.css --exec \"rm -f .build_complete && npm run prepare && npm pack && touch .build_complete\"",
39
- "release": "release-it"
38
+ "build:watch": "nodemon --watch src --ext .ts,.tsx,.css --exec \"rm -f .build_complete && npm run prepare && npm pack && touch .build_complete\""
40
39
  },
41
40
  "keywords": [
42
41
  "react-native",
@@ -47,16 +46,12 @@
47
46
  "type": "git",
48
47
  "url": "git+https://github.com/ExodusForks/react-native-wallet.git"
49
48
  },
50
- "author": "Expensify, Inc.",
49
+ "author": "Exodus Movement, Inc.",
51
50
  "license": "MIT",
52
51
  "bugs": {
53
- "url": "https://github.com/Expensify/react-native-wallet/issues"
54
- },
55
- "homepage": "https://github.com/Expensify/react-native-wallet#readme",
56
- "publishConfig": {
57
- "registry": "https://registry.npmjs.org/",
58
- "access": "public"
52
+ "url": "https://github.com/ExodusForks/react-native-wallet/issues"
59
53
  },
54
+ "homepage": "https://github.com/ExodusForks/react-native-wallet#readme",
60
55
  "devDependencies": {
61
56
  "@babel/preset-env": "^7.25.3",
62
57
  "@babel/preset-react": "^7.18.6",
@@ -68,7 +63,6 @@
68
63
  "@react-native-community/cli-platform-ios": "20.0.0",
69
64
  "@react-native/eslint-config": "0.81.0",
70
65
  "@react-native/gradle-plugin": "0.81.0",
71
- "@release-it/conventional-changelog": "^5.0.0",
72
66
  "@types/jest": "^29.5.14",
73
67
  "@types/react": "^19.1.0",
74
68
  "@typescript-eslint/eslint-plugin": "^6.15.0",
@@ -92,7 +86,6 @@
92
86
  "react": "19.1.0",
93
87
  "react-native": "0.81.0",
94
88
  "react-native-builder-bob": "^0.20.0",
95
- "release-it": "^15.0.0",
96
89
  "turbo": "^1.10.7",
97
90
  "typescript": "^5.8.3"
98
91
  },
@@ -115,23 +108,6 @@
115
108
  "@commitlint/config-conventional"
116
109
  ]
117
110
  },
118
- "release-it": {
119
- "git": {
120
- "commitMessage": "chore: release ${version}",
121
- "tagName": "v${version}"
122
- },
123
- "npm": {
124
- "publish": true
125
- },
126
- "github": {
127
- "release": true
128
- },
129
- "plugins": {
130
- "@release-it/conventional-changelog": {
131
- "preset": "angular"
132
- }
133
- }
134
- },
135
111
  "react-native-builder-bob": {
136
112
  "source": "src",
137
113
  "output": "lib",