-
Notifications
You must be signed in to change notification settings - Fork 281
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
intro-to-solana-mobile.md - refactor: optimize counter increment logic and notification handling #355
base: main
Are you sure you want to change the base?
intro-to-solana-mobile.md - refactor: optimize counter increment logic and notification handling #355
Conversation
- Refactored showToastOrAlert to showNotification for better clarity. - Improved async/await usage with consistent error handling using try/catch. - Added detailed logging for missing program or counterAddress. - Cleaned up and grouped logic for better readability and maintainability. - Ensured balance checks and airdrop requests are well-handled during transactions.
Thanks! Needs a little work but we can get this in once done. |
Thank you Mike! Looking forward to that. |
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.
Some small changes needed but also not many.
} else { | ||
Alert.alert(message); | ||
} | ||
const showNotification = (message: string) => { |
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 does not show notifications.
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 does show notification. can you please elaborate on this review
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 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 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.
That's not a 'notification' then. The word notification has a very specific meaning on mobile. Please change the function name.
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.
changed to showMessage()
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.
Just one last bit and we can get this in.
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.
Just need to fix function name per above. showMessage()
would be fine. Just not 'notification'.
changed to showMessage✅ |
This pull request has been automatically marked as stale because it has not had recent activity. Remove stale label or comment or this will be closed in 7 days. |
Problem
Summary of Changes
Refactored showToastOrAlert to showNotification for better clarity.
Improved async/await usage with consistent error handling using try/catch.
Added detailed logging for missing program or counterAddress.
Cleaned up and grouped logic for better readability and maintainability.
Ensured balance checks and airdrop requests are well-handled during transactions.