Skip to content

Dev#550

Merged
shubhmjain30 merged 19 commits intomainfrom
dev
Apr 8, 2026
Merged

Dev#550
shubhmjain30 merged 19 commits intomainfrom
dev

Conversation

@shubhmjain30
Copy link
Copy Markdown
Member

Description

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation Update (if none of the other choices apply)

🚨 Checklist:

  • Make sure you are requesting to pull your topic/feature/bugfix branch (right side). Don't request your master!
  • Make sure you are making a pull request against our dev branch (left side). Also, you should start your branch off our dev branch.
  • Your code follows the code style of this project.
  • Your change requires a change to the documentation.
  • You have updated the documentation accordingly.
  • You have read the Contributing Guide.
  • You have self-reviewed your code.
  • You have added unit-tests that prove my fix is effective or that my feature works.
  • Lint and unit-tests pass locally with your changes.
  • You have added necessary comments for complex logic.
  • Any dependent changes have been merged and published in downstream modules.

Further comments

🙏 Thank you!

Thank you for contributing to this project. We appreciate your time and effort. 🎉

- 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.
- 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

# 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.
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
wlc-webapp Ready Ready Comment Apr 8, 2026 5:09pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
satin-uat Ignored Ignored Apr 8, 2026 5:09pm

Request Review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +102 to +104
// TODO: Replace placeholder URLs with confirmed endpoints from backend
const [sendDeleteRecipientOtpCall, isSendingDeleteRecipientOtp] =
useEpsV3Fetch(`${base}/recipient/delete/otp`, { method: "POST" });
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The recipient deletion endpoints are currently using placeholder URLs. These must be updated with the confirmed backend endpoints before this code is deployed to production to prevent runtime errors.

Comment on lines +387 to +388
[selectedServiceType, onCapture, onError]
);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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.

Comment on lines 324 to 328
variant={variant}
keyOverrides={keyOverrides}
valueTransforms={valueTransforms}
rootCollapsible={rootCollapsible}
/>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The magic number 2450 is used here to verify the biometric response type. It is recommended to define this as a named constant (e.g., BIOMETRIC_SUCCESS_RESPONSE_TYPE) in a constants file to improve code readability and maintainability.

Comment on lines +90 to +92
const expandedMeta = historyParametersMetadata.filter(
(col) => !col.visible_in_table
);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The expandedMeta array is derived from static metadata and is being recalculated on every render. Since it doesn't depend on component state or props, it should be moved outside the component definition to improve performance.

Comment on lines +291 to +293
const txnId = Math.floor(
Math.random() * (9999999999999999 - 100000 + 1) + 100000
).toString();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
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
@shubhmjain30 shubhmjain30 merged commit b2cf673 into main Apr 8, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant