Push notifications (via Expo Notifications or Firebase Cloud Messaging) can alert a user when a pending transaction confirms, or when a price alert triggers, even while the app is backgrounded.
import * as Notifications from "expo-notifications";
async function notifyTxConfirmed(hash: string) {
await Notifications.scheduleNotificationAsync({
content: { title: "Transaction confirmed", body: `Tx ${hash.slice(0, 10)}… is confirmed` },
trigger: null,
});
}Requesting notification permission should be done contextually (right before the feature that needs it, e.g. "enable alerts for your pending swap") rather than immediately on app launch, which tends to get denied.