Skip to content

PM-1257 - handle wipro users payout #61

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

vas3a
Copy link
Collaborator

@vas3a vas3a commented May 22, 2025

https://topcoder.atlassian.net/browse/PM-1257

  • modifies the migration file from when we truncated user_payment_methods to:
    • drop user_default_payment_method table
    • delete everything in user_payment_methods table, except users that have a payment method of either "Trolley" or "wipro payroll".
    • NOTE: this will not run in dev. I'll set the check-sum for the migration in the migration table, otherwise the migration will be out-of-sync.
  • when new payment (winning) is made for payroll (wipro user), sets the wipro payroll payment method for the user (if not already set)
  • prevents wipro user from fetching trolley portal link (so user can't fetch via direct call either)

@vas3a vas3a requested a review from kkartunov May 22, 2025 06:45
@@ -157,6 +157,12 @@ export class TrolleyService {
* @returns A URL string to the Trolley user portal.
*/
async getPortalUrlForUser(user: UserInfo) {
if (user.email.toLowerCase().indexOf('@wipro.com') > -1) {

Choose a reason for hiding this comment

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

medium
correctness
The check for user.email.toLowerCase().indexOf('@wipro.com') > -1 could be improved for clarity and correctness by using user.email.toLowerCase().endsWith('@wipro.com'). This ensures that only emails ending with @wipro.com are matched, avoiding potential false positives.

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