Skip to content

fix: add warning type support to toast config#3736

Merged
grimen merged 2 commits intomainfrom
fix--toast-warning-type-crash
Mar 27, 2026
Merged

fix: add warning type support to toast config#3736
grimen merged 2 commits intomainfrom
fix--toast-warning-type-crash

Conversation

@esaugomez31
Copy link
Copy Markdown
Collaborator

@esaugomez31 esaugomez31 commented Mar 26, 2026

Summary

Adds warning type support to the toast notification system to prevent app crashes when a toast with type: "warning" is shown.

Problem

The app crashes on the receive screen when onChainAddressCurrent fails, because toastShow is called with type: "warning" but react-native-toast-message only had success and error configured. Closes #3734.

Changes

  • Added warning renderer to toastConfig in galoy-toast.tsx with amber border color (colors.warning)
  • Replaced ternary in toast.ts with a toastTitle map for cleaner type-to-title resolution
  • Added tests for all three toast types

Copy link
Copy Markdown
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@esaugomez31 esaugomez31 changed the title fix: add warning type to toast config to prevent crash fix: add warning toast type to prevent crash Mar 26, 2026
@esaugomez31 esaugomez31 changed the title fix: add warning toast type to prevent crash fix: add warning type support to toast config Mar 26, 2026
@esaugomez31 esaugomez31 marked this pull request as ready for review March 26, 2026 17:42
@esaugomez31 esaugomez31 self-assigned this Mar 26, 2026
@esaugomez31 esaugomez31 force-pushed the fix--toast-warning-type-crash branch from 814b8ae to 52f7cc5 Compare March 26, 2026 17:45
@esaugomez31 esaugomez31 requested review from dolcalmi and grimen March 26, 2026 18:04
Copy link
Copy Markdown
Collaborator

@dolcalmi dolcalmi left a comment

Choose a reason for hiding this comment

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

looks good, just minor validation

@esaugomez31 esaugomez31 force-pushed the fix--toast-warning-type-crash branch from 52f7cc5 to 49e6349 Compare March 26, 2026 18:17
@esaugomez31 esaugomez31 requested a review from dolcalmi March 26, 2026 18:19
@grimen grimen merged commit c6d675b into main Mar 27, 2026
7 of 9 checks passed
@grimen grimen deleted the fix--toast-warning-type-crash branch March 27, 2026 10:08
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.

bug: crash after tap receive

3 participants