-
Notifications
You must be signed in to change notification settings - Fork 0
CM-266 - common creation min contribution #318
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
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.
I'm not getting what this PR is trying to modify. Can you elaborate?
@alexander2001i yeah, took me a few reads of the ticket to understand to motivation here 😅 If you have more questions/suggestions, let me know Ticket: #266 |
@watchtower314 No, I don't. Thanks for the explanation |
links: yup.array(linkValidationSchema).optional() | ||
links: yup.array(linkValidationSchema).optional(), | ||
|
||
zeroContribution: yup.boolean().required(), |
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.
Maybe don't make it required, but rater if not provided set to false
?
|
||
// Check if the request is funded with less than required amount | ||
if (common.metadata.minFeeToJoin > payload.funding) { | ||
if (common.metadata.minFeeToJoin > payload.funding && !common.metadata.zeroContribution) { |
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.
This is not correct, because if zero dollar contributions are allowed it will allow the user to create contribution, lower than the minimum
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.
You're right! I'll fix it, Thank you! :)
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.
You are welcome 😄
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.
Hey @watchtower314 as it's described in the ticket you have removed the Safety Period feature, but here I don't see any logic for that. I think at least you have to check the tests and the validation for the common creation and exclude/remove any logic about that field.
So I haven't removed the safety period, just forced it to be |
|
||
const invalidJoinDataZeroContribution = (commonId: string) => ({ | ||
commonId, | ||
description: 'I wanna be a part, but pay less that $5', |
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.
Typo here: that -> than But no important at all :D
@alexander2001i What's your opinion ? |
Yes, It thing it will be the best to not have it at all rather than having a dummy value |
Co-authored-by: Anton <anton@Antons-Mac-mini.local>
Issue #266
THIS HAS A FRONTEND PR TOO!
Tests are failing -> fixing them [wip]