-
Notifications
You must be signed in to change notification settings - Fork 0
PM-1201 - sync payments with legacy #60
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
Conversation
), | ||
); | ||
} | ||
} | ||
}); | ||
|
||
if (transactions.length > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI - needed to update the way the DBtransaction is handled from batch transactions to one big transaction in order to be able to fail the transaction if the legacy update failed (this is happening only for admin updates only, for withdraw, we're just logging the error).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
} | ||
|
||
const payoutData: AdminPaymentUpdateData = { | ||
userId: +winning.winner_id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
high
correctness
Ensure that winning.winner_id
is always a valid number before using the unary plus (+
) operator for type coercion. If winning.winner_id
can be null
or undefined
, this could lead to unexpected results. Consider adding validation or a default value to handle such cases.
https://topcoder.atlassian.net/browse/PM-1201 - Sync payment status to legacy/Informix