-
Notifications
You must be signed in to change notification settings - Fork 6
Trust protect feature #452
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
base: dev
Are you sure you want to change the base?
Conversation
Frankdevlopes
commented
Oct 18, 2025
- Added 'applyTrustProtect' controller function to apply the update
- Integrated notification sending when Trust Protect adjusts review ratings
- Updated review API to support Trust Protect endpoints
- Refined membership API calls to align with Trust Protect logic
- Enhanced seller review screen to display Trust Protect button and supposrt the logic
- Updated translations (messages/en.json) to include new Trust Protect label and messages
…d the trustprotect button
…Mappi balance deduction
| toast.error(t('SCREEN.REVIEWS.USER_NOT_LOGGED_IN')); | ||
| return; | ||
| } | ||
|
|
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.
Hi @Frankdevlopes -consider using the app custom showNotification context instead of toast
| try { | ||
| // Step 1: Deduct 100 Mappi | ||
| const response = await deductMappi(100); | ||
|
|
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.
Consider moving the mappi deduction to the BE. It’s best to make use of the existing mappiDeduction helper function for consistency. Thanks.
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.
Thanks for the feedback!
I had initially opened this PR before the mappi consumption code was merged into the main branch. That’s why the deduction logic is still on the frontend. I’ll update the PR to move the mappi deduction to the backend and use the existing mappiDeduction helper for consistency.
|
|
||
| toast.success( | ||
| 'Trust Protect was successful! Review face changed to Sad.', | ||
| ); |
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.
Use showNotificationMessage from context file for persistent UX. Thanks
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’ll update it to use showNotificationMessage from the context for a more consistent UX. Appreciate the guidance!
| logger.info(`Found ${data.receivedReviews.length} reviews received by Pioneer: ${searchBarValue}`); | ||
| logger.info( | ||
| `Found ${data.receivedReviews.length} reviews received by Pioneer: ${searchBarValue}`, | ||
| ); |
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.
Consider reducing the logged data in your final changes.
|
|
||
| // Deduct Mappi for Trust Protect | ||
| export const deductMappi = async ( | ||
| amount: number, |
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 won’t be necessary once mappi deduction is moved to the BE