diff --git a/CHANGELOG.md b/CHANGELOG.md index 41170cb2..99c28b1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [7.7.3](https://github.com/smallcase/react-native-smallcase-gateway/compare/v7.7.2...v7.7.3) (2026-10-08) + +### Improvements + +* update Android Gateway SDK to 6.1.5 (Custom Tab service diagnostics, faster SDK launch) +* update iOS Gateway SDK to 7.3.0 (ASWebAuth recovery when the host app's Face ID lock is active, ASWebAuth diagnostics, faster SDK launch) + ### [7.7.2](https://github.com/smallcase/react-native-smallcase-gateway/compare/v7.7.1...v7.7.2) (2026-09-23) ### Improvements diff --git a/README.md b/README.md index cb47c098..93c1076b 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,33 @@ SmallcaseGateway.triggerLeadGen({ email: "test@gmail.com" }); await SmallcaseGateway.launchScWebView("https://www.smallcase.com"); ``` +## Incognito Mode + +`triggerTransaction` accepts an optional 4th `incognito` argument (default `false`): + +```javascript +// execute a transaction in incognito mode +const res = await SmallcaseGateway.triggerTransaction( + transactionId, + utmParams, + brokerList, + true // incognito +); +``` + +When `true`, the broker flow opens in a private/ephemeral browsing session: + +- No cookies, cache, or login state from the flow persist on the device once it closes. +- Native broker app login (e.g. Kite/Zerodha app-to-app login) is skipped in favor of the in-app web login, even if the broker app is installed and would normally be used. + +This is opt-in and fully backward compatible — existing calls to `triggerTransaction(transactionId)`, `triggerTransaction(transactionId, utmParams)`, or `triggerTransaction(transactionId, utmParams, brokerList)` are unaffected and continue to run in normal (non-incognito) mode. + +**Known limitations:** incognito prevents local browser data from persisting, but it does not (and cannot) override OS-level Password AutoFill suggestions already saved to the device's keychain, and it does not affect the smallcase account's own broker-connection state — once a broker is connected (incognito or not), subsequent transactions for that same account will correctly recognize it as already connected, since that state lives on smallcase's backend, not in local browser storage. + +**Requires:** `com.smallcase.gateway:sdk` (Android) and `SCGateway` (iOS) versions with incognito support. Check with the platform SDK release notes for the minimum version once released. + +**Using incognito for a different (e.g. linked/family) account:** `incognito: true` on its own does not switch which smallcase account the SDK is acting as — it only changes how that call's browser session behaves. To connect or transact on behalf of a different smallcase account than the one currently authenticated, call `SmallcaseGateway.init(sdkToken)` again with that account's own token before calling `triggerTransaction` — the same way you would for any account switch, incognito or not. + ## Debug / Contribution Make sure you have react native dev environment set up diff --git a/android/build.gradle b/android/build.gradle index d41b4534..e562712c 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -149,7 +149,7 @@ def kotlin_version = getExtOrDefault('kotlinVersion') dependencies { //noinspection GradleDynamicVersion implementation 'com.facebook.react:react-native:+' // From node_modules - implementation 'com.smallcase.gateway:sdk:6.1.4' + implementation 'com.smallcase.gateway:sdk:6.1.5' implementation 'com.smallcase.loans:sdk:5.4.0' implementation "androidx.core:core-ktx:1.3.1" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" diff --git a/android/src/main/java/com/reactnativesmallcasegateway/SmallcaseGatewayModule.kt b/android/src/main/java/com/reactnativesmallcasegateway/SmallcaseGatewayModule.kt index d9629576..ff4d023f 100644 --- a/android/src/main/java/com/reactnativesmallcasegateway/SmallcaseGatewayModule.kt +++ b/android/src/main/java/com/reactnativesmallcasegateway/SmallcaseGatewayModule.kt @@ -89,7 +89,7 @@ class SmallcaseGatewayModule(reactContext: ReactApplicationContext) : ReactConte } @ReactMethod - fun triggerTransaction(transactionId: String, utmParams: ReadableMap?, brokerList: ReadableArray?, promise: Promise) { + fun triggerTransaction(transactionId: String, utmParams: ReadableMap?, brokerList: ReadableArray?, incognito: Boolean?, promise: Promise) { var safeBrokerList = listOf() @@ -105,6 +105,7 @@ class SmallcaseGatewayModule(reactContext: ReactApplicationContext) : ReactConte activity = activity, transactionId = transactionId, preProvidedBrokers = safeBrokerList, + incognito = incognito ?: false, transactionResponseListener = object : TransactionResponseListener { override fun onSuccess(transactionResult: TransactionResult) { val res = resultToWritableMap(transactionResult, true) diff --git a/ios/SmallcaseGateway.m b/ios/SmallcaseGateway.m index 46c60e4e..1faf4210 100644 --- a/ios/SmallcaseGateway.m +++ b/ios/SmallcaseGateway.m @@ -145,14 +145,17 @@ @interface RCT_EXTERN_MODULE(SmallcaseGateway, NSObject) transactionId:(NSString *)transactionId utmParams:(NSDictionary *)utmParams brokerList:(NSArray *)brokerList + incognito:(nullable NSNumber *)incognito triggerTransactionWithResolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) { dispatch_async(dispatch_get_main_queue(), ^(void) { + BOOL isIncognito = incognito != nil ? [incognito boolValue] : NO; [SCGateway.shared triggerTransactionFlowWithTransactionId:transactionId presentingController:[[[UIApplication sharedApplication] keyWindow] rootViewController] utmParams:utmParams brokerConfig:brokerList + incognito:isIncognito completion: ^(id response, NSError * error) { if (error != nil) { NSMutableDictionary *responseDict = [[NSMutableDictionary alloc] init]; diff --git a/package.json b/package.json index e01a4708..883ed93f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "react-native-smallcase-gateway", "title": "React Native Smallcase Gateway", - "version": "7.7.2", + "version": "7.7.3", "description": "smallcase gateway bindings for react native", "main": "src/index.js", "files": [ diff --git a/react-native-smallcase-gateway.podspec b/react-native-smallcase-gateway.podspec index a15da1d0..337c64f6 100644 --- a/react-native-smallcase-gateway.podspec +++ b/react-native-smallcase-gateway.podspec @@ -34,6 +34,6 @@ Pod::Spec.new do |s| s.dependency "ReactCommon/turbomodule/core" end - s.dependency 'SCGateway', '7.2.2' + s.dependency 'SCGateway', '7.3.0' s.dependency 'SCLoans', '7.5.0' end diff --git a/smart_investing_react_native/ios/Podfile.lock b/smart_investing_react_native/ios/Podfile.lock index 622b192b..9c49c5cc 100644 --- a/smart_investing_react_native/ios/Podfile.lock +++ b/smart_investing_react_native/ios/Podfile.lock @@ -1410,14 +1410,14 @@ PODS: - Yoga - react-native-segmented-control (2.5.7): - React-Core - - react-native-smallcase-gateway (7.6.2): + - react-native-smallcase-gateway (7.7.3): - RCTRequired - RCTTypeSafety - React-Codegen - React-Core - ReactCommon/turbomodule/core - - SCGateway (= 7.2.1) - - SCLoans (= 7.4.0) + - SCGateway (= 7.3.0) + - SCLoans (= 7.5.0) - React-NativeModulesApple (0.79.4): - glog - hermes-engine @@ -1839,8 +1839,8 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - SCGateway (7.2.1) - - SCLoans (7.4.0) + - SCGateway (7.3.0) + - SCLoans (7.5.0) - SocketRocket (0.7.1) - Yoga (0.0.0) @@ -2128,7 +2128,7 @@ SPEC CHECKSUMS: React-microtasksnativemodule: ef2292ca147fa8793305e4693586ad0caf3afad3 react-native-safe-area-context: 562163222d999b79a51577eda2ea8ad2c32b4d06 react-native-segmented-control: bf6e0032726727498e18dd437ae88afcdbc18e99 - react-native-smallcase-gateway: 799618640439c348253f939cc7743818b5502184 + react-native-smallcase-gateway: c287b5e52ca7bbcd36e23a204d00e53b0713d7ea React-NativeModulesApple: da60186ad0aafff031a9bc86b048711d34acc813 React-oscompat: 472a446c740e39ee39cd57cd7bfd32177c763a2b React-perflogger: bbca3688c62f4f39e972d6e21969c95fe441fb6c @@ -2163,8 +2163,8 @@ SPEC CHECKSUMS: RNCClipboard: 37de6995ef72dc869422879e51a46a520d3f08b3 RNGestureHandler: ebef699ea17e7c0006c1074e1e423ead60ce0121 RNScreens: 3f6e41f9f89cb888a6b4b27566bdfdf7a3bf51ad - SCGateway: c18f47d4ae5df3d0189a8b6dbdf7f3503c9f07dc - SCLoans: 87d86efe22a858a151290fb919ad3a7a069c3db3 + SCGateway: 515c32b16c6820f8e0c9f4a936526091e021814e + SCLoans: df8544412d5d22407e173ab7177fa38dc2372306 SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 Yoga: a6cb833e04fb8c59a012b49fb1d040fcb0cbb633 diff --git a/src/SmallcaseGateway.js b/src/SmallcaseGateway.js index b94782e6..4b29f8d1 100644 --- a/src/SmallcaseGateway.js +++ b/src/SmallcaseGateway.js @@ -106,11 +106,18 @@ const init = async (sdkToken, externalMeta) => { * @param {string} transactionId * @param {Object} [utmParams] * @param {Array} [brokerList] + * @param {boolean} [incognito] - when true, opens the broker flow in a private/incognito session that leaves no local browser data behind * @returns {Promise} */ -const triggerTransaction = async (transactionId, utmParams, brokerList) => { +const triggerTransaction = async ( + transactionId, + utmParams, + brokerList, + incognito +) => { const safeUtm = safeObject(utmParams); const safeId = typeof transactionId === 'string' ? transactionId : ''; + const safeIncognito = typeof incognito === 'boolean' ? incognito : false; let safeBrokerList = sanitizeBrokerList(brokerList); @@ -121,7 +128,8 @@ const triggerTransaction = async (transactionId, utmParams, brokerList) => { return SmallcaseGatewayNative.triggerTransaction( safeId, safeUtm, - safeBrokerList + safeBrokerList, + safeIncognito ); }; diff --git a/types/SmallcaseGateway.d.ts b/types/SmallcaseGateway.d.ts index 745013f7..7a4643ae 100644 --- a/types/SmallcaseGateway.d.ts +++ b/types/SmallcaseGateway.d.ts @@ -143,9 +143,10 @@ declare function archiveSmallcase(iscid: string): unknown; * @param {string} transactionId * @param {Object} [utmParams] * @param {Array} [brokerList] + * @param {boolean} [incognito] - when true, opens the broker flow in a private/incognito session that leaves no local browser data behind * @returns {Promise} */ -declare function triggerTransaction(transactionId: string, utmParams?: any, brokerList?: Array): Promise; +declare function triggerTransaction(transactionId: string, utmParams?: any, brokerList?: Array, incognito?: boolean): Promise; /** * triggers a transaction with a transaction id *