-
Notifications
You must be signed in to change notification settings - Fork 14
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
sending credits to existing user #91
Comments
The API should throw a Validation Error and the frontend should display a message saying something like "you can't send voice credits to yourself" |
Does this issue still need work? I see TransferModal.tsx has code aiming address it upon user submission...
If there is more to be done @alexrandaccio, I can give it a try (maybe with some assistance). |
sorry for the late reply--busy week last week. let me replicate this |
Here's what I'm seeingDescribe the bug the API is throwing a ValidationError as expected, but the frontend is not displaying an error message to the user. instead, you hit the "submit" button, and nothing happens at all. Steps to Reproduce
Expected Behavior the frontend should display a message saying "you cannot send voice credits to yourself" Solution@ChrisCoastal identified the correct code snippet in a comment above. This code snippet checks the id of the recipient against the id of the logged in delegate. The problem is, when you click "+ Invite Someone Else", you enter an email address, so recipient.id === undefined. As a result, this check does not catch the error. The solution is to add an additional check:
Next Steps@ChrisCoastal thanks for volunteering! I'll go ahead and assign this to you for now, but feel free to let me know if you need more help or don't have time @whatSocks if you are following the steps above and seeing a different result, let us know Thanks both for your help 🤠 🚀 |
Thanks @alexrandaccio; I'll have time for this over the weekend. Very much appreciate your extra guidance and time getting me setup. 🙏 |
Hey @alexrandaccio, was just taking a look at this and unfortunately am a little lost. 🦑 I'm not sure what the userDelegate object you are referring to in your solution is (and subsequently how the check is meant to function). I checked the props Delegation.tsx is passing to TransferModal.tsx and some of the other imports in TransferModal, but still can't follow your fix. Thanks for the extra support! 💫 |
@ChrisCoastal no problem! Here's some relevant info (disclaimer: I am using "event" and "process" interchangeably here. That's because the model is currently called Process but I am transitioning to Event because it will be clearer. sorry for the confusion) What is userDelegate
Where is userDelegate loaded
What is recipient
sorry the variable naming is not super clear, I'm gradually trying to fix that. Hope this is helpful, let me know if you have any follow up questions! |
not sure if this is expected behavior, but what should happen if I try to send credits to the email that I'm currently logged in with?
Right now it seems like credits get taken out, but I can't re-claim them.
The text was updated successfully, but these errors were encountered: