Skip to content
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

feat(rewards): add meow transfer functionality with error handling and state management updates #2290

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

domw30
Copy link
Collaborator

@domw30 domw30 commented Sep 20, 2024

What does this do?

  • This adds functionality to handle MEOW token 'transfers' between users, including API integration and state management in the frontend.

Why are we making this change?

  • We are implementing the ability for users to transfer MEOW tokens as part of the app's reward and interaction system.

How do I test this?

  • run tests as usual.
  • Note:: this is not yet wired up to UI

Key decisions and Risk Assessment:

Things to consider:

  1. How will this affect security?
  2. How will this affect performance?
  3. Does this change any APIs?

@domw30 domw30 changed the title Feat/wire up meowing transfer feat(rewards): add meow transfer functionality with error handling and state management updates Sep 20, 2024
const result = yield call(transferMeowAPI, senderUserId, recipientUserId, amount);

if (result.success) {
yield put(setMeow(result.response.senderBalance));
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we set Meow, this should handle live updates of the users total rewards. Then when rewards are fetched again, i.e. on reload, the same amount of meow should be displayed based on the db updates when hitting transferMeowApi

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.

1 participant