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

[feature] send push notification when user receives a transfer #832

Merged
merged 6 commits into from
Aug 31, 2023

Conversation

dev-jotape
Copy link
Collaborator

This PR fixes #744

Changes

Send push notification when a user receives a transfer from the following assets: cUSD, cEUR, cREAL, CELO, and PACT.

Tests

@dev-jotape dev-jotape marked this pull request as ready for review August 23, 2023 17:48
@@ -57,7 +57,8 @@ export enum NotificationParamsPath {
STORY = 'stories?id=',
COMMUNITY = 'communities/',
LOAN_APPLICATION = 'microcredit/form/',
LOAN_APPROVED = 'microcredit/'
LOAN_APPROVED = 'microcredit/',
TRANSACTION_RECEIVED = 'transactions/'
Copy link
Contributor

Choose a reason for hiding this comment

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

You don't need this. This matters only if were to send the user somewhere, but we will only open a bottom-sheet on the wallet, using the transactionHash

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ok, removed


// send push notification
if (user)
sendNotification([user], NotificationType.TRANSACTION_RECEIVED, true, true, {
Copy link
Contributor

Choose a reason for hiding this comment

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

This notification requires something new. We need to get the "amount" and token name and send that together on the notification.
The notification will be something like "You've just received {{amount}} {{currency}}.", and replace "amount" and "currency" before sending the notification.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done, please can you review it again?

@sonarcloud
Copy link

sonarcloud bot commented Aug 31, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@dev-jotape dev-jotape merged commit eb5342f into main Aug 31, 2023
3 checks passed
@dev-jotape dev-jotape deleted the feature/transfer-push-notification branch August 31, 2023 13:56
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.

[PushNotifications] When user receives a transfer
2 participants