Skip to content

Commit

Permalink
Release/v2.3.0 (#2677)
Browse files Browse the repository at this point in the history
* resolve isENS without case sensitivity (#2545) (#2568)

Co-authored-by: ricky <ricky.miller@gmail.com>

Co-authored-by: Minh <minhle@canva.com>

* Use node 14 (#2539)

* Swaps: BSC Support (#2468)

* Swaps: Add cache thresholds configuration (#2514)

* Upgrade .nvmrc to node v14 (#2588)

* Address yarn lints (#2524)

* address yarn lints

* add eslint-disable

* Update isENS method

* fix rn-fetch-blob.js mock

* Add tests for isENS

* useRef instead of useMemo

* Update eslint

* Use lastIndexOf and add test

* Add test case for ricky.metamask.eth

* Add offset

* Fix AppConstants import

* only add custom tokens if not in mainnet (#2470)

* checkchainid

* tests

* Fix adding custom token in custom network (#2590)

* Replace controller context (#2416)

* Replace controller context

The `context` object previously constructed by the
`ComposableController` is no more. Instead each controller now accepts
its dependencies directly as constructor parameters, in a similar
manner to the extension controllers.

This was done in preparation for migrating to BaseControllerV2 and the
new controller messaging system - this is just a temporary solution
that will let us migrate controllers one at a time.

The style of dependency injection here matches the extension (at least
with newer controllers anyway). Specific methods and state snapshots
are injected rather than entire controllers, to help simplify unit
tests and make it easier to understand how controllers interact.

The `Engine.context` property was used throughout mobile, so it has
been preserved. It is now constructed explicitly, rather than being a
re-export of the `ComposableController` context.

This PR depends upon MetaMask/core#387

* Pass in function for `getOpenSeaApiKey` rather than string

The API key was passed in directly by accident, instead of a function get returned the key. This has been fixed.

Co-authored-by: Esteban Miño <efmino@uc.cl>

* Update `AccountTrackerController` options

The `AccountTrackerController` option `initialIdentities` was replaced
with `getIdentities`. The initial identities passed in here were
incorrect anyway due to a typo (`initialState.preferencesController`
was used instead of `initialState.PreferencesController`).

* Fix `getIdentities` handler for `AccountTrackerController`

* Set initial controller state

The `controllers` setter on `ComposedController` used to be responsible
for setting initial state. Since that setter has been removed, the
initial state is now set after the controllers have been constructed.

This should be functionally equivalent to what it was before. We're
setting the initial state by calling `update` on each controller, just
as the `controller` setter used to.

* Fix initial state variable reference

Co-authored-by: Esteban Miño <efmino@uc.cl>

* fix typeface on login text field (#2610)

* Feature/confusables (#2464)

* Add confusable warning to SendTo

* Highlight confusable characters

* Replace zeroWidthPoints characters with ?

* Add some notes

* Add confusable highlight to confirm screen

* Update checkZeroWidth function

* Add exclamation mark to Confirm

* Add handleConfusables method

* Move this into one spot

* Add hasZeroWidthPoints

* Rename T to Texts

* Use reduce

* Add homoglyphic tests

* Add Modal for confusable on confirm screen

* Update snapshot

* Use Swaps InfoModal

* Increase lineheight on modals

* Only display warning if address is not in addressBook

* Update snapshot

* Make texts lowercase

* Remove unused state

* Add patch

* Display as warning in yelllow when not zero width

* Only display confusables warnings if the user is not in addressbook

* Add optional chaining for addressBook

Co-authored-by: andrepimenta <andrepimenta7@gmail.com>

* Add New Zealand Dollar to currency options (#2446)

* Add New Zealand Dollar to currency options

* Update snapshot to include nzd

Co-authored-by: Ricky Miller <ricky.miller@gmail.com>

* Move some errors to analytics instead of sentry (#2529)

* Move some errors to analytics instead of sentry

* Add swaps errors

* Change to log just as 1 error

* Fix typos

* Log can't reach branch servers as analytics

* Browser: Failed to resolve ENS name for chainId - log as analytics

* Update tests

Co-authored-by: Pedro Pablo Aste Kompen <wachunei@gmail.com>

* Don't hide url modal on emulator (#2604)

* Detox/Fix failing tests (#2607)

* fixed all failing tests

* remove a

Co-authored-by: Ibrahim Taveras <ibrahimtaveras@ibrahims-mbp.myfiosgateway.com>

* Upgrade wallet connect (#2552)

* This will fix sentry errors with no title by using the extra info as a title (#2565)

* Bugfix/android anr (#2603)

* updated Sentry SDK and increase the default timeout for ANR to be thrown  from 4 to 10 seconds #2498

* updated ANR reporting time to 8 seconds

* removed increased timeout and correct sentry integrations vesion

* updated pod dependencies

* remove typo (#2613)

* Upgrade swaps-controller v4 (#2586)

* updated lock files (#2614)

* Fix/respect custom spend limit on dapp approve modal (#2556)

* Add better initial state reset for permission edit modal

* Use spendLimitCustomValue for allowance

* minimumSpendLimit 1

* Remove minimumSpendLimit prop

* Get minimumSpendLimit from EditPermission component

* Add MINIMUM_VALUE const

* use export const

* Coerce minimumSpendLimit to number

* Log error

* Remove callback from initialState

Co-authored-by: Pedro Pablo Aste Kompen <wachunei@gmail.com>

* Improve rpc errors logging and removing user rejected errors (#2564)

* Improve rpc errors logging and removing user rejected errors

* Update for even more cases

* Add comments to code

* Add trackErrorAsAnalytics

* Use typeof

* Feature/update seed phrase wording (#2605)

* Move login strings to translation file

* replace seed phrase with Secret Recovery phrase

* Get an video working

* get video working off disk

* Add SeedPhraseVideo component

* Add TODO:

* Add SeedPhraseVideo to onboarding

* Update snapshots

* Add borderRadius

* cleanup

* Remove placeholder video and add recovery-phrase

* Add video-controls

* Add cover to video

* Add play button to cover

* adjust opacity to closer match design

* Add marginTop to video on settings page

* Remove subtitles for now

* Update few remaining instances

* Account for single word instances

* update snapshots

* Update snapshots

* RC v2.3.0 (#2621)

* bump version numbers

* update change log

* Implement 'hide zero balance token' setting for token balances on home screen (#2444)

* Implement 'hide zero balance token' setting for token balances on home screen

* Add localizations

* Refactor how balances are detected, add tests

* Fix lint, add spacing, create jest snapshots

* Fix test, lint

* Remove unnecessary proop from test

* Remove 'paymentChannelsEnabled' prop that doesn't belong in this patch

Co-authored-by: ricky <ricky.miller@gmail.com>

* Fix isZero is undefined (#2625)

* Fix isZero is undefined

* Update app/components/UI/Tokens/index.js

Co-authored-by: Esteban Miño <efmino@uc.cl>

* add optional chaining

Co-authored-by: Esteban Miño <efmino@uc.cl>

* Address yarn audit (#2633)

* updated change log (#2631)

* updated change log

* updated change log

* updated change log

* Exclude native asset from hiding when balance is zero (#2639)

* Fix undefined is not an object identities[selectedAddress].importTime (#2643)

* Fix undefined is not an object (evaluating 'identities[selectedAddress].importTime

* Use accountImportTime for consistency

* Safe navbar for iphone 12 (#2645)

* safenavbar

* Update app/util/Device.js

Co-authored-by: ricky <ricky.miller@gmail.com>

* mocks

* lint

* finally

Co-authored-by: ricky <ricky.miller@gmail.com>

* Fix missing seed phrase updates (#2657)

* Fix Balance undefined for deeplink payment requests (#2656)

* Check for transactionToName

* Account for own accounts

* Remove console.log

* Use account names from identities

* Remove async

* Add some safety

* Load video over the network (#2663)

* updated version code and change logs (#2664)

* updated version code and change logs

* update change log

* added export of iOS artifacts (#2667)

* added export of iOS artifacts

* updated destination directory

* Bump hosted-git-info from 2.8.8 to 2.8.9 (#2670)

Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](npm/hosted-git-info@v2.8.8...v2.8.9)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Key off accounts (#2669)

* Key off accounts

* Key off accounts in ChoosePassword as well

* Fix deploy contract and create token testnets (#2674)

* updated change logs

* upated version codes and change logs (#2675)

Co-authored-by: ricky <ricky.miller@gmail.com>
Co-authored-by: Minh <minhle@canva.com>
Co-authored-by: Pedro Pablo Aste Kompen <wachunei@gmail.com>
Co-authored-by: Esteban Miño <efmino@uc.cl>
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
Co-authored-by: andrepimenta <andrepimenta7@gmail.com>
Co-authored-by: Michael Standen <screaminghawk@gmail.com>
Co-authored-by: Ibrahim Taveras <ibrahimtaveras00@gmail.com>
Co-authored-by: Ibrahim Taveras <ibrahimtaveras@ibrahims-mbp.myfiosgateway.com>
Co-authored-by: David Walsh <davidwalsh83@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
12 people committed May 12, 2021
1 parent 0173fe2 commit 867369e
Show file tree
Hide file tree
Showing 123 changed files with 3,366 additions and 1,581 deletions.
17 changes: 10 additions & 7 deletions .circleci/config.yml
Expand Up @@ -20,7 +20,7 @@ jobs:
prep-deps:
<<: *defaults
docker:
- image: circleci/node:10
- image: circleci/node:14
steps:
- checkout
- run:
Expand All @@ -33,7 +33,7 @@ jobs:
prep-node-deps:
<<: *defaults
docker:
- image: circleci/node:10
- image: circleci/node:14
steps:
- checkout
- restore_cache: *restore-node-cache
Expand All @@ -49,7 +49,7 @@ jobs:
lint:
<<: *defaults
docker:
- image: circleci/node:10
- image: circleci/node:14
steps:
- checkout
- attach_workspace:
Expand All @@ -60,7 +60,7 @@ jobs:
<<: *defaults
parallelism: 3
docker:
- image: circleci/node:10
- image: circleci/node:14
steps:
- checkout
- attach_workspace:
Expand All @@ -74,7 +74,7 @@ jobs:
test-deps:
<<: *defaults
docker:
- image: circleci/node:10
- image: circleci/node:14
steps:
- checkout
- attach_workspace:
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
upload-coverage:
<<: *defaults
docker:
- image: circleci/node:10
- image: circleci/node:14
steps:
- checkout
- attach_workspace:
Expand All @@ -117,7 +117,7 @@ jobs:
all-tests-pass:
<<: *defaults
docker:
- image: circleci/node:10
- image: circleci/node:14
steps:
- run:
name: All Tests Passed
Expand Down Expand Up @@ -189,6 +189,9 @@ jobs:
- store_artifacts:
path: sourcemaps/ios
destination: sourcemaps-ios
- store_artifacts:
path: ios/output/gym
destination: output
workflows:
full_test:
jobs:
Expand Down
1 change: 1 addition & 0 deletions .eslintrc.js
@@ -1,3 +1,4 @@
// eslint-disable-next-line import/no-commonjs
module.exports = {
root: true,
parser: 'babel-eslint',
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
@@ -1 +1 @@
v10
v14
44 changes: 44 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,49 @@
# Changelog

## v.2.3.0 - May 5 2021
- [#2674](https://github.com/MetaMask/metamask-mobile/pull/2674): Fix deploy contract and create token testnets
- [#2669](https://github.com/MetaMask/metamask-mobile/pull/2669): Key off accounts
- [#2670](https://github.com/MetaMask/metamask-mobile/pull/2670): Bump hosted-git-info from 2.8.8 to 2.8.9
- [#2667](https://github.com/MetaMask/metamask-mobile/pull/2667): added export of iOS artifacts
- [#2664](https://github.com/MetaMask/metamask-mobile/pull/2664): updated version code and change logs
- [#2663](https://github.com/MetaMask/metamask-mobile/pull/2663): Load video over the network
- [#2656](https://github.com/MetaMask/metamask-mobile/pull/2656): Fix Balance undefined for deeplink payment requests
- [#2657](https://github.com/MetaMask/metamask-mobile/pull/2657): Fix missing seed phrase updates
- [#2645](https://github.com/MetaMask/metamask-mobile/pull/2645): Safe navbar for iphone 12
- [#2643](https://github.com/MetaMask/metamask-mobile/pull/2643): Fix undefined is not an object identities[selectedAddress].importTime
- [#2639](https://github.com/MetaMask/metamask-mobile/pull/2639): Exclude native asset from hiding when balance is zero
- [#2631](https://github.com/MetaMask/metamask-mobile/pull/2631): updated change log
- [#2633](https://github.com/MetaMask/metamask-mobile/pull/2633): Address yarn audit
- [#2625](https://github.com/MetaMask/metamask-mobile/pull/2625): Fix isZero is undefined
- [#2444](https://github.com/MetaMask/metamask-mobile/pull/2444): Implement 'hide zero balance token' setting for token balances on home screen
- [#2621](https://github.com/MetaMask/metamask-mobile/pull/2621): RC v2.3.0
- [#2605](https://github.com/MetaMask/metamask-mobile/pull/2605): Feature/update seed phrase wording
- [#2564](https://github.com/MetaMask/metamask-mobile/pull/2564): Improve rpc errors logging and removing user rejected errors
- [#2556](https://github.com/MetaMask/metamask-mobile/pull/2556): Fix/respect custom spend limit on dapp approve modal
- [#2614](https://github.com/MetaMask/metamask-mobile/pull/2614): updated lock files
- [#2586](https://github.com/MetaMask/metamask-mobile/pull/2586): Upgrade swaps-controller v4
- [#2613](https://github.com/MetaMask/metamask-mobile/pull/2613): remove typo
- [#2603](https://github.com/MetaMask/metamask-mobile/pull/2603): Bugfix/android anr
- [#2565](https://github.com/MetaMask/metamask-mobile/pull/2565): This will fix sentry errors with no title by using the extra info as a title
- [#2552](https://github.com/MetaMask/metamask-mobile/pull/2552): Upgrade wallet connect
- [#2607](https://github.com/MetaMask/metamask-mobile/pull/2607): Detox/Fix failing tests
- [#2604](https://github.com/MetaMask/metamask-mobile/pull/2604): Don't hide url modal on emulator
- [#2529](https://github.com/MetaMask/metamask-mobile/pull/2529): Move some errors to analytics instead of sentry
- [#2446](https://github.com/MetaMask/metamask-mobile/pull/2446): Add New Zealand Dollar to currency options
- [#2464](https://github.com/MetaMask/metamask-mobile/pull/2464): Feature/confusables
- [#2610](https://github.com/MetaMask/metamask-mobile/pull/2610): fix typeface on login text field
- [#2416](https://github.com/MetaMask/metamask-mobile/pull/2416): Replace controller context
- [#2590](https://github.com/MetaMask/metamask-mobile/pull/2590): Fix adding custom token in custom network
- [#2470](https://github.com/MetaMask/metamask-mobile/pull/2470): only add custom tokens if not in mainnet
- [#2524](https://github.com/MetaMask/metamask-mobile/pull/2524): Address yarn lints
- [#2588](https://github.com/MetaMask/metamask-mobile/pull/2588): Upgrade .nvmrc to node v14
- [#2514](https://github.com/MetaMask/metamask-mobile/pull/2514): Swaps: Add cache thresholds configuration
- [#2468](https://github.com/MetaMask/metamask-mobile/pull/2468): Swaps: BSC Support
- [#2539](https://github.com/MetaMask/metamask-mobile/pull/2539): Use node 14
- [#2568](https://github.com/MetaMask/metamask-mobile/pull/2568): resolve isENS without case sensitivity (#2545)
- [#2566](https://github.com/MetaMask/metamask-mobile/pull/2566): Revert "resolve isENS without case sensitivity (#2545)"
- [#2545](https://github.com/MetaMask/metamask-mobile/pull/2545): resolve isENS without case sensitivity

## v2.2.0 - Apr 21 2021
- [#2547](https://github.com/MetaMask/metamask-mobile/pull/2547): Include decimalsToShow in balanceToFiatNumber
- [#2554](https://github.com/MetaMask/metamask-mobile/pull/2554): Bug fix/sync import time
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Expand Up @@ -166,8 +166,8 @@ android {
applicationId "io.metamask"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 54
versionName "2.2.0"
versionCode 715
versionName "2.3.0"
multiDexEnabled true
testBuildType System.getProperty('testBuildType', 'debug')
missingDimensionStrategy "minReactNative", "minReactNative46"
Expand Down
4 changes: 4 additions & 0 deletions app/__mocks__/react-native-device-info.js
@@ -0,0 +1,4 @@
export const getModel = () => Promise.resolve('iPhone 12');
export const getApplicationName = () => Promise.resolve('applicationName');
export const getVersion = () => Promise.resolve('version');
export const getBuildNumber = () => Promise.resolve('500');
1 change: 1 addition & 0 deletions app/__mocks__/rn-fetch-blob.js
Expand Up @@ -9,6 +9,7 @@ export default {
config: noop,
session: noop,
fs: {
writeFile: () => Promise.resolve(),
exists: () => Promise.resolve(),
dirs: {
CacheDir: noop,
Expand Down
7 changes: 7 additions & 0 deletions app/actions/settings/index.js
Expand Up @@ -19,6 +19,13 @@ export function setShowCustomNonce(showCustomNonce) {
};
}

export function setHideZeroBalanceTokens(hideZeroBalanceTokens) {
return {
type: 'SET_HIDE_ZERO_BALANCE_TOKENS',
hideZeroBalanceTokens
};
}

export function setLockTime(lockTime) {
return {
type: 'SET_LOCK_TIME',
Expand Down
13 changes: 12 additions & 1 deletion app/components/Base/Text.js
Expand Up @@ -16,10 +16,13 @@ const style = StyleSheet.create({
right: {
textAlign: 'right'
},
bold: fontStyles.bold,
red: {
color: colors.red
},
black: {
color: colors.black
},
bold: fontStyles.bold,
blue: {
color: colors.blue
},
Expand Down Expand Up @@ -66,6 +69,7 @@ const Text = ({
green,
black,
blue,
red,
primary,
small,
upper,
Expand All @@ -87,6 +91,8 @@ const Text = ({
green && style.green,
black && style.black,
blue && style.blue,
red && style.red,
black && style.black,
primary && style.primary,
disclaimer && [style.small, style.disclaimer],
small && style.small,
Expand All @@ -110,6 +116,7 @@ Text.defaultProps = {
green: false,
black: false,
blue: false,
red: false,
primary: false,
disclaimer: false,
modal: false,
Expand Down Expand Up @@ -150,6 +157,10 @@ Text.propTypes = {
* Makes text blue
*/
blue: PropTypes.bool,
/**
* Makes text red
*/
red: PropTypes.bool,
/**
* Makes text fontPrimary color
*/
Expand Down
7 changes: 6 additions & 1 deletion app/components/Nav/App/index.js
Expand Up @@ -28,6 +28,7 @@ import Engine from '../../../core/Engine';
import Logger from '../../../util/Logger';
import Branch from 'react-native-branch';
import AppConstants from '../../../core/AppConstants';
import { trackErrorAsAnalytics } from '../../../util/analyticsV2';

/**
* Stack navigator responsible for the onboarding process
Expand Down Expand Up @@ -186,7 +187,11 @@ class App extends PureComponent {

handleDeeplinks = async ({ error, params, uri }) => {
if (error) {
Logger.error(error, 'Deeplink: Error from Branch');
if (error === 'Trouble reaching the Branch servers, please try again shortly.') {
trackErrorAsAnalytics('Branch: Trouble reaching servers', error);
} else {
Logger.error(error, 'Deeplink: Error from Branch');
}
}
const deeplink = params['+non_branch_link'] || uri || null;
try {
Expand Down
40 changes: 27 additions & 13 deletions app/components/Nav/Main/index.js
Expand Up @@ -38,7 +38,6 @@ import {
decodeApproveData
} from '../../../util/transactions';
import { BN } from 'ethereumjs-util';
import { safeToChecksumAddress } from '../../../util/address';
import Logger from '../../../util/Logger';
import contractMap from '@metamask/contract-metadata';
import MessageSign from '../../UI/MessageSign';
Expand All @@ -58,7 +57,8 @@ import AccountApproval from '../../UI/AccountApproval';
import ProtectYourWalletModal from '../../UI/ProtectYourWalletModal';
import MainNavigator from './MainNavigator';
import SkipAccountSecurityModal from '../../UI/SkipAccountSecurityModal';
import { swapsUtils, util } from '@estebanmino/controllers';
import { swapsUtils } from '@metamask/swaps-controller';
import { util } from '@metamask/controllers';
import SwapsLiveness from '../../UI/Swaps/SwapsLiveness';
import Analytics from '../../../core/Analytics';
import { ANALYTICS_EVENT_OPTS } from '../../../util/analytics';
Expand All @@ -67,7 +67,8 @@ import { setInfuraAvailabilityBlocked, setInfuraAvailabilityNotBlocked } from '.

const styles = StyleSheet.create({
flex: {
flex: 1
flex: 1,
marginTop: Device.isIphone12() ? 20 : 0
},
loader: {
backgroundColor: colors.white,
Expand Down Expand Up @@ -238,12 +239,12 @@ const Main = props => {
.div(gasEstimate)
.times(100)
.toFixed(2)}%`;
const quoteVsExecutionRatio = `${util
const quoteVsExecutionRatio = `${swapsUtils
.calcTokenAmount(tokensReceived || '0x0', swapTransaction.destinationTokenDecimals)
.div(swapTransaction.destinationAmount)
.times(100)
.toFixed(2)}%`;
const tokenToAmountReceived = util.calcTokenAmount(
const tokenToAmountReceived = swapsUtils.calcTokenAmount(
tokensReceived,
swapTransaction.destinationToken.decimals
);
Expand Down Expand Up @@ -310,16 +311,18 @@ const Main = props => {
async transactionMeta => {
if (transactionMeta.origin === TransactionTypes.MMM) return;

const to = safeToChecksumAddress(transactionMeta.transaction.to);
const to = transactionMeta.transaction.to?.toLowerCase();
const { data } = transactionMeta.transaction;

// if approval data includes metaswap contract
// if destination address is metaswap contract
if (
to === safeToChecksumAddress(swapsUtils.SWAPS_CONTRACT_ADDRESS) ||
(data &&
data.substr(0, 10) === APPROVE_FUNCTION_SIGNATURE &&
decodeApproveData(data).spenderAddress === swapsUtils.SWAPS_CONTRACT_ADDRESS)
to &&
(to === swapsUtils.getSwapsContractAddress(props.chainId) ||
(data &&
data.substr(0, 10) === APPROVE_FUNCTION_SIGNATURE &&
decodeApproveData(data).spenderAddress?.toLowerCase() ===
swapsUtils.getSwapsContractAddress(props.chainId)))
) {
if (transactionMeta.origin === process.env.MM_FOX_CODE) {
autoSign(transactionMeta);
Expand Down Expand Up @@ -388,6 +391,7 @@ const Main = props => {
},
[
props.tokens,
props.chainId,
setEtherTransaction,
setTransactionObject,
toggleApproveModal,
Expand Down Expand Up @@ -568,6 +572,14 @@ const Main = props => {
}
});

// unapprovedTransaction effect
useEffect(() => {
Engine.context.TransactionController.hub.on('unapprovedTransaction', onUnapprovedTransaction);
return () => {
Engine.context.TransactionController.hub.removeListener('unapprovedTransaction', onUnapprovedTransaction);
};
}, [onUnapprovedTransaction]);

useEffect(() => {
initializeWalletConnect();
AppState.addEventListener('change', handleAppStateChange);
Expand Down Expand Up @@ -596,8 +608,6 @@ const Main = props => {
}
});

Engine.context.TransactionController.hub.on('unapprovedTransaction', onUnapprovedTransaction);

Engine.context.MessageManager.hub.on('unapprovedMessage', messageParams =>
onUnapprovedMessage(messageParams, 'eth')
);
Expand Down Expand Up @@ -628,7 +638,6 @@ const Main = props => {
lockManager.current.stopListening();
Engine.context.PersonalMessageManager.hub.removeAllListeners();
Engine.context.TypedMessageManager.hub.removeAllListeners();
Engine.context.TransactionController.hub.removeListener('unapprovedTransaction', onUnapprovedTransaction);
WalletConnect.hub.removeAllListeners();
removeConnectionStatusListener.current && removeConnectionStatusListener.current();
};
Expand Down Expand Up @@ -737,6 +746,10 @@ Main.propTypes = {
* Selected address
*/
selectedAddress: PropTypes.string,
/**
* Chain id
*/
chainId: PropTypes.string,
/**
* Network provider type
*/
Expand All @@ -755,6 +768,7 @@ const mapStateToProps = state => ({
lockTime: state.settings.lockTime,
thirdPartyApiMode: state.privacy.thirdPartyApiMode,
selectedAddress: state.engine.backgroundState.PreferencesController.selectedAddress,
chainId: state.engine.backgroundState.NetworkController.provider.chainId,
tokens: state.engine.backgroundState.AssetsController.tokens,
isPaymentRequest: state.transaction.paymentRequest,
dappTransactionModalVisible: state.modals.dappTransactionModalVisible,
Expand Down

0 comments on commit 867369e

Please sign in to comment.