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

Add Push Notifications and Background Transaction Fetching #267

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

Conversation

hsyndeniz
Copy link
Contributor

Description:

This pull request adds two main features to the wallet app: push notifications using @notifee/react-native and background transaction fetching with react-native-background-timer and react-native-background-fetch. The purpose is to enhance the user experience by providing real-time notifications and seamless transaction updates even when the app is not actively in use.

Changes Made:

  • Integrated @notifee/react-native for handling push notifications.
  • Utilized react-native-background-timer to fetch transactions from blockscout every 5 minutes when the app is active.
  • Implemented react-native-background-fetch for fetching transactions every 15 minutes even when the app is closed.

Features Implemented:

  • Push notifications to notify users about transaction updates and wallet activities.
  • Background transaction fetching for continuous updates on wallet transactions.

Dependencies and Libraries:

  • Added @notifee/react-native for push notification functionality.
  • Incorporated react-native-background-timer for periodic transaction fetching.
  • Integrated react-native-background-fetch for background transaction retrieval.

Testing:

  • Conducted manual testing on Android and iOS devices.
  • Ensured proper functioning of background transaction fetching.

Screenshots or GIFs:

image

Related Issues:

Checklist:

  • Code has been tested on both Android and iOS devices.
  • Unit tests for the newly added features have not been written yet.

Additional Information:
The background transaction fetching feature is expected to improve user engagement by providing up-to-date transaction information even when the app is not actively used.

Next Steps:
In the upcoming pull request, I plan to implement deep linking functionality to redirect users to the confirmation page directly from the push notification, providing a smoother and more intuitive user experience.

@hsyndeniz hsyndeniz self-assigned this Jul 31, 2023
Copy link
Contributor

@juanmanso juanmanso left a comment

Choose a reason for hiding this comment

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

Left a couple of questions

try {
const transactions = await getAccountTransactions({
address: walletObject![zone].address,
zone: Zone[zone],
Copy link
Contributor

Choose a reason for hiding this comment

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

no need to do this I think, right?

? 'sent'
: 'received';
const value = Number(latestTransaction.value) / 10 ** 18;
const message = `You ${type} ${value} QUAIs`;
Copy link
Contributor

Choose a reason for hiding this comment

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

this text should be localized

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