From 23182aae6085f5f08a0fc3ad78e7deee4a4bc745 Mon Sep 17 00:00:00 2001 From: Rishabh Jain Date: Wed, 23 Sep 2026 18:12:36 +0530 Subject: [PATCH 1/6] Feat/incognito mode (#201) * feat: add incognito param to triggerTransaction Threads an optional incognito boolean (default false) through all three bridge layers to the new incognito support in the native SDKs: - JS: triggerTransaction(transactionId, utmParams, brokerList, incognito) - Android: new trailing incognito param on the @ReactMethod, forwarded to SmallcaseGatewaySdk.triggerTransaction's incognito param - iOS: new trailing incognito param on the RCT_REMAP_METHOD, forwarded to the triggerTransactionFlow(...incognito:completion:) Obj-C overload Additive/backward-compatible - existing callers passing 1-3 args are unaffected. Requires the native SDK dependency pins (android/build.gradle, react-native-smallcase-gateway.podspec) to point at builds containing the incognito support before this compiles - currently still pinned to stable 6.1.1 / 7.2.0, which predate it. Co-Authored-By: Claude Sonnet 5 * docs: document incognito mode for SDK consumers Adds an Incognito Mode section to the README covering the new triggerTransaction(transactionId, utmParams, brokerList, incognito) parameter - what it does, backward compatibility, and known limitations (AutoFill, account-level connection state). Co-Authored-By: Claude Sonnet 5 * docs: clarify incognito does not switch smallcase accounts Co-Authored-By: Claude Sonnet 5 * chore: pin to feat/incognito-mode native SDK builds Internal test pins for QA against the incognito-mode branch builds, mirroring the existing dark-theme branch pin pattern: - Android: com.smallcase.gateway:sdk-feat-incognito-mode-c1b21c9:6.1.2-3193-release - iOS: SCGateway-feat-incognito-mode-2d15c7b 7.2.0-28-release Co-Authored-By: Claude Sonnet 5 * fix: make incognito genuinely optional at the RN bridge boundary Previously incognito was a required non-nullable param at the native bridge layer (Boolean in Kotlin, BOOL in Objective-C) - it only felt optional to JS callers because src/SmallcaseGateway.js always computed a default before forwarding. That's inconsistent with utmParams/brokerList, which are genuinely nullable at the bridge, and with the native SDKs themselves where incognito is a real default parameter. Now nullable on both platforms (Boolean? / nullable NSNumber *), defaulting to false when absent, so the bridge methods are robust regardless of whether a caller goes through the JS wrapper. Co-Authored-By: Claude Sonnet 5 --------- Co-authored-by: Claude Sonnet 5 --- README.md | 27 +++++++++++++++++++ android/build.gradle | 4 ++- .../SmallcaseGatewayModule.kt | 3 ++- ios/SmallcaseGateway.m | 3 +++ react-native-smallcase-gateway.podspec | 4 ++- src/SmallcaseGateway.js | 12 +++++++-- types/SmallcaseGateway.d.ts | 3 ++- 7 files changed, 50 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 80a9d484..df11f8f0 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,33 @@ const res = await SmallcaseGateway.triggerTransaction(transactionId); SmallcaseGateway.triggerLeadGen({ email: "test@gmail.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 68bb5f72..553b3db9 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -149,7 +149,9 @@ def kotlin_version = getExtOrDefault('kotlinVersion') dependencies { //noinspection GradleDynamicVersion implementation 'com.facebook.react:react-native:+' // From node_modules - implementation 'com.smallcase.gateway:sdk:6.1.1' + // INTERNAL TEST PIN: feat/incognito-mode branch build. + // Revert to: implementation 'com.smallcase.gateway:sdk:6.1.1' + implementation 'com.smallcase.gateway:sdk-feat-incognito-mode-c1b21c9:6.1.2-3193-release' implementation 'com.smallcase.loans:sdk-sourav-native-dark-theme-cb54bf9:5.1.4-92-release' 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 c36f9a6e..46eb0655 100644 --- a/android/src/main/java/com/reactnativesmallcasegateway/SmallcaseGatewayModule.kt +++ b/android/src/main/java/com/reactnativesmallcasegateway/SmallcaseGatewayModule.kt @@ -88,7 +88,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() @@ -104,6 +104,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 fa04027c..edc4976d 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/react-native-smallcase-gateway.podspec b/react-native-smallcase-gateway.podspec index 686d423d..2e0a2543 100644 --- a/react-native-smallcase-gateway.podspec +++ b/react-native-smallcase-gateway.podspec @@ -34,7 +34,9 @@ Pod::Spec.new do |s| s.dependency "ReactCommon/turbomodule/core" end - s.dependency 'SCGateway', '7.2.0' + # INTERNAL TEST PIN: feat/incognito-mode branch build. + # Revert to: s.dependency 'SCGateway', '7.2.0' + s.dependency 'SCGateway-feat-incognito-mode-2d15c7b', '7.2.0-28-release' # INTERNAL TEST PIN: dark-theme branch build (mirrors the android/build.gradle pin). # Revert to: s.dependency 'SCLoans', '7.2.0' s.dependency 'SCLoans-sourav-native-dark-theme-37c97d9', '7.1.2-45-release' diff --git a/src/SmallcaseGateway.js b/src/SmallcaseGateway.js index b2837d24..1964af7f 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 666eec11..bd36ad2a 100644 --- a/types/SmallcaseGateway.d.ts +++ b/types/SmallcaseGateway.d.ts @@ -142,9 +142,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 * From 78e103357ed2ca3a683f486fcfb64f01013fc3cb Mon Sep 17 00:00:00 2001 From: "Sourav Ganguly (isouravganguly)" Date: Tue, 6 Oct 2026 21:51:23 +0530 Subject: [PATCH 2/6] chore(sample): refresh Podfile.lock for gateway 7.7.2 pins The lockfile inherited from prod still resolved SCGateway 7.2.1 / SCLoans 7.4.0, so `pod install` failed against the podspec's 7.2.2 / 7.5.0 pins. Ran `pod update SCLoans SCGateway`; yarn.lock files were already current. Co-Authored-By: Claude Opus 5.5 --- smart_investing_react_native/ios/Podfile.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/smart_investing_react_native/ios/Podfile.lock b/smart_investing_react_native/ios/Podfile.lock index 622b192b..18542677 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.2): - RCTRequired - RCTTypeSafety - React-Codegen - React-Core - ReactCommon/turbomodule/core - - SCGateway (= 7.2.1) - - SCLoans (= 7.4.0) + - SCGateway (= 7.2.2) + - 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.2.2) + - 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: 757a7aea96d99afada1f4a91c19e8ce236adc8b9 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: 875897183f536b6b39fc0225b674a8a569bfb45e + SCLoans: df8544412d5d22407e173ab7177fa38dc2372306 SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 Yoga: a6cb833e04fb8c59a012b49fb1d040fcb0cbb633 From 92a5511114b5a4d1bf65b78ba6728348737925c8 Mon Sep 17 00:00:00 2001 From: "Sourav Ganguly (isouravganguly)" Date: Thu, 8 Oct 2026 09:27:06 +0530 Subject: [PATCH 3/6] chore(native): use internal gateway SDK builds for QA Point the wrapper at the internal QA builds of the native gateway SDKs: - Android: com.smallcase.gateway:sdk-release-scg-v6-1-5-loans-v5-4-0-5edb95c:6.1.5-3196-release - iOS: SCGateway-remix 7.3.0-1603-release (cocoapodspec-internal) Loans stays on production 5.4.0 (Android) and 7.5.0 (iOS). Switch both to the production artifacts (Android 6.1.5, iOS 7.3.0) before merging. --- android/build.gradle | 2 +- react-native-smallcase-gateway.podspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index d41b4534..a48f2f2c 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-release-scg-v6-1-5-loans-v5-4-0-5edb95c:6.1.5-3196-release' 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/react-native-smallcase-gateway.podspec b/react-native-smallcase-gateway.podspec index a15da1d0..4376f612 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-remix', '7.3.0-1603-release' s.dependency 'SCLoans', '7.5.0' end From 67cb2f5e4f37970858ca39661017d52d1dfd80c1 Mon Sep 17 00:00:00 2001 From: "Sourav Ganguly (isouravganguly)" Date: Thu, 8 Oct 2026 09:27:13 +0530 Subject: [PATCH 4/6] chore(release): 7.7.3 --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) 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/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": [ From e1c8958ae98394029433a21b9866417b0cafe857 Mon Sep 17 00:00:00 2001 From: "Sourav Ganguly (isouravganguly)" Date: Thu, 8 Oct 2026 15:41:35 +0530 Subject: [PATCH 5/6] chore(native): use production gateway SDKs Switch from the internal QA builds to the production native gateway SDKs: - Android: com.smallcase.gateway:sdk:6.1.5 - iOS: SCGateway 7.3.0 (CocoaPods trunk) Loans is unchanged (Android 5.4.0, iOS 7.5.0). --- android/build.gradle | 2 +- react-native-smallcase-gateway.podspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index a48f2f2c..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-release-scg-v6-1-5-loans-v5-4-0-5edb95c:6.1.5-3196-release' + 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/react-native-smallcase-gateway.podspec b/react-native-smallcase-gateway.podspec index 4376f612..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-remix', '7.3.0-1603-release' + s.dependency 'SCGateway', '7.3.0' s.dependency 'SCLoans', '7.5.0' end From feab138e9c568658ee30e1a75c8b06dde52d7bef Mon Sep 17 00:00:00 2001 From: "Sourav Ganguly (isouravganguly)" Date: Thu, 8 Oct 2026 16:22:51 +0530 Subject: [PATCH 6/6] chore(sample): refresh Podfile.lock for gateway 7.7.3 pins react-native-smallcase-gateway 7.7.2 -> 7.7.3 and SCGateway 7.2.2 -> 7.3.0 (CocoaPods trunk). SCLoans stays at 7.5.0. --- smart_investing_react_native/ios/Podfile.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/smart_investing_react_native/ios/Podfile.lock b/smart_investing_react_native/ios/Podfile.lock index 18542677..9c49c5cc 100644 --- a/smart_investing_react_native/ios/Podfile.lock +++ b/smart_investing_react_native/ios/Podfile.lock @@ -1410,13 +1410,13 @@ PODS: - Yoga - react-native-segmented-control (2.5.7): - React-Core - - react-native-smallcase-gateway (7.7.2): + - react-native-smallcase-gateway (7.7.3): - RCTRequired - RCTTypeSafety - React-Codegen - React-Core - ReactCommon/turbomodule/core - - SCGateway (= 7.2.2) + - SCGateway (= 7.3.0) - SCLoans (= 7.5.0) - React-NativeModulesApple (0.79.4): - glog @@ -1839,7 +1839,7 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - SCGateway (7.2.2) + - 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: 757a7aea96d99afada1f4a91c19e8ce236adc8b9 + react-native-smallcase-gateway: c287b5e52ca7bbcd36e23a204d00e53b0713d7ea React-NativeModulesApple: da60186ad0aafff031a9bc86b048711d34acc813 React-oscompat: 472a446c740e39ee39cd57cd7bfd32177c763a2b React-perflogger: bbca3688c62f4f39e972d6e21969c95fe441fb6c @@ -2163,7 +2163,7 @@ SPEC CHECKSUMS: RNCClipboard: 37de6995ef72dc869422879e51a46a520d3f08b3 RNGestureHandler: ebef699ea17e7c0006c1074e1e423ead60ce0121 RNScreens: 3f6e41f9f89cb888a6b4b27566bdfdf7a3bf51ad - SCGateway: 875897183f536b6b39fc0225b674a8a569bfb45e + SCGateway: 515c32b16c6820f8e0c9f4a936526091e021814e SCLoans: df8544412d5d22407e173ab7177fa38dc2372306 SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 Yoga: a6cb833e04fb8c59a012b49fb1d040fcb0cbb633