-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
TX Notifications #447
TX Notifications #447
Conversation
_getDescription = () => strings(`notifications.${type}_message`); | ||
|
||
// eslint-disable-next-line | ||
_getContent = () => ( |
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.
why are you using methods with '_' now?
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.
There are private methods and public on that module. Need an easy way to differentiate it.
// If a TX has been confirmed more than 10 min ago, it's considered old | ||
const oldestTimeAllowed = Date.now() - 1000 * 60 * 10; | ||
|
||
if (transactions.length) { |
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 if is checking selectedAddress and network to send notifications so if you are in ropsten and you get a tx in mainnet it won't show any notification, same for different accounts. I built the app to confirm this.
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.
Yeah, you'll receive notifications only for the current network. Did this on purpose. Will explain why offline
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.
Looking good!!! This is great 👏
* initial POC * initial POC * fix nav structure * fix modals * UI completed and manager ready * shit works * error notifications * fix styling * fix spinner on android * clean up * incoming notifications working * prevent continuous re-render * fix timeout * fix polling interval * refactor to support local notifications * everything working except for android * android notifications working * more android changes * handle background and foreground modes * fix unit tests * fix wrong date fn * fix vuln * fixes * fix unit tests * clean up * more clean up * code review comments * typo * missing condition * android fixes
## **Description** * '@ethersproject/abi' - Can be cleaned from package.json since it's only used by dependencies ![image](https://github.com/user-attachments/assets/587575bf-8829-4854-8cc5-cc8b0c525fd6) * @react-native-picker/picker - There is no usage for a picker anymore in the mobile app ([Introduced here](#3776)) ![image](https://github.com/user-attachments/assets/8e283096-2d84-44a1-b8f7-fc1bc933af93) * @rnhooks/keyboard - There is no usage for @rnhooks/keyboard ([introduced here](#1994)) ![image](https://github.com/user-attachments/assets/9a3164e1-38dd-40e8-bfc9-92f1cf1cae30) * asyncstorage-down - there is no usage of asyncstorage-down ([introduced here] This one was added back, but most likely isn't needed and we need to think about replacing `react-native-level-fs` and use only one file system library * dnode - there is no usage of dnode ([introduced here](#2798)) ![image](https://github.com/user-attachments/assets/deb346d7-8de3-4681-831f-5aa8bdcf2924)## **Related issues** ![image](https://github.com/user-attachments/assets/04336975-6bea-4f17-96b7-91c942ed4100)Fixes: * obs-store - There is no usage of obs-store anymoer (introruced [here](#1236)) ![image](https://github.com/user-attachments/assets/da362f05-2c71-4628-9c94-2134bac48c18) ![image](https://github.com/user-attachments/assets/37af9c8c-566e-41d0-9501-5503aa8ab648) * react-native-flash-message - there is no usage anymore ([introduced here](#447)) ![image](https://github.com/user-attachments/assets/5e76cad3-b675-4139-8884-6464a2a54115) ![image](https://github.com/user-attachments/assets/155d0283-bcff-43b2-8913-a16b440c2efc) * react-native-redash - there is no usage anymore (react-native-redash) ![image](https://github.com/user-attachments/assets/62037135-ec89-42f2-9476-9db95b0144b3) ![image](https://github.com/user-attachments/assets/9da3f797-9f43-49a8-be91-f4860299158c) ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [x] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
Description
BONUS:
metro-react-native-babel-preset
to 0.52.0Checklist
Issue
Resolves #176
Resolves #442
For incoming transactions to work properly on testnets we need to merge: MetaMask/core#62
DEMO: http://recordit.co/8dys9QTkca