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

Display boolean values when signing typed data #2142

Merged
merged 3 commits into from
Jan 25, 2021
Merged

Display boolean values when signing typed data #2142

merged 3 commits into from
Jan 25, 2021

Conversation

nlordell
Copy link
Contributor

@nlordell nlordell commented Jan 20, 2021

Description

This PR applies the same fix as the browser extension (MetaMask/metamask-extension#4639)

The issue is that boolean values have special meaning in JSX and do not render their string representation. The solution is to simply toString the values to be displayed. Note that ${...} is used instead of toString directly to avoid any error from null or undefined values.

⚠️ Notes

Unfortunately, I was not able to build the MetaMask mobile app to verify my change works. I followed the steps for building on Android but ran into a few issues that I couldn't get past (specifically, I get an error building react-native-aes-crypto: error: method pbkdf2Sync(String,String,Integer,Integer) is already defined in class RCTAes).

That being said, I was able to test my assumption that rendering booleans is an issue using the playground on the React Native dev site.

Issue

Resolves #2141

@nlordell nlordell requested a review from a team as a code owner January 20, 2021 11:52
@nlordell
Copy link
Contributor Author

It looks like CI isn't running for this PR (probably because I'm not a collaborator).

@rickycodes
Copy link
Contributor

@nlordell thanks for the contribution!

I've taken the liberty of enabling CI jobs for third party contributors (forks). I've also pushed up a couple changes to your PR to get that working (I hope you don't mind).

@nlordell
Copy link
Contributor Author

Of course not! Thanks for the help!

@rickycodes rickycodes merged commit d2d8d57 into MetaMask:develop Jan 25, 2021
rickycodes added a commit that referenced this pull request Jan 31, 2022
* Display boolean values when signing typed data

* Provide fallback for MM_INFURA_PROJECT_ID

Co-authored-by: ricky <[email protected]>
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.

EIP-712 typed data messages not showing boolean values.
2 participants