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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## Current Develop Branch
- [#2142](https://github.com/MetaMask/metamask-mobile/pull/2142): Display boolean values when signing typed data

## v1.0.9 - Jan 21 2021
- [#2149](https://github.com/MetaMask/metamask-mobile/pull/2149): update tests for new logic
Expand Down
5 changes: 2 additions & 3 deletions app/components/UI/TypedSign/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export default class TypedSign extends PureComponent {
</View>
) : (
<Text style={styles.messageText}>
<Text style={styles.msgKey}>{key}:</Text> {obj[key]}
<Text style={styles.msgKey}>{key}:</Text> {`${obj[key]}`}
</Text>
)}
</View>
Expand All @@ -153,8 +153,7 @@ export default class TypedSign extends PureComponent {
<View key={`${obj.name}_${i}`}>
<Text style={[styles.messageText, styles.msgKey]}>{obj.name}:</Text>
<Text style={styles.messageText} key={obj.name}>
{' '}
{obj.value}
{` ${obj.value}`}
</Text>
</View>
))}
Expand Down
4 changes: 3 additions & 1 deletion app/core/Engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ import Logger from '../util/Logger';
import { LAST_INCOMING_TX_BLOCK_INFO } from '../constants/storage';
import { MAINNET } from '../constants/network';

const EMPTY = 'EMPTY';

const encryptor = new Encryptor();
let refreshing = false;
/**
Expand Down Expand Up @@ -78,7 +80,7 @@ class Engine {
new MessageManager(),
new NetworkController(
{
infuraProjectId: process.env.MM_INFURA_PROJECT_ID,
infuraProjectId: process.env.MM_INFURA_PROJECT_ID || EMPTY,
providerConfig: {
static: {
eth_sendTransaction: async (payload, next, end) => {
Expand Down