Skip to content

Conversation

@Frankdevlopes
Copy link
Collaborator

  • 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

toast.error(t('SCREEN.REVIEWS.USER_NOT_LOGGED_IN'));
return;
}

Copy link
Collaborator

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);

Copy link
Collaborator

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.

Copy link
Collaborator Author

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.',
);
Copy link
Collaborator

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

Copy link
Collaborator Author

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}`,
);
Copy link
Collaborator

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,
Copy link
Collaborator

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

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.

3 participants