Skip to content

Dev#541

Merged
shubhmjain30 merged 9 commits intomainfrom
dev
Apr 1, 2026
Merged

Dev#541
shubhmjain30 merged 9 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. 🎉

shubhmjain30 and others added 7 commits April 1, 2026 14:43
- Replace addRecipient function with verifySenderBankOtp to streamline
  the OTP verification process.
- Introduce otpRefId state to manage OTP reference ID for verification.
- Adjust loading state to reflect the verification process accurately.
- Add a description to the error toast for failed transactions to provide
  users with more context on the failure. This enhances user experience
  by guiding them on potential next steps.
- Added the 'required' attribute to the amount input label in the LoadWalletStep component.
- This change ensures that users are aware that entering an amount is mandatory for wallet loading.
- Update the success flow for OTP verification to provide user feedback
  through a toast notification and navigate to the wallet dashboard.
- Removed unused code related to beneficiary ID handling to streamline
  the process and improve code clarity.
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 1, 2026

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

Project Deployment Actions Updated (UTC)
wlc-webapp Ready Ready Comment Apr 1, 2026 0:03am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
satin-uat Ignored Ignored Apr 1, 2026 0:03am

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 updates the recipient addition and verification process by integrating the verifySenderBankOtp API and managing otp_ref_id state. It also enhances error reporting in the fund transfer step and adds a required attribute to the amount input in the wallet loading step. The review feedback highlights opportunities to improve type safety by initializing state with empty strings instead of null and using nullish coalescing. Furthermore, there are large blocks of commented-out code in AddRecipientStep.tsx and RecipientsStep.tsx that should be cleaned up, and the shift in user navigation from the fund transfer step to the wallet dashboard needs verification to ensure it aligns with the intended user experience.

Comment thread features/digikhata/page-components/steps/AddRecipientStep.tsx Outdated
Comment thread features/digikhata/page-components/steps/AddRecipientStep.tsx Outdated
Comment on lines +92 to +110
// const recipientData = res.data.data?.recipient;
// const newRecipient = {
// recipient_id: recipientData?.recipient_id ?? 0,
// bank_recipient_id: recipientData?.bank_recipient_id ?? null,
// name: recipientData?.recipient_name ?? recipientName.trim(),
// accountNumber: accountNumber.trim(),
// ifsc: ifsc.trim().toUpperCase(),
// bankName: selectedBank!.label,
// accountType: "Bank Account",
// isVerified: recipientData?.is_verified === 1,
// mobile: recipientMobile.trim(),
// recipientIdType: "acc_ifsc",
// beneficiary_id: res.data.data?.beneficiary_id ?? null,
// isNew: true,
// };
// dispatch({
// type: "ADD_RECIPIENT",
// payload: newRecipient,
// });
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

This block of code is commented out. If the logic for updating the local state is no longer required, please remove it. Otherwise, restore it to ensure the UI remains in sync without needing a full list refresh after adding a recipient.

References
  1. Commented-out code should be removed to maintain code clarity and reduce technical debt.

Comment on lines +130 to +160
dispatch({ type: "SET_STEP", step: "wallet-dashboard" });
// const beneficiaryId = res.data.data?.beneficiary_id;
// if (beneficiaryId) {
// // Update global context so the recipient is fixed
// dispatch({
// type: "UPDATE_RECIPIENT_BENEFICIARY",
// payload: {
// recipient_id: pendingRecipient.recipient_id,
// beneficiary_id: beneficiaryId,
// },
// });

// Set selected and move forward
const updatedRecipient = {
...pendingRecipient,
beneficiary_id: beneficiaryId,
};
dispatch({
type: "SET_SELECTED_RECIPIENT",
payload: updatedRecipient,
});
setIsOtpOpen(false);
dispatch({ type: "SET_STEP", step: "fund-transfer" });
} else {
toast({
title: "Failed to fetch updated beneficiary details",
status: "error",
duration: 4000,
isClosable: true,
});
}
// // Set selected and move forward
// const updatedRecipient = {
// ...pendingRecipient,
// beneficiary_id: beneficiaryId,
// };
// dispatch({
// type: "SET_SELECTED_RECIPIENT",
// payload: updatedRecipient,
// });
// setIsOtpOpen(false);
// dispatch({ type: "SET_STEP", step: "fund-transfer" });
// } else {
// toast({
// title: "Failed to fetch updated beneficiary details",
// status: "error",
// duration: 4000,
// isClosable: true,
// });
// }
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 logic for updating the recipient and navigating to the transfer step is commented out. Additionally, the redirection to wallet-dashboard on line 130 changes the user flow from the previous implementation. Please clean up the dead code and verify if the navigation should still point to fund-transfer after successful verification to maintain a smooth user experience.

References
  1. Commented-out code should be removed to maintain code clarity and reduce technical debt.

shubhmjain30 and others added 2 commits April 1, 2026 17:29
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@shubhmjain30 shubhmjain30 merged commit a9cacf4 into main Apr 1, 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.

2 participants