Skip to content

Commit

Permalink
fix: sentry issues (#266)
Browse files Browse the repository at this point in the history
* fix crash after onboarding if user doesn't grant notification
permissions on the last step
* fix "address not EOA" error handling
  • Loading branch information
ice-orion authored Feb 1, 2024
1 parent d9b1988 commit 5675c1f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,14 @@ export const useFinishOnboarding = () => {
useNavigation<NativeStackNavigationProp<WelcomeStackParamList>>();
const user = useSelector(unsafeUserSelector);

/**
* Do not subscribe to `canAskPermissionSelector('pushNotifications')`
* because otherwise the number of slides is changed
* when user grants / denies permissions on the "notifications" slide.
*/
const canAskNotificationPermission = useSelector(
canAskPermissionSelector('pushNotifications'),
() => true,
);

const loading = useSelector(
Expand Down
4 changes: 4 additions & 0 deletions src/store/modules/Account/sagas/updateAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ function* validateMiningBlockchainAccountAddress(
throw new ValidationError(ValidationErrorCode.BscAddressIsNotEoa);
}
} catch (error) {
if (isValidationError(error)) {
throw error;
}

const typedError = error as EoaBscAddressError;
const networkErrorTypes: typeof typedError['name'][] = [
'HttpRequestError',
Expand Down

0 comments on commit 5675c1f

Please sign in to comment.