Skip to content
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

Bugfix: ExceptionsManagerModule android crashes #968

Merged
merged 9 commits into from
Jul 30, 2019

Conversation

estebanmino
Copy link
Contributor

@estebanmino estebanmino commented Jul 30, 2019

Description

These are the top 3 crashes on android, for ExceptionsManagerModule category, fixed on this pr

Checklist

  • There is a related GitHub issue
  • Tests are included if applicable
  • Any added code is fully documented

Issue

Resolves #???

@estebanmino estebanmino added the needs-qa Any New Features that needs a full manual QA prior to being added to a release. label Jul 30, 2019
@estebanmino estebanmino changed the title Bugfix: android crashes Bugfix: ExceptionsManagerModule android crashes Jul 30, 2019
Copy link
Contributor

@ibrahimtaveras00 ibrahimtaveras00 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, QA passed 👍

Copy link
Contributor

@brunobar79 brunobar79 left a comment

Choose a reason for hiding this comment

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

LGTM

selectedAddress,
identities
} = this.props;
const host = getHost(url);
const title = typeof currentPageInformation.title === 'string' ? currentPageInformation.title : getHost(url);
Copy link
Contributor

Choose a reason for hiding this comment

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

I literally made this change last night and it didn't go to production yet.
See https://github.com/MetaMask/metamask-mobile/pull/963/files#diff-6b966e9916d92d54ae676b69d898840cR244

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, title was the problem not host. I was able to get to some cases where title was {} making everything crash

const { url } = this.props;
const apiLogoUrl = { uri: this.getIconUrl(url) };
const title = typeof this.props.title === 'string' ? this.props.title : getHost(url);
this.setState({ title: title.substring(0, 1).toUpperCase(), apiLogoUrl });
Copy link
Contributor

Choose a reason for hiding this comment

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

I oppose to this change because it's gonna cause an extra re-render in every website icon, no matter if it was problematic or not.

My suggestion is to can keep those in the render method and use the this prop to capitalize: https://facebook.github.io/react-native/docs/text-style-props#texttransform

@estebanmino estebanmino merged commit b05d423 into develop Jul 30, 2019
@estebanmino estebanmino deleted the bugfix/android-crashes branch August 20, 2019 18:04
rickycodes pushed a commit that referenced this pull request Jan 31, 2022
* issue 1

* more like issue 1

* fix website icon

* animations

* rm code

* comment

* rm state
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-qa Any New Features that needs a full manual QA prior to being added to a release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants