Cordova SDK Changelog
3.0.0 (2023-10-10)
Features
-
For users to complete the account opening application, earlier versions users could proceed within the5paisa account opening - native PWA integration removed
partner app. Now, Account opening with 5paisa will take place in the installed browser outside the app.
Dev Improvements
- Removed legacy permissions:
- RECORD_AUDIO
- CALL_PHONE
- CAMERA
- READ_EXTERNAL_STORAGE
- WRITE_EXTERNAL_STORAGE
Intents Impacted: 5paisa leadgen flow.
2.9.1 (2023-02-16)
Dev Improvements
- Added stronger pro guard rules to avoid conflicts with other libraries such as the installreferrer library issue.
2.9.0 (2023-02-16)
Bug Fixes
- Fixed an issue where Add Funds flow would not open in the same browser's Custom Tab as the initial transaction.(Android)
- Fixed an issue where the SDK would throw market_closed 4004 error for Dummy Order flow.(Android & iOS)
- Added missing keys in
OrderBatch
-dummy
&transactionId
.(iOS) - Added
source
key inOrderData
.(iOS) - Fixed an issue preventing smallplug UI from rendering correctly on iOS version 13 and below.(iOS)
- Fixed an issue causing build failures for Xcode 14.x.(iOS)
- Fixed an issue causing build failures when Mixpanel-swift is added as a dependency.(iOS)
2.8.1 (2022-12-14)
Dev Improvements
- Removed legacy permissions: READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE.
Intents Impacted: 5paisa leadgen flow & TRANSACTION
intent.
2.8.0 (2022-11-30)
Features
- New error code 1014 for no_compatible_browser error in transactions. This happens when the user does not have any browsers installed on their device.(android)
- Mutual Funds Holdings Import: Added a feature enabling users to import a snapshot of their Mutual Funds Holdings natively in a seamless manner.
scgateway.triggerMfTransaction(function (res) {
//success callback
}, function (error) {
//error callback
}, [transactionId]);
Bug Fixes
- Removed arm64 architecture from DEBUG build configuration for iOS simulators.
- Permanently removed arm64 architecture from for iOS simulators.
- Fixed an issue causing the SDK to return a hashmap response instead of a JSON response for transactions in PROCESSING state
- Fixed an issue causing the SDK to return a hashmap response instead of a JSON response for SST Limit orders
- Fixed an issue which caused the SDK to return smallcaseAuthToken along with lead status response
- Fixed an issue which prevented the SDK from returning no_browser_found 4005 error for show orders
- Removed the restrictions on transactions to only whitelisted browsers. Now the sdk supports transactions on all browsers, but the user journey can suffer in some cases where the user is not using our recommended browsers.(android)
Intents Impacted: All Transactional Intents.
2.7.0 (2022-08-03)
Features
- The SDK will now share smallcaseAuthToken and broker values in addition to the error message and code for users performing a successful broker login but not completing the intended transaction successfully.
Syntax
{
"data":{
"broker":"kite-leprechaun",
"smallcaseAuthToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzbWFsbGNhc2VBdXRoSWQiOiI2MmVhMzkyODRlZmY1YmM4NjYwYWU0YzYiLCJpYXQiOjE2NTk1MTcyMDYsImV4cCI6MTY1OTUyMDgwNn0.qgYiZCxZxFrlcGgtvKmUqSaTpIyk4H2Mt2XWGfAYXqg"
},
"code":1012,
"message":"user_cancelled"
}
Bug Fixes
- Fixed a build time issue which caused issues with android Method Channel class (android).
- Fixed an issue which caused the SDK to return an error response for a successful SMT transaction.
- Fixed an issue which caused a failure in downloading the rebalance timeline of a smallcase (android).
- Fixed an issue which caused no error data shared for market_closed 4005 and intent_not_enabled_for_broker 3000 errors.
- Fixed an issue which caused the SDK to not share a transactionId post a successful CONNECT transaction.
- Fixed an issue which caused an analytics event to register incorrect property value (android).
- Fixed an issue which caused the iOS SDK to use the overriden value of CFBundleVersionString while deploying an app to the App Store (iOS).
- Removed the default smallcase logo from smallplug header, SDK displays only the back (left) icon if a gateway's smallplug header icon is not available (iOS).
- Fixed an issue which prevented SDK to share smallcaseAuthToken and broker values for consent_denied 1003 and transaction_expired 1005 error (iOS).
- Fixed an issue which caused the SDK to crash for webhook_unreachable 3003 error (iOS).
- Fixed an issue which prevented the SDK from returning the expected error response when a user cancels a transaction just before the transaction timer ends on BP.
Dev improvements
- Added CI release scripts in package.json to streamline the SDK release process
- Removed redundant method to fetch the SDK version from info.plist file
Intents Impacted: All Transactional and Non-Transactional Intents.
2.6.2 (2022-07-05)
Bug Fixes
- No lead status response while navigating from broker chooser
Dev Improvements
- Disabled remote debugging on webViews.
Intents Impacted: All Transactional Intents and smallplug.
2.6.1(2022-06-27)
Bug Fixes
- Fixed an issue which caused MixpanelApi to return a null instance.
- Fixed an issue which caused smallplug to crash for null input arguments.
- Added default header and back icon color in smallplug.
Dev Improvements
- Exceptions raised by Glide are now caught and logged on Sentry.
- removed unnecessary null safe checks in smallplug.
Intents Impacted: All Transactional Intents and smallplug.
2.6.0(2022-06-22)
Features
-
Added partner branding to smallplug. With this new experience your app logos will be very accessible and prominent on all the screens inside smallplug.
-
Syntax:
scgateway.launchSmallplug(function(data) {
//success callback
}, function(error) {
//error callback
}, [targetEndpoint, params, headerColor, headerOpacity, backIconColor, backIconOpacity]);
// headerColor: This is the string HEX value of the color. eg: "#000000"
// headerOpacity: 0 <= value <=1, value should be between 0 and 1.
// backIconColor: This is the string HEX value of the color. eg: "#FFFFFF"
// backIconOpacity: 0 <= value <=1, value should be between 0 and 1.
The refactored smallplug window:
- Integrated Mixpanel sdk to track user events on iOS.
Bug Fixes
- Fixed an issue on ANDROID with apps targeting API 30 and above where pressing the back button on the Chrome Custom Tab(while performing any transactions) would show the transaction loader indefinitely.
- Fixed an issue on ANDROID where pressing the back button on the connect loader would still continue to open the Broker Chooser. Now it cancels the transaction and returns a user_cancelled error.
- Fixed an issue on ANDROID where DM would open if launched during the SDK initialisation process. Now DM will only launch after SDK has FINISHED initialising.
- Fixed an issue on ANDROID where on 5paisa PWA, no response is passed back from the SDK incase of back press.
Intents Impacted: All Transactional and Non Transactional Intents. DM.
2.5.1(2022-05-31)
Bug Fixes
- Excluded arm64 architecture from ios simulator target.
- Fixed an issue which caused Lead Gen to not return any response with 5paisa broker.
- Smallcase Gateway rebranding issue on loading screen.
- Fixed an issue which caused Show Orders feature to throw intent_not_enabled_for_broker 3000 error for connected leprechaun users.
- Fixed an issue which caused login for iframe brokers to fail on STAG.
- Fixed an issue which caused smallplug to crash while launching an URL with
HTTP
scheme andabout:blank
page. - Fixed an issue which caused login for iframe brokers to fail on STAG.
Intents Impacted: All Transactional Intents and Non-Transactional intent.
2.5.0(2022-05-17)
Features
- Added SMT AMO cancellation
- Added SHOW_ORDERS non transactional intent
scgateway.showOrders(function(data) {
//success callback
}, function(error) {
//failure callback
}, []);
Bug Fixes
- Fixed an issue which caused broker chooser to show only 2 brokers when navigated from show_orders to transactional flow
- Lead Gen status response from 5paisa PWA screen and broker redirection screen
- Fixed an issue which caused broker chooser to show more than allowed brokers for show_orders.
- Fixed an issue in show_orders which caused the SDK to launch user investments landing page for iframe brokers like AxisDirect and HDFC Sec.
- Added intent_not_enabled_for_broker 3000 error in case a connected user's broker tries to launch show_orders even if it is not allowed to.
- Fixed an issue which caused files of type .xlsx to fail downloading on smallcase module.
Dev improvements
- Refactored mobile SDK version sent to gateway api.
- Refactored smallcase gateway branding in connect-ui
- Updated copy content in connect-ui.
(for more details, please refer this) - Added a method to expose sdk version to the host module (internal-tracking).
- Compiled the iOS framework with Xcode 13 (Swift 5.5) along with library evolution.
- Fixed an issue which caused broker chooser to show only 1 broker when navigated from an intent with single available broker to an intent with available brokers > 1.
Intents Impacted: All Transactional Intents.
2.4.0(2022-01-19)
Features
-
Added Distribution Module to enable transactions without requiring a transactionId from the consumer. The consumer can launch the distribution module with a custom header text and a custom route along with any parameters.
-
Syntax:
scgateway.launchSmallplug(function(data) {
//success callback
}, function(error) {
//error callback
}, [targetEndpoint, params]);
- Integrated Mixpanel sdk to track user events.
- Integrated Sentry sdk for logging exceptions and unknown error cases.
Bug Fixes
- Fixed an issue which caused an order to cancel when the app was minimised.
- Removed redundant orderConfig while communicating with broker chooser.
- Fixed an issue which caused SMT transactions to fail for a GUEST user.
- Added objc for using smallcase module.
Dev improvements
- Upgraded mrmike ok2curl interceptor library to version 0.7.0.
- Removed deprecated R8 from gradle properties.
- Replaced Coil with Glide library for inflating remote images in ImageView
- Added support for Xcode 13
Intents Impacted : All Transaction Intents.
2.3.0(2021-12-15)
Bug Fixes
- Fixed an issue which caused custom tab to destroy as soon as user navigates away from the app.
- Fixed an issue which caused the sdk to be unresponsive when user clicks on back button on custom tab.
- Fixed title and subtitle for connected users on gateway loading screen.
- Fixed an issue which caused transactions to fail on iFrame brokers.
- Fixed the title text of Axis Direct consent screen for SMT transactions.
- Fixed leprechaun toggle flow in Broker Chooser. Clicking 10 times on Login with your broker will toggle the leprechaun mode for transactions.
- Fixed an issue causing the SDK to return with init_sdk 3004 if the user logged out from the Broker Platform.
- Fixed an issue which caused the Gateway SDK to return with no_broker 1008 code while passing an incorrect broker name during SDK initialisation.
Dev improvements
- Removed redundant network calls to check transactionId status.
- Broker chooser would now close automatically once the transactionId expires (i.e. in 5 minutes)
Intents Impacted : All Transaction Intents.
2.2.0(2021-08-27)
Features
-
Added Lead Id and Lead Status in LeadGen response. SDK will now send the leadId and status of the application in response to triggerLeadGen method invocation.
-
Syntax:
scgateway.triggerLeadGen(function(data) {
// success response
}, function(error) {
// error response
},[params]);
Sample LeadGen response:
{
"leadId":"600988900ccc05c1398f59df",
"status":"PROCESSING"
}
- Added broker name in Transaction responses.
Sample transaction response
{
"data": {
"batches": [
{
"filled": 1,
"variety": "regular",
"buyAmount": 121,
"sellAmount": 0,
"orders": [
{
"orderType": "MARKET",
"product": "CNC",
"exchange": "NSE",
"status": "COMPLETE",
"quantity": 11,
"tradingsymbol": "YESBANK",
"transactionType": "BUY",
"filledQuantity": 11,
"averagePrice": 11,
"exchangeOrderId": "611f4c58053f50b5bca736de611f4ce9053f50b5bca736e2"
}
],
"unplaced": [],
"batchId": "611f4ce96cc52ec2a55af32d",
"quantity": 1,
"status": "COMPLETED",
"completedDate": "2021-08-20T06:34:20.796Z",
"transactionId": "TRX_ac3d3d23eddc45a48c627d32b2fa0282"
}
]
},
"signup": false,
"broker": "kite-leprechaun",
"transactionId": "TRX_ac3d3d23eddc45a48c627d32b2fa0282",
"smallcaseAuthToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzbWFsbGNhc2VBdXRoSWQiOiI2MTFmNGNjNTAwMzIyY2E5NmIxOTVmZDciLCJpYXQiOjE2Mjk0NDEyNjUsImV4cCI6MTYyOTQ0NDg2NX0.sJkUtXGa8jg26XqyMcfHcdpRr_gm27gJ6qfr7NXm_E8"
}
Dev improvements
- Refactored CONNECT Transaction response to a JSON string.
Sample response for a new user on smallcase ecosystem
{
"success":true,
"transaction":"CONNECT",
"data":"{\"broker\":\"kite-leprechaun\",\"signup\":true,\"smallcaseAuthToken\":\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzbWFsbGNhc2VBdXRoSWQiOiI2MTI2MDQxMWE4ZThjMTI5ZTM4ODA5MTMiLCJpYXQiOjE2MzAwNDg4MzQsImV4cCI6MTYzMDA1MjQzNH0.Ym872W6a7SX7iSb-JbTg40l3aR4x0uilKBXuJzp-9m4\"}"
}
Breaking Change
The response for CONNECT Transaction now contains a JSON string for the key data which earlier consisted of only a string value for smallcaseAuthToken.
- Reduced minimum iOS deployment target to 11.0.
- Migrated podspec file to github.
Podfile changes
The source value in the Podfile needs to be updated to : https://github.com/smallcase/cocoapodspecs.git for receiving further updates to gateway iOS sdk.
- Removed hardcoded IP address used for internal testing of jetpack compose.
Bug Fixes
- Fixed an issue which caused the Gateway SDK to return with no_broker 1008 code while passing an incorrect broker name during SDK initialisation.
- Fixed an issue which caused gateway sdk to return with no_broker 1008 code while passing an empty broker list in triggerTransaction method (obj-c).
- Fixed an issue due to which basket name and image on broker chooser were not inflated (obj-c).
- Fixed an issue that caused a race condition while triggering a transaction subsequently while initialising the SDK.
- Fixed an issue that caused Xcode 12 to build arm64 architecture for x86_64 iphone simulator, thereby failing to build with a non-zero exit code.
- Fixed an issue which caused the host app to crash while capturing an image during account opening journey with 5paisa.
- Fixed an issue which caused broker-login to fail on some android devices and responded with error user_cancelled, 1011.
Intents Impacted : CONNECT, SST, SMT, HOLDINGS IMPORT.
2.1.0 (2021-06-2)
Features
-
Broker Logout:
This functionality is used to terminate the smallcase session for the user’s broker.
Example: If a user logged in with kite broker then an active session exists on smallcase.zerodha.com. This method can be used to terminate the broker session on smallcase.zerodha.comIntents Impacted : CONNECT, SST, SMT, HOLDINGS IMPORT.
Platforms Impacted: android, iOSSyntax
scgateway.logout(function(data) {
//Success Callback
}, function(error) {
// Error Callback
},[]);
- Broker Chooser Redesigned
We have now redesigned the look and feel of the broker chooser on gateway. Rather than 9 brokers + dropdown setup, we will now show brokers in the swipeable grid - Swipeable grid: users will now be able to see 8 brokers in the first fold, and a ‘more brokers’ button. Clicking the more button will show the remaining brokers in the next fold. On touch devices, users can swipe over the grid to move back and forth.
- How does this work card: We will now show the user how the user journey looks like. For this, we have a different UI for the first time and returning users.
First Time User: Expanded card above broker grid
Returning User: Collapsed card above broker grid
- Broker order on the grid based on recency of selection : We will now start to store recent brokers per transaction intents in partner app’s local storage. The broker will be ordered in the broker grid based on the recency of selection
- Broker Consent block: Axis consent block will now be displayed on top of the broker grid when Axis is selected. Users can navigate back to the grid with the back button.
Note: In the podfile of your iOS project, update the iOS deployment target to 14.0 if not done already.
-
Basket name and image configuration on order popup & broker chooser for stock transactions
This feature provides an option to the client to pass their custom Basket name and logo/image if any while placing an intent of type TRANSACTION. The order name and order logo will appear on the broker chooser popup & order popup. For this the client needs to pass the following meta object in the orderConfig while creating a transactionIdIntents Impacted : TRANSACTION { type: SECURITIES }
Sample curl below
curl --location --request POST 'https://gatewayapi.stag.smallcase.com/gateway/gatewaydemo/transaction'
--header 'Content-Type: application/json' \
--header 'x-gateway-secret: gatewayDemo_secret' \
--header 'x-gateway-authtoken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJndWVzdCI6InRydWUiLCJpYXQiOjE2MDI1NzAxOTR9.z8XSJbfipFbvpCzdhyKmvf708rUPXp6AJ9VEyPRVdZc' \
--data-raw '{
"intent": "TRANSACTION",
"orderConfig": {
"type": "SECURITIES",
"meta": {
"orderName": "Rockstar Portfolio",
"orderLogo": "https://avatars.dicebear.com/api/bottts/brrr.png"
},
"securities": [
{
"ticker": "INFY",
"quantity": 10,
"type": "BUY"
},
{
"ticker": "TCS",
"quantity": 10,
"type": "BUY"
}
]
}
}'
Result:
- 5paisa account opening - native PWA integration
For users to complete the account opening application, earlier versions users were redirected to the installed browser outside the app. Now, Account opening with 5paisa will take place within the partner app via progresive web app.
Platforms Impacted: android, iOS
Note: To access the camera required during IPV stage of 5paisa account opening, add the key Privacy - Camera Usage Description with a relevant description for the user in your project’s info.plist file
Dev improvements:
- Removed Order In Queue Screen
For SST orders, if an order takes more than 30 seconds to get executed, that order is queued for execution with the broker and the user also receives acknowledgement via a popup.
Intents Impacted : SST
Platforms Impacted: android, iOS