@expensify/react-native-wallet 0.1.7 → 0.1.9
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/android/build.gradle +1 -1
- package/android/gradle.properties +4 -4
- package/android/src/main/java/com/expensify/wallet/WalletModule.kt +4 -5
- package/android/src/main/java/com/expensify/wallet/components/{AddToWalletButtonManager.kt → RNAddToWalletButtonViewManager.kt} +1 -1
- package/ios/{AddToWalletButtonBridge.m → RNAddToWalletButtonBridge.m} +1 -1
- package/ios/components/{AddToWalletButtonManager.swift → RNAddToWalletButtonManager.swift} +2 -2
- package/lib/commonjs/AddToWalletButton.js +1 -1
- package/lib/commonjs/AddToWalletButton.js.map +1 -1
- package/lib/module/AddToWalletButton.js +1 -1
- package/lib/module/AddToWalletButton.js.map +1 -1
- package/package.json +10 -10
- package/src/AddToWalletButton.tsx +1 -1
- /package/android/src/main/java/com/expensify/wallet/components/{AddToWalletButtonView.kt → RNAddToWalletButtonView.kt} +0 -0
- /package/ios/components/{AddToWalletButtonView.swift → RNAddToWalletButtonView.swift} +0 -0
package/android/build.gradle
CHANGED
|
@@ -8,7 +8,7 @@ buildscript {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
dependencies {
|
|
11
|
-
classpath "com.android.tools.build:gradle:7.
|
|
11
|
+
classpath "com.android.tools.build:gradle:7.3.1"
|
|
12
12
|
// noinspection DifferentKotlinGradleVersion
|
|
13
13
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
14
14
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
Wallet_kotlinVersion=1.
|
|
2
|
-
Wallet_minSdkVersion=
|
|
3
|
-
Wallet_targetSdkVersion=
|
|
4
|
-
Wallet_compileSdkVersion=
|
|
1
|
+
Wallet_kotlinVersion=2.1.20
|
|
2
|
+
Wallet_minSdkVersion=24
|
|
3
|
+
Wallet_targetSdkVersion=36
|
|
4
|
+
Wallet_compileSdkVersion=36
|
|
5
5
|
Wallet_ndkversion=27.1.12297006
|
|
@@ -43,11 +43,10 @@ class WalletModule internal constructor(context: ReactApplicationContext) :
|
|
|
43
43
|
|
|
44
44
|
const val E_SDK_API = "SDK API Error"
|
|
45
45
|
const val E_OPERATION_FAILED = "E_OPERATION_FAILED"
|
|
46
|
-
const val E_NO_TOKENS_AVAILABLE = "E_NO_TOKENS_AVAILABLE"
|
|
47
46
|
const val E_INVALID_DATA = "E_INVALID_DATA"
|
|
48
47
|
}
|
|
49
48
|
|
|
50
|
-
private val activity = currentActivity ?: throw ActivityNotFoundException()
|
|
49
|
+
private val activity = reactApplicationContext.currentActivity ?: throw ActivityNotFoundException()
|
|
51
50
|
private val tapAndPayClient: TapAndPayClient = TapAndPay.getClient(activity)
|
|
52
51
|
private var pendingCreateWalletPromise: Promise? = null
|
|
53
52
|
private var pendingPushTokenizePromise: Promise? = null
|
|
@@ -64,14 +63,14 @@ class WalletModule internal constructor(context: ReactApplicationContext) :
|
|
|
64
63
|
|
|
65
64
|
private val cardListener = object : ActivityEventListener {
|
|
66
65
|
override fun onActivityResult(
|
|
67
|
-
activity: Activity
|
|
66
|
+
activity: Activity, requestCode: Int, resultCode: Int, data: Intent?
|
|
68
67
|
) {
|
|
69
68
|
if (requestCode == REQUEST_CREATE_WALLET) {
|
|
70
69
|
pendingCreateWalletPromise?.resolve(resultCode == RESULT_OK)
|
|
71
70
|
pendingCreateWalletPromise = null
|
|
72
71
|
} else if (requestCode == REQUEST_CODE_PUSH_TOKENIZE) {
|
|
73
72
|
if (resultCode == RESULT_OK) {
|
|
74
|
-
|
|
73
|
+
data?.let {
|
|
75
74
|
val tokenId = it.getStringExtra(TapAndPay.EXTRA_ISSUER_TOKEN_ID).toString()
|
|
76
75
|
sendEvent(
|
|
77
76
|
context,
|
|
@@ -91,7 +90,7 @@ class WalletModule internal constructor(context: ReactApplicationContext) :
|
|
|
91
90
|
}
|
|
92
91
|
}
|
|
93
92
|
|
|
94
|
-
override fun onNewIntent(
|
|
93
|
+
override fun onNewIntent(intent: Intent) {}
|
|
95
94
|
}
|
|
96
95
|
|
|
97
96
|
@ReactMethod
|
|
@@ -6,7 +6,7 @@ import com.facebook.react.uimanager.annotations.ReactProp
|
|
|
6
6
|
|
|
7
7
|
class AddToWalletButtonViewManager : SimpleViewManager<AddToWalletButtonView>() {
|
|
8
8
|
|
|
9
|
-
override fun getName(): String = "
|
|
9
|
+
override fun getName(): String = "RNAddToWalletButton"
|
|
10
10
|
|
|
11
11
|
override fun createViewInstance(reactContext: ThemedReactContext): AddToWalletButtonView {
|
|
12
12
|
return AddToWalletButtonView(reactContext)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#import <React/RCTViewManager.h>
|
|
2
2
|
|
|
3
|
-
@interface RCT_EXTERN_MODULE(
|
|
3
|
+
@interface RCT_EXTERN_MODULE(RNAddToWalletButtonManager, RCTViewManager)
|
|
4
4
|
|
|
5
5
|
RCT_EXPORT_VIEW_PROPERTY(buttonStyle, NSString)
|
|
6
6
|
RCT_EXPORT_VIEW_PROPERTY(borderRadius, CGFloat)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import Foundation
|
|
2
2
|
import React
|
|
3
3
|
|
|
4
|
-
@objc(
|
|
5
|
-
class
|
|
4
|
+
@objc(RNAddToWalletButtonManager)
|
|
5
|
+
class RNAddToWalletButtonManager: RCTViewManager {
|
|
6
6
|
override func view() -> UIView! {
|
|
7
7
|
return AddToWalletButtonView()
|
|
8
8
|
}
|
|
@@ -7,7 +7,7 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
-
const NativeWalletButton = (0, _reactNative.requireNativeComponent)('
|
|
10
|
+
const NativeWalletButton = (0, _reactNative.requireNativeComponent)('RNAddToWalletButton');
|
|
11
11
|
const BUTTON_TYPE_BREAKPOINT = 236;
|
|
12
12
|
const BUTTON_DIMENSIONS = {
|
|
13
13
|
basic: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","e","__esModule","default","NativeWalletButton","requireNativeComponent","BUTTON_TYPE_BREAKPOINT","BUTTON_DIMENSIONS","basic","ios","width","height","android","badge","AddToWalletButton","style","buttonStyle","buttonType","borderRadius","onPress","flattenedStyle","StyleSheet","flatten","currentDimensions","Platform","OS","rest","createElement","TouchableOpacity","activeOpacity","maxWidth","minWidth","styles","touchable","fill","create","justifyContent","alignItems","margin","flex","_default","exports"],"sourceRoot":"../../src","sources":["AddToWalletButton.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAA4F,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAoB5F,MAAMG,kBAA0D,GAAG,IAAAC,mCAAsB,EAAC,
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","e","__esModule","default","NativeWalletButton","requireNativeComponent","BUTTON_TYPE_BREAKPOINT","BUTTON_DIMENSIONS","basic","ios","width","height","android","badge","AddToWalletButton","style","buttonStyle","buttonType","borderRadius","onPress","flattenedStyle","StyleSheet","flatten","currentDimensions","Platform","OS","rest","createElement","TouchableOpacity","activeOpacity","maxWidth","minWidth","styles","touchable","fill","create","justifyContent","alignItems","margin","flex","_default","exports"],"sourceRoot":"../../src","sources":["AddToWalletButton.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAA4F,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAoB5F,M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LC;IACF,CAAC,EACDqB,MAAM,CAACC,SAAS;EAChB,gBAEFpC,MAAA,CAAAM,OAAA,CAAAwB,aAAA,CAACvB,kBAAkB;IACjBW,KAAK,EAAEiB,MAAM,CAACE,IAAK;IACnBlB,WAAW,EAAEA,WAAY;IACzBE,YAAY,EAAEA,YAAa;IAC3BD,UAAU,EAAEA;EAAW,CACxB,CACe,CAAC;AAEvB;AAEA,MAAMe,MAAM,GAAGX,uBAAU,CAACc,MAAM,CAAC;EAC/BF,SAAS,EAAE;IACTG,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBC,MAAM,EAAE;EACV,CAAC;EACDJ,IAAI,EAAE;IACJK,IAAI,EAAE,CAAC;IACP7B,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE;EACV;AACF,CAAC,CAAC;AAAC,IAAA6B,QAAA,GAAAC,OAAA,CAAAtC,OAAA,GAEYW,iBAAiB","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Platform, requireNativeComponent, StyleSheet, TouchableOpacity } from 'react-native';
|
|
3
|
-
const NativeWalletButton = requireNativeComponent('
|
|
3
|
+
const NativeWalletButton = requireNativeComponent('RNAddToWalletButton');
|
|
4
4
|
const BUTTON_TYPE_BREAKPOINT = 236;
|
|
5
5
|
const BUTTON_DIMENSIONS = {
|
|
6
6
|
basic: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Platform","requireNativeComponent","StyleSheet","TouchableOpacity","NativeWalletButton","BUTTON_TYPE_BREAKPOINT","BUTTON_DIMENSIONS","basic","ios","width","height","android","badge","AddToWalletButton","style","buttonStyle","buttonType","borderRadius","onPress","flattenedStyle","flatten","currentDimensions","OS","rest","createElement","activeOpacity","maxWidth","minWidth","styles","touchable","fill","create","justifyContent","alignItems","margin","flex"],"sourceRoot":"../../src","sources":["AddToWalletButton.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAAQC,QAAQ,EAAEC,sBAAsB,EAAEC,UAAU,EAAEC,gBAAgB,QAAO,cAAc;AAoB3F,MAAMC,kBAA0D,GAAGH,sBAAsB,CAAC,
|
|
1
|
+
{"version":3,"names":["React","Platform","requireNativeComponent","StyleSheet","TouchableOpacity","NativeWalletButton","BUTTON_TYPE_BREAKPOINT","BUTTON_DIMENSIONS","basic","ios","width","height","android","badge","AddToWalletButton","style","buttonStyle","buttonType","borderRadius","onPress","flattenedStyle","flatten","currentDimensions","OS","rest","createElement","activeOpacity","maxWidth","minWidth","styles","touchable","fill","create","justifyContent","alignItems","margin","flex"],"sourceRoot":"../../src","sources":["AddToWalletButton.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAAQC,QAAQ,EAAEC,sBAAsB,EAAEC,UAAU,EAAEC,gBAAgB,QAAO,cAAc;AAoB3F,MAAMC,kBAA0D,GAAGH,sBAAsB,CAAC,qBAAqB,CAAC;AAEhH,MAAMI,sBAAsB,GAAG,GAAG;AAClC,MAAMC,iBAAiB,GAAG;EACxBC,KAAK,EAAE;IACLC,GAAG,EAAE;MAACC,KAAK,EAAE,GAAG;MAAEC,MAAM,EAAE;IAAE,CAAC;IAC7BC,OAAO,EAAE;MAACF,KAAK,EAAE,GAAG;MAAEC,MAAM,EAAE;IAAE;EAClC,CAAC;EACDE,KAAK,EAAE;IACLJ,GAAG,EAAE;MAACC,KAAK,EAAE,GAAG;MAAEC,MAAM,EAAE;IAAE,CAAC;IAC7BC,OAAO,EAAE;MAACF,KAAK,EAAE,GAAG;MAAEC,MAAM,EAAE;IAAE;EAClC;AACF,CAAC;AAED,SAASG,iBAAiBA,CAAC;EAACC,KAAK;EAAEC,WAAW,GAAG,OAAO;EAAEC,UAAU,GAAG,OAAO;EAAEC,YAAY,GAAG,CAAC;EAAEC;AAAc,CAAC,EAAE;EACjH,MAAMC,cAAc,GAAGjB,UAAU,CAACkB,OAAO,CAACN,KAAK,CAAC,IAAI,CAAC,CAAC;EACtD,MAAMO,iBAAiB,GAAGf,iBAAiB,CAACU,UAAU,CAAC,CAAChB,QAAQ,CAACsB,EAAE,CAAsB;EACzF,MAAM;IAACb,KAAK,GAAGY,iBAAiB,CAACZ,KAAK;IAAEC,MAAM,GAAGW,iBAAiB,CAACX,MAAM;IAAE,GAAGa;EAAI,CAAC,GAAGJ,cAAc;EAEpG,oBACEpB,KAAA,CAAAyB,aAAA,CAACrB,gBAAgB;IACfe,OAAO,EAAEA,OAAQ;IACjBO,aAAa,EAAE,GAAI;IACnBX,KAAK,EAAE,CACLS,IAAI;IACJ;IACA;IACAP,UAAU,KAAK,OAAO,GAAG;MAACU,QAAQ,EAAErB,sBAAsB,GAAG;IAAC,CAAC,GAAG;MAACsB,QAAQ,EAAEtB;IAAsB,CAAC,EACpG;MACEI,KAAK;MACLC;IACF,CAAC,EACDkB,MAAM,CAACC,SAAS;EAChB,gBAEF9B,KAAA,CAAAyB,aAAA,CAACpB,kBAAkB;IACjBU,KAAK,EAAEc,MAAM,CAACE,IAAK;IACnBf,WAAW,EAAEA,WAAY;IACzBE,YAAY,EAAEA,YAAa;IAC3BD,UAAU,EAAEA;EAAW,CACxB,CACe,CAAC;AAEvB;AAEA,MAAMY,MAAM,GAAG1B,UAAU,CAAC6B,MAAM,CAAC;EAC/BF,SAAS,EAAE;IACTG,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBC,MAAM,EAAE;EACV,CAAC;EACDJ,IAAI,EAAE;IACJK,IAAI,EAAE,CAAC;IACP1B,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE;EACV;AACF,CAAC,CAAC;AAEF,eAAeG,iBAAiB","ignoreList":[]}
|
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.9",
|
|
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",
|
|
@@ -64,14 +64,14 @@
|
|
|
64
64
|
"@commitlint/config-conventional": "^17.0.2",
|
|
65
65
|
"@evilmartians/lefthook": "^1.5.0",
|
|
66
66
|
"@lwc/eslint-plugin-lwc": "^1.7.2",
|
|
67
|
-
"@react-native-community/cli": "
|
|
68
|
-
"@react-native-community/cli-platform-android": "
|
|
69
|
-
"@react-native-community/cli-platform-ios": "
|
|
70
|
-
"@react-native/eslint-config": "0.
|
|
71
|
-
"@react-native/gradle-plugin": "0.
|
|
67
|
+
"@react-native-community/cli": "20.0.0",
|
|
68
|
+
"@react-native-community/cli-platform-android": "20.0.0",
|
|
69
|
+
"@react-native-community/cli-platform-ios": "20.0.0",
|
|
70
|
+
"@react-native/eslint-config": "0.81.0",
|
|
71
|
+
"@react-native/gradle-plugin": "0.81.0",
|
|
72
72
|
"@release-it/conventional-changelog": "^5.0.0",
|
|
73
73
|
"@types/jest": "^29.5.14",
|
|
74
|
-
"@types/react": "^19.
|
|
74
|
+
"@types/react": "^19.1.0",
|
|
75
75
|
"@typescript-eslint/eslint-plugin": "^6.15.0",
|
|
76
76
|
"@typescript-eslint/parser": "^6.15.0",
|
|
77
77
|
"del-cli": "^5.0.0",
|
|
@@ -90,12 +90,12 @@
|
|
|
90
90
|
"eslint-plugin-tsdoc": "^0.2.17",
|
|
91
91
|
"jest": "^29.6.3",
|
|
92
92
|
"prettier": "2.8.8",
|
|
93
|
-
"react": "
|
|
94
|
-
"react-native": "0.
|
|
93
|
+
"react": "19.1.0",
|
|
94
|
+
"react-native": "0.81.0",
|
|
95
95
|
"react-native-builder-bob": "^0.20.0",
|
|
96
96
|
"release-it": "^15.0.0",
|
|
97
97
|
"turbo": "^1.10.7",
|
|
98
|
-
"typescript": "
|
|
98
|
+
"typescript": "^5.8.3"
|
|
99
99
|
},
|
|
100
100
|
"peerDependencies": {
|
|
101
101
|
"react": "*",
|
|
@@ -20,7 +20,7 @@ type Props = {
|
|
|
20
20
|
onPress?: (e: GestureResponderEvent) => void;
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
const NativeWalletButton: HostComponent<NativeWalletButtonProps> = requireNativeComponent('
|
|
23
|
+
const NativeWalletButton: HostComponent<NativeWalletButtonProps> = requireNativeComponent('RNAddToWalletButton');
|
|
24
24
|
|
|
25
25
|
const BUTTON_TYPE_BREAKPOINT = 236;
|
|
26
26
|
const BUTTON_DIMENSIONS = {
|
|
File without changes
|
|
File without changes
|