Conversation
- Introduced "face-scan" and "iris-scan" icons to the IconLibrary. - This enhances the icon set available for biometric features in the application.
- Introduced a new prop `rootCollapsible` to allow the root node to be collapsible, enhancing the flexibility of the JSON viewer. - Updated the relevant components to handle the new prop, ensuring that the root node can be toggled based on its state.
- Add ScannerStatus, SetupHelpGuide, and UidaiFingerprintScanner components to facilitate biometric capture for UIDAI services. These components provide user feedback, device setup instructions, and status updates during the scanning process. - Introduce utility functions for handling biometric types and RD service interactions, enhancing modularity and maintainability of the codebase. - Update AndroidUtils to support new iris and face authentication actions. This implementation improves the user experience by providing clear guidance and feedback during biometric scanning operations.
- Introduce a new test component for the UidaiFingerprintScanner to validate fingerprint capture functionality. This allows for testing the integration and behavior of the fingerprint scanner within the application.
- Added support for biometric verification in the Aadhaar verification step, allowing users to choose between OTP and biometric methods. - Updated state management to handle the selected KYC method and integrated fingerprint scanning functionality. - Modified reducer and API hooks to accommodate new biometric validation logic.
- Update Aadhaar verification logic to include response type check alongside status validation. This ensures that the correct step is dispatched based on the specific response type received from the server, improving the accuracy of the verification process.
…actor/digikhata
- Added print media queries to hide specific UI elements in the DigiKhata flow and fund transfer steps. This ensures a cleaner print output and improves user experience when printing transaction details.
- Added descriptions to error toast messages across multiple steps in the DigiKhata component to provide users with more context on failures. - This change improves user experience by clarifying the reasons for errors encountered during operations.
- Introduced an info note to inform users about the maximum number of beneficiaries they can add per day and in total. This enhances user experience by providing clear guidelines on beneficiary management.
- Add deleteRecipient API call to handle recipient removal. - Update reducer to manage recipient state upon deletion. - Enhance RecipientsStep component to include delete functionality with user feedback on success or failure.
- Implement the ability to send and verify OTP for deleting a recipient. - Update the UI to handle OTP submission and display appropriate feedback. - This enhances user experience by allowing secure deletion of recipients.
- Introduce interactive behavior for JSON nodes by enabling click and keyboard navigation only when nodes are not empty and toggleable. - This improves user experience by providing clear visual feedback and interaction capabilities for expandable JSON structures.
- Extract MethodCard component to improve code reusability and readability. - This change simplifies the AadhaarVerificationStep component by reducing duplication of UI code for the verification method selection.
…actor/digikhata
…actor/digikhata # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
Refactor/digikhata
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Code Review
This pull request implements biometric verification (fingerprint, face, and iris) for the DigiKhata KYC process, introducing a specialized useRDService hook and a suite of UI components for device management. It also adds recipient deletion functionality with OTP verification, enhances the fund transfer status view with receipt printing and sharing, and improves error handling. Key feedback includes replacing placeholder API endpoints, fixing a potential stale closure in the biometric hook, and optimizing performance by moving static metadata definitions outside of component renders. Additionally, it is recommended to avoid magic numbers for response types and to fix a potential integer precision issue in transaction ID generation.
| // TODO: Replace placeholder URLs with confirmed endpoints from backend | ||
| const [sendDeleteRecipientOtpCall, isSendingDeleteRecipientOtp] = | ||
| useEpsV3Fetch(`${base}/recipient/delete/otp`, { method: "POST" }); |
| [selectedServiceType, onCapture, onError] | ||
| ); |
There was a problem hiding this comment.
There is a circular dependency between processCaptureResponse and initiateCapture. To avoid an infinite loop in useCallback dependencies, initiateCapture was omitted from the dependency array of processCaptureResponse (line 387). This creates a stale closure bug: if initiateCapture is updated (e.g., due to a change in uidaiWadh), processCaptureResponse will continue to use the old version of initiateCapture during retries. Consider using a useRef to store the latest version of the capture function to break the circularity safely.
| variant={variant} | ||
| keyOverrides={keyOverrides} | ||
| valueTransforms={valueTransforms} | ||
| rootCollapsible={rootCollapsible} | ||
| /> |
There was a problem hiding this comment.
The rootCollapsible prop is being passed recursively to all child nodes. However, the logic at line 51 (const isRootToggleable = !isRoot || rootCollapsible;) ensures that all non-root nodes are toggleable by default. Passing this prop down to children is unnecessary prop drilling and can be removed.
variant={variant}
keyOverrides={keyOverrides}
valueTransforms={valueTransforms}
/>
|
|
||
| const responseType = res?.data?.response_type_id; | ||
|
|
||
| if (res?.data?.status === 0 && responseType === 2450) { |
| const expandedMeta = historyParametersMetadata.filter( | ||
| (col) => !col.visible_in_table | ||
| ); |
| const txnId = Math.floor( | ||
| Math.random() * (9999999999999999 - 100000 + 1) + 100000 | ||
| ).toString(); |
There was a problem hiding this comment.
The value 9999999999999999 exceeds Number.MAX_SAFE_INTEGER (9,007,199,254,740,991). In JavaScript, integers larger than this limit lose precision, which can lead to unexpected results when generating the txnId. For example, 9999999999999999 evaluates to 10000000000000000. Consider using a smaller range or a string-based random generator.
| const txnId = Math.floor( | |
| Math.random() * (9999999999999999 - 100000 + 1) + 100000 | |
| ).toString(); | |
| const txnId = Math.floor( | |
| Math.random() * (1e15 - 100000 + 1) + 100000 | |
| ).toString(); |
- Adjusted the maximum transfer amount from 200,000 to 49,800 to align with business requirements and prevent excessive transactions.
refactor: update maximum transfer amount limit
Description
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
🚨 Checklist:
Further comments
🙏 Thank you!
Thank you for contributing to this project. We appreciate your time and effort. 🎉