diff --git a/src/screens/points/ConsoleSheet.tsx b/src/screens/points/ConsoleSheet.tsx index 1d6c052c831..a131cac5bc2 100644 --- a/src/screens/points/ConsoleSheet.tsx +++ b/src/screens/points/ConsoleSheet.tsx @@ -132,11 +132,11 @@ export const ConsoleSheet = () => { } } if (!points) { - logger.error( - new RainbowError( - `Error onboarding points user - accountAddress: ${accountAddress}, referralCode: ${referralCode}, challenge: ${challenge}, signature: ${signature}` - ) - ); + logger.error(new RainbowError('Error onboarding points user'), { + referralCode, + challenge, + signature, + }); Alert.alert(i18n.t(i18n.l.points.console.generic_alert)); } else { if (points.onboardPoints?.error) { diff --git a/src/screens/points/content/ReferralContent.tsx b/src/screens/points/content/ReferralContent.tsx index 8c75daa1993..cd77bb54385 100644 --- a/src/screens/points/content/ReferralContent.tsx +++ b/src/screens/points/content/ReferralContent.tsx @@ -34,6 +34,7 @@ import Svg, { Path } from 'react-native-svg'; import { WrappedAlert as Alert } from '@/helpers/alert'; import * as i18n from '@/languages'; import Routes from '@/navigation/routesNames'; +import { RainbowError, logger } from '@/logger'; export default function ReferralContent() { const { accountAddress } = useAccountProfile(); @@ -66,8 +67,12 @@ export default function ReferralContent() { if (res.onboardPoints.error.type === 'INVALID_REFERRAL_CODE') { setStatus('invalid'); haptics.notificationError(); + } else { + logger.error(new RainbowError('Error validating referral code'), { + referralCode, + }); + Alert.alert(i18n.t(i18n.l.points.referral.error)); } - Alert.alert(i18n.t(i18n.l.points.referral.error)); } else { setStatus('valid'); setReferralCode(referralCode);