Merge pull request #8444 from MetaMask/Version-v7.7.9

Version v7.7.9 RC
feature/default_network_editable
Thomas Huang 5 years ago committed by GitHub
commit 5e8a80e21d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 17
      CHANGELOG.md
  2. 2
      app/_locales/de/messages.json
  3. 11
      app/_locales/en/messages.json
  4. 2
      app/manifest.json
  5. 2
      app/phishing.html
  6. 1
      app/scripts/background.js
  7. 7
      app/scripts/controllers/app-state.js
  8. 2
      app/scripts/controllers/ens/ens.js
  9. 1
      app/scripts/controllers/transactions/index.js
  10. 15
      app/scripts/controllers/transactions/lib/tx-state-history-helper.js
  11. 4
      app/scripts/controllers/transactions/tx-state-manager.js
  12. 3
      app/scripts/metamask-controller.js
  13. 2
      app/scripts/phishing-detect.js
  14. 3
      package.json
  15. 17
      test/unit/app/controllers/transactions/tx-state-manager-test.js
  16. 6
      test/unit/balance-formatter-test.js
  17. 78
      ui/app/components/app/dai-migration-component/dai-migration-notification.component.js
  18. 34
      ui/app/components/app/dai-migration-component/dai-migration-notification.container.js
  19. 1
      ui/app/components/app/dai-migration-component/index.js
  20. 2
      ui/app/components/app/loading-network-screen/loading-network-screen.container.js
  21. 250
      ui/app/helpers/constants/available-conversions.json
  22. 653
      ui/app/helpers/constants/infura-conversion.json
  23. 7
      ui/app/helpers/utils/transactions.util.js
  24. 9
      ui/app/pages/home/home.component.js
  25. 3
      ui/app/pages/home/home.container.js
  26. 2
      ui/app/pages/send/send-content/add-recipient/ens-input.component.js
  27. 20
      ui/app/pages/settings/networks-tab/networks-tab.constants.js
  28. 10
      ui/app/pages/settings/settings-tab/settings-tab.component.js
  29. 7
      ui/app/selectors/selectors.js
  30. 11
      ui/app/store/actions.js
  31. 10
      yarn.lock

@ -2,6 +2,23 @@
## Current Develop Branch
## 7.7.9 Tue Apr 28 2020
- [#8446](https://github.com/MetaMask/metamask-extension/pull/8446): Fix popup not opening
- [#8449](https://github.com/MetaMask/metamask-extension/pull/8449): Skip adding history entry for empty txMeta diffs
- [#8447](https://github.com/MetaMask/metamask-extension/pull/8447): Delete Dai/Sai migration notification
- [#8460](https://github.com/MetaMask/metamask-extension/pull/8460): Update deposit copy for Wyre
- [#8458](https://github.com/MetaMask/metamask-extension/pull/8458): Snapshot txMeta without cloning history
- [#8459](https://github.com/MetaMask/metamask-extension/pull/8459): Fix method registry initialization
- [#8455](https://github.com/MetaMask/metamask-extension/pull/8455): Add Dai/Sai to currency display
- [#8461](https://github.com/MetaMask/metamask-extension/pull/8461): Prevent network switch upon close of network timeout overlay
- [#8457](https://github.com/MetaMask/metamask-extension/pull/8457): Add INR currency option
- [#8462](https://github.com/MetaMask/metamask-extension/pull/8462): Fix display of Kovan and Rinkeby chain IDs
- [#8465](https://github.com/MetaMask/metamask-extension/pull/8465): Use ethereum-ens-network-map for network support
- [#8463](https://github.com/MetaMask/metamask-extension/pull/8463): Update deprecated Etherscam link
- [#8474](https://github.com/MetaMask/metamask-extension/pull/8474): Only update pending transactions upon block update
- [#8476](https://github.com/MetaMask/metamask-extension/pull/8476): Update eth-contract-metadata
- [#8509](https://github.com/MetaMask/metamask-extension/pull/8509): Fix Tohen Typo
## 7.7.8 Wed Mar 11 2020
- [#8176](https://github.com/MetaMask/metamask-extension/pull/8176): Handle and set gas estimation when max mode is clicked
- [#8178](https://github.com/MetaMask/metamask-extension/pull/8178): Use specified gas limit when speeding up a transaction

@ -328,7 +328,7 @@
"message": "Höhere Gebühren können Bearbeitungszeiten verkürzen, wofür es allerdings keine Garantie gibt."
},
"customToken": {
"message": "Custom-Tohen"
"message": "Custom-Token"
},
"customRPC": {
"message": "Spezieller RPC"

@ -1,13 +1,4 @@
{
"migrateSai": {
"message": "A message from Maker: The new Multi-Collateral Dai token has been released. Your old tokens are now called Sai. Please upgrade your Sai tokens to the new Dai."
},
"migrateSaiInfo": {
"message": "To dismiss this notification you can migrate your tokens or hide SAI from the token list."
},
"migrate": {
"message": "Migrate"
},
"showIncomingTransactions": {
"message": "Show Incoming Transactions"
},
@ -238,7 +229,7 @@
"message": "Buy ETH with Wyre"
},
"buyWithWyreDescription": {
"message": "Wyre lets you use a credit card to deposit ETH right in to your MetaMask account."
"message": "Wyre lets you use a debit card to deposit ETH right in to your MetaMask account."
},
"buyCoinSwitch": {
"message": "Buy on CoinSwitch"

@ -1,7 +1,7 @@
{
"name": "__MSG_appName__",
"short_name": "__MSG_appName__",
"version": "7.7.8",
"version": "7.7.9",
"manifest_version": 2,
"author": "https://metamask.io",
"description": "__MSG_appDescription__",

@ -47,7 +47,7 @@
<a href="https://github.com/metamask/eth-phishing-detect">Ethereum Phishing Detector</a>.
Domains on these warning lists may include outright malicious websites and legitimate websites that have been compromised by a malicious actor.
</p>
<p>To read more about this site <a id="esdbLink">please review the domain on Etherscam</a>.</p>
<p>To read more about this site <a id="csdbLink">please search for the domain on CryptoScamDB</a>.</p>
<p>
Note that this warning list is compiled on a voluntary basis. This list may be inaccurate or incomplete.
Just because a domain does not appear on this list is not an implicit guarantee of that domain's safety.

@ -447,7 +447,6 @@ function triggerUi () {
const currentlyActiveMetamaskTab = Boolean(tabs.find(tab => openMetamaskTabsIDs[tab.id]))
if (!popupIsOpen && !currentlyActiveMetamaskTab && !notificationIsOpen) {
notificationManager.showPopup()
notificationIsOpen = true
}
})
}

@ -13,7 +13,6 @@ class AppStateController {
this.onInactiveTimeout = onInactiveTimeout || (() => {})
this.store = new ObservableStore(extend({
timeoutMinutes: 0,
mkrMigrationReminderTimestamp: null,
}, initState))
this.timer = null
@ -24,12 +23,6 @@ class AppStateController {
this._setInactiveTimeout(preferences.autoLogoutTimeLimit)
}
setMkrMigrationReminderTimestamp (timestamp) {
this.store.updateState({
mkrMigrationReminderTimestamp: timestamp,
})
}
/**
* Sets the last active time to the current time
* @return {void}

@ -1,5 +1,5 @@
const EthJsEns = require('ethjs-ens')
const ensNetworkMap = require('ethjs-ens/lib/network-map.json')
const ensNetworkMap = require('ethereum-ens-network-map')
class Ens {
static getNetworkEnsSupport (network) {

@ -724,7 +724,6 @@ class TransactionController extends EventEmitter {
Updates the memStore in transaction controller
*/
_updateMemstore () {
this.pendingTxTracker.updatePendingTxs()
const unapprovedTxs = this.txStateManager.getUnapprovedTxList()
const selectedAddressTxList = this.txStateManager.getFilteredTxList({
from: this.getSelectedAddress(),

@ -57,13 +57,12 @@ function replayHistory (_shortHistory) {
}
/**
@param txMeta {Object}
@returns {object} a clone object of the txMeta with out history
*/
* Snapshot {@code txMeta}
* @param {Object} txMeta - the tx metadata object
* @returns {Object} a deep clone without history
*/
function snapshotFromTxMeta (txMeta) {
// create txMeta snapshot for history
const snapshot = clone(txMeta)
// dont include previous history in this snapshot
delete snapshot.history
return snapshot
const shallow = { ...txMeta }
delete shallow.history
return clone(shallow)
}

@ -195,7 +195,9 @@ class TransactionStateManager extends EventEmitter {
const previousState = txStateHistoryHelper.replayHistory(txMeta.history)
// generate history entry and add to history
const entry = txStateHistoryHelper.generateHistoryEntry(previousState, currentState, note)
txMeta.history.push(entry)
if (entry.length) {
txMeta.history.push(entry)
}
// commit txMeta to state
const txId = txMeta.id

@ -509,7 +509,6 @@ module.exports = class MetamaskController extends EventEmitter {
// AppStateController
setLastActiveTime: nodeify(this.appStateController.setLastActiveTime, this.appStateController),
setMkrMigrationReminderTimestamp: nodeify(this.appStateController.setMkrMigrationReminderTimestamp, this.appStateController),
// EnsController
tryReverseResolveAddress: nodeify(this.ensController.reverseResolveAddress, this.ensController),
@ -768,7 +767,7 @@ module.exports = class MetamaskController extends EventEmitter {
}
await this.preferencesController.syncAddresses(accounts)
await this.txController.pendingTxTracker.updatePendingTxs()
await this.blockTracker.checkForLatestBlock()
try {
const threeBoxSyncingAllowed = this.threeBoxController.getThreeBoxSyncingState()

@ -14,7 +14,7 @@ function start () {
const hash = window.location.hash.substring(1)
const suspect = querystring.parse(hash)
document.getElementById('esdbLink').href = `https://etherscamdb.info/domain/${suspect.hostname}`
document.getElementById('csdbLink').href = `https://cryptoscamdb.org/search`
global.platform = new ExtensionPlatform()
global.METAMASK_UI_TYPE = windowType

@ -88,7 +88,7 @@
"dnode": "^1.2.2",
"end-of-stream": "^1.1.0",
"eth-block-tracker": "^4.4.2",
"eth-contract-metadata": "^1.12.1",
"eth-contract-metadata": "^1.13.0",
"eth-ens-namehash": "^2.0.8",
"eth-json-rpc-errors": "^1.1.0",
"eth-json-rpc-filters": "^4.1.1",
@ -101,6 +101,7 @@
"eth-sig-util": "^2.3.0",
"eth-token-tracker": "^1.1.10",
"eth-trezor-keyring": "^0.4.0",
"ethereum-ens-network-map": "^1.0.2",
"ethereumjs-abi": "^0.6.4",
"ethereumjs-tx": "1.3.7",
"ethereumjs-util": "5.1.0",

@ -252,6 +252,23 @@ describe('TransactionStateManager', function () {
assert.deepEqual(result.history[1][0].value, expectedEntry.value, 'two history items (initial + diff) value')
assert.ok(result.history[1][0].timestamp >= before && result.history[1][0].timestamp <= after)
})
it('does NOT add empty history items', function () {
const txMeta = {
id: '1',
status: 'unapproved',
metamaskNetworkId: currentNetworkId,
txParams: {
gasPrice: '0x01',
},
}
txStateManager.addTx(txMeta)
txStateManager.updateTx(txMeta)
const { history } = txStateManager.getTx('1')
assert.equal(history.length, 1, 'two history items (initial + diff)')
})
})
describe('#getUnapprovedTxList', function () {

@ -1,13 +1,13 @@
const assert = require('assert')
const currencyFormatter = require('currency-formatter')
const infuraConversion = require('../../ui/app/helpers/constants/infura-conversion.json')
const availableCurrencies = require('../../ui/app/helpers/constants/available-conversions.json')
describe('currencyFormatting', function () {
it('be able to format any infura currency', function (done) {
const number = 10000
infuraConversion.objects.forEach((conversion) => {
const code = conversion.quote.code.toUpperCase()
availableCurrencies.forEach((conversion) => {
const code = conversion.code.toUpperCase()
const result = currencyFormatter.format(number, { code })
switch (code) {

@ -1,78 +0,0 @@
import { DateTime } from 'luxon'
import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import HomeNotification from '../home-notification'
export default class DaiV1MigrationNotification extends PureComponent {
static contextTypes = {
t: PropTypes.func,
}
static defaultProps = {
mkrMigrationReminderTimestamp: null,
string: '',
symbol: '',
}
static propTypes = {
setMkrMigrationReminderTimestamp: PropTypes.func.isRequired,
mkrMigrationReminderTimestamp: PropTypes.string,
string: PropTypes.string,
symbol: PropTypes.string,
}
remindMeLater = () => {
const nextWeek = DateTime.utc().plus({
days: 7,
})
this.props.setMkrMigrationReminderTimestamp(nextWeek.toString())
}
render () {
const { t } = this.context
const { mkrMigrationReminderTimestamp, string: balanceString, symbol } = this.props
if (mkrMigrationReminderTimestamp) {
const reminderDateTime = DateTime.fromISO(mkrMigrationReminderTimestamp, {
zone: 'UTC',
})
if (reminderDateTime > DateTime.utc()) {
return null
}
}
if (!balanceString || !symbol) {
return null
}
if (balanceString === '0') {
return null
}
return (
<HomeNotification
descriptionText={(
<div>
{t('migrateSai')}
&nbsp;
<a
href="#"
onClick={() => {
window.open('https://blog.makerdao.com/multi-collateral-dai-is-live/', '_blank', 'noopener')
}}
>
{t('learnMore')}.
</a>
</div>
)}
acceptText={t('migrate')}
onAccept={() => {
window.open('https://migrate.makerdao.com', '_blank', 'noopener')
}}
ignoreText={t('remindMeLater')}
onIgnore={this.remindMeLater}
infoText={t('migrateSaiInfo')}
/>
)
}
}

@ -1,34 +0,0 @@
import { connect } from 'react-redux'
import { compose } from 'recompose'
import DaiMigrationNotification from './dai-migration-notification.component'
import withTokenTracker from '../../../helpers/higher-order-components/with-token-tracker'
import { getSelectedAddress, getDaiV1Token } from '../../../selectors/selectors'
import { setMkrMigrationReminderTimestamp } from '../../../store/actions'
const mapStateToProps = (state) => {
const {
metamask: {
mkrMigrationReminderTimestamp,
},
} = state
const userAddress = getSelectedAddress(state)
const oldDai = getDaiV1Token(state)
return {
mkrMigrationReminderTimestamp,
userAddress,
token: oldDai,
}
}
const mapDispatchToProps = (dispatch) => {
return {
setMkrMigrationReminderTimestamp: (t) => dispatch(setMkrMigrationReminderTimestamp(t)),
}
}
export default compose(
connect(mapStateToProps, mapDispatchToProps),
withTokenTracker,
)(DaiMigrationNotification)

@ -1 +0,0 @@
export { default } from './dai-migration-notification.container'

@ -7,10 +7,10 @@ const mapStateToProps = state => {
const {
loadingMessage,
currentView,
lastSelectedProvider,
} = state.appState
const {
provider,
lastSelectedProvider,
network,
} = state.metamask
const { rpcTarget, chainId, ticker, nickname, type } = provider

@ -0,0 +1,250 @@
[
{
"code": "aud",
"name": "Australian Dollar"
},
{
"code": "hkd",
"name": "Hong Kong Dollar"
},
{
"code": "sgd",
"name": "Singapore Dollar"
},
{
"code": "idr",
"name": "Indonesian Rupiah"
},
{
"code": "inr",
"name": "Indian Rupee"
},
{
"code": "php",
"name": "Philippine Peso"
},
{
"code": "1st",
"name": "FirstBlood"
},
{
"code": "adt",
"name": "adToken"
},
{
"code": "adx",
"name": "AdEx"
},
{
"code": "ant",
"name": "Aragon"
},
{
"code": "bat",
"name": "Basic Attention Token"
},
{
"code": "bnt",
"name": "Bancor"
},
{
"code": "btc",
"name": "Bitcoin"
},
{
"code": "cad",
"name": "Canadian Dollar"
},
{
"code": "cfi",
"name": "Cofound.it"
},
{
"code": "crb",
"name": "CreditBit"
},
{
"code": "cvc",
"name": "Civic"
},
{
"code": "dash",
"name": "Dash"
},
{
"code": "dgd",
"name": "DigixDAO"
},
{
"code": "etc",
"name": "Ethereum Classic"
},
{
"code": "eur",
"name": "Euro"
},
{
"code": "fun",
"name": "FunFair"
},
{
"code": "gbp",
"name": "Pound Sterling"
},
{
"code": "gno",
"name": "Gnosis"
},
{
"code": "gnt",
"name": "Golem"
},
{
"code": "gup",
"name": "Matchpool"
},
{
"code": "hmq",
"name": "Humaniq"
},
{
"code": "jpy",
"name": "Japanese Yen"
},
{
"code": "lgd",
"name": "Legends Room"
},
{
"code": "lsk",
"name": "Lisk"
},
{
"code": "ltc",
"name": "Litecoin"
},
{
"code": "lun",
"name": "Lunyr"
},
{
"code": "mco",
"name": "Monaco"
},
{
"code": "mtl",
"name": "Metal"
},
{
"code": "myst",
"name": "Mysterium"
},
{
"code": "nmr",
"name": "Numeraire"
},
{
"code": "omg",
"name": "OmiseGO"
},
{
"code": "pay",
"name": "TenX"
},
{
"code": "ptoy",
"name": "Patientory"
},
{
"code": "qrl",
"name": "Quantum-Resistant Ledger"
},
{
"code": "qtum",
"name": "Qtum"
},
{
"code": "rep",
"name": "Augur"
},
{
"code": "rlc",
"name": "iEx.ec"
},
{
"code": "rub",
"name": "Russian Ruble"
},
{
"code": "sc",
"name": "Siacoin"
},
{
"code": "sngls",
"name": "SingularDTV"
},
{
"code": "snt",
"name": "Status"
},
{
"code": "steem",
"name": "Steem"
},
{
"code": "storj",
"name": "Storj"
},
{
"code": "time",
"name": "ChronoBank"
},
{
"code": "tkn",
"name": "TokenCard"
},
{
"code": "trst",
"name": "WeTrust"
},
{
"code": "uah",
"name": "Ukrainian Hryvnia"
},
{
"code": "usd",
"name": "United States Dollar"
},
{
"code": "wings",
"name": "Wings"
},
{
"code": "xem",
"name": "NEM"
},
{
"code": "xlm",
"name": "Stellar Lumen"
},
{
"code": "xmr",
"name": "Monero"
},
{
"code": "xrp",
"name": "Ripple"
},
{
"code": "zec",
"name": "Zcash"
},
{
"code": "dai",
"name": "DAI"
},
{
"code": "sai",
"name": "SAI"
}
]

@ -1,653 +0,0 @@
{
"objects": [
{
"symbol": "ethaud",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "aud",
"name": "Australian Dollar"
}
},
{
"symbol": "ethhkd",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "hkd",
"name": "Hong Kong Dollar"
}
},
{
"symbol": "ethsgd",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "sgd",
"name": "Singapore Dollar"
}
},
{
"symbol": "ethidr",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "idr",
"name": "Indonesian Rupiah"
}
},
{
"symbol": "ethphp",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "php",
"name": "Philippine Peso"
}
},
{
"symbol": "eth1st",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "1st",
"name": "FirstBlood"
}
},
{
"symbol": "ethadt",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "adt",
"name": "adToken"
}
},
{
"symbol": "ethadx",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "adx",
"name": "AdEx"
}
},
{
"symbol": "ethant",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "ant",
"name": "Aragon"
}
},
{
"symbol": "ethbat",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "bat",
"name": "Basic Attention Token"
}
},
{
"symbol": "ethbnt",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "bnt",
"name": "Bancor"
}
},
{
"symbol": "ethbtc",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "btc",
"name": "Bitcoin"
}
},
{
"symbol": "ethcad",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "cad",
"name": "Canadian Dollar"
}
},
{
"symbol": "ethcfi",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "cfi",
"name": "Cofound.it"
}
},
{
"symbol": "ethcrb",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "crb",
"name": "CreditBit"
}
},
{
"symbol": "ethcvc",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "cvc",
"name": "Civic"
}
},
{
"symbol": "ethdash",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "dash",
"name": "Dash"
}
},
{
"symbol": "ethdgd",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "dgd",
"name": "DigixDAO"
}
},
{
"symbol": "ethetc",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "etc",
"name": "Ethereum Classic"
}
},
{
"symbol": "etheur",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "eur",
"name": "Euro"
}
},
{
"symbol": "ethfun",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "fun",
"name": "FunFair"
}
},
{
"symbol": "ethgbp",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "gbp",
"name": "Pound Sterling"
}
},
{
"symbol": "ethgno",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "gno",
"name": "Gnosis"
}
},
{
"symbol": "ethgnt",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "gnt",
"name": "Golem"
}
},
{
"symbol": "ethgup",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "gup",
"name": "Matchpool"
}
},
{
"symbol": "ethhmq",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "hmq",
"name": "Humaniq"
}
},
{
"symbol": "ethjpy",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "jpy",
"name": "Japanese Yen"
}
},
{
"symbol": "ethlgd",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "lgd",
"name": "Legends Room"
}
},
{
"symbol": "ethlsk",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "lsk",
"name": "Lisk"
}
},
{
"symbol": "ethltc",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "ltc",
"name": "Litecoin"
}
},
{
"symbol": "ethlun",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "lun",
"name": "Lunyr"
}
},
{
"symbol": "ethmco",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "mco",
"name": "Monaco"
}
},
{
"symbol": "ethmtl",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "mtl",
"name": "Metal"
}
},
{
"symbol": "ethmyst",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "myst",
"name": "Mysterium"
}
},
{
"symbol": "ethnmr",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "nmr",
"name": "Numeraire"
}
},
{
"symbol": "ethomg",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "omg",
"name": "OmiseGO"
}
},
{
"symbol": "ethpay",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "pay",
"name": "TenX"
}
},
{
"symbol": "ethptoy",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "ptoy",
"name": "Patientory"
}
},
{
"symbol": "ethqrl",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "qrl",
"name": "Quantum-Resistant Ledger"
}
},
{
"symbol": "ethqtum",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "qtum",
"name": "Qtum"
}
},
{
"symbol": "ethrep",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "rep",
"name": "Augur"
}
},
{
"symbol": "ethrlc",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "rlc",
"name": "iEx.ec"
}
},
{
"symbol": "ethrub",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "rub",
"name": "Russian Ruble"
}
},
{
"symbol": "ethsc",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "sc",
"name": "Siacoin"
}
},
{
"symbol": "ethsngls",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "sngls",
"name": "SingularDTV"
}
},
{
"symbol": "ethsnt",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "snt",
"name": "Status"
}
},
{
"symbol": "ethsteem",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "steem",
"name": "Steem"
}
},
{
"symbol": "ethstorj",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "storj",
"name": "Storj"
}
},
{
"symbol": "ethtime",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "time",
"name": "ChronoBank"
}
},
{
"symbol": "ethtkn",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "tkn",
"name": "TokenCard"
}
},
{
"symbol": "ethtrst",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "trst",
"name": "WeTrust"
}
},
{
"symbol": "ethuah",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "uah",
"name": "Ukrainian Hryvnia"
}
},
{
"symbol": "ethusd",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "usd",
"name": "United States Dollar"
}
},
{
"symbol": "ethwings",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "wings",
"name": "Wings"
}
},
{
"symbol": "ethxem",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "xem",
"name": "NEM"
}
},
{
"symbol": "ethxlm",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "xlm",
"name": "Stellar Lumen"
}
},
{
"symbol": "ethxmr",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "xmr",
"name": "Monero"
}
},
{
"symbol": "ethxrp",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "xrp",
"name": "Ripple"
}
},
{
"symbol": "ethzec",
"base": {
"code": "eth",
"name": "Ethereum"
},
"quote": {
"code": "zec",
"name": "Zcash"
}
}
]
}

@ -47,8 +47,7 @@ async function getMethodFrom4Byte (fourBytePrefix) {
return null
}
}
const registry = new MethodRegistry({ provider: global.ethereumProvider })
let registry
/**
* Attempts to return the method data from the MethodRegistry library, the message registry library and the token abi, in that order of preference
@ -62,6 +61,10 @@ export async function getMethodDataAsync (fourBytePrefix) {
return null
})
if (!registry) {
registry = new MethodRegistry({ provider: global.ethereumProvider })
}
let sig = await registry.lookup(fourBytePrefix)
if (!sig) {

@ -4,7 +4,6 @@ import Media from 'react-media'
import { Redirect } from 'react-router-dom'
import { formatDate } from '../../helpers/utils/util'
import HomeNotification from '../../components/app/home-notification'
import DaiMigrationNotification from '../../components/app/dai-migration-component'
import MultipleNotifications from '../../components/app/multiple-notifications'
import WalletView from '../../components/app/wallet-view'
import TransactionView from '../../components/app/transaction-view'
@ -24,7 +23,6 @@ export default class Home extends PureComponent {
static defaultProps = {
unsetMigratedPrivacyMode: null,
hasDaiV1Token: false,
}
static propTypes = {
@ -45,7 +43,6 @@ export default class Home extends PureComponent {
restoreFromThreeBox: PropTypes.func,
setShowRestorePromptToFalse: PropTypes.func,
threeBoxLastUpdated: PropTypes.number,
hasDaiV1Token: PropTypes.bool,
}
componentWillMount () {
@ -89,7 +86,6 @@ export default class Home extends PureComponent {
forgottenPassword,
providerRequests,
history,
hasDaiV1Token,
showPrivacyModeNotification,
unsetMigratedPrivacyMode,
shouldShowSeedPhraseReminder,
@ -176,11 +172,6 @@ export default class Home extends PureComponent {
/>
: null
}
{
hasDaiV1Token
? <DaiMigrationNotification />
: null
}
</MultipleNotifications>
</TransactionView>
)

@ -3,7 +3,7 @@ import { compose } from 'recompose'
import { connect } from 'react-redux'
import { withRouter } from 'react-router-dom'
import { unconfirmedTransactionsCountSelector } from '../../selectors/confirm-transaction'
import { getCurrentEthBalance, getDaiV1Token } from '../../selectors/selectors'
import { getCurrentEthBalance } from '../../selectors/selectors'
import {
unsetMigratedPrivacyMode,
restoreFromThreeBox,
@ -44,7 +44,6 @@ const mapStateToProps = state => {
showRestorePrompt,
selectedAddress,
threeBoxLastUpdated,
hasDaiV1Token: Boolean(getDaiV1Token(state)),
}
}

@ -7,7 +7,7 @@ import { ellipsify } from '../../send.utils'
import debounce from 'debounce'
import copyToClipboard from 'copy-to-clipboard/index'
import ENS from 'ethjs-ens'
import networkMap from 'ethjs-ens/lib/network-map.json'
import networkMap from 'ethereum-ens-network-map'
import log from 'loglevel'

@ -17,21 +17,12 @@ const defaultNetworksData = [
ticker: 'ETH',
blockExplorerUrl: 'https://ropsten.etherscan.io',
},
{
labelKey: 'kovan',
iconColor: '#9064FF',
providerType: 'kovan',
rpcUrl: 'https://api.infura.io/v1/jsonrpc/kovan',
chainId: '4',
ticker: 'ETH',
blockExplorerUrl: 'https://etherscan.io',
},
{
labelKey: 'rinkeby',
iconColor: '#F6C343',
providerType: 'rinkeby',
rpcUrl: 'https://api.infura.io/v1/jsonrpc/rinkeby',
chainId: '42',
chainId: '4',
ticker: 'ETH',
blockExplorerUrl: 'https://rinkeby.etherscan.io',
},
@ -44,6 +35,15 @@ const defaultNetworksData = [
ticker: 'ETH',
blockExplorerUrl: 'https://goerli.etherscan.io',
},
{
labelKey: 'kovan',
iconColor: '#9064FF',
providerType: 'kovan',
rpcUrl: 'https://api.infura.io/v1/jsonrpc/kovan',
chainId: '42',
ticker: 'ETH',
blockExplorerUrl: 'https://etherscan.io',
},
{
labelKey: 'localhost',
iconColor: 'white',

@ -1,15 +1,15 @@
import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import infuraCurrencies from '../../../helpers/constants/infura-conversion.json'
import availableCurrencies from '../../../helpers/constants/available-conversions'
import SimpleDropdown from '../../../components/app/dropdowns/simple-dropdown'
import ToggleButton from '../../../components/ui/toggle-button'
import locales from '../../../../../app/_locales/index.json'
const sortedCurrencies = infuraCurrencies.objects.sort((a, b) => {
return a.quote.name.toLocaleLowerCase().localeCompare(b.quote.name.toLocaleLowerCase())
const sortedCurrencies = availableCurrencies.sort((a, b) => {
return a.name.toLocaleLowerCase().localeCompare(b.name.toLocaleLowerCase())
})
const infuraCurrencyOptions = sortedCurrencies.map(({ quote: { code, name } }) => {
const currencyOptions = sortedCurrencies.map(({ code, name }) => {
return {
displayValue: `${code.toUpperCase()} - ${name}`,
key: code,
@ -63,7 +63,7 @@ export default class SettingsTab extends PureComponent {
<div className="settings-page__content-item-col">
<SimpleDropdown
placeholder={t('selectCurrency')}
options={infuraCurrencyOptions}
options={currencyOptions}
selectedOption={currentCurrency}
onSelect={newCurrency => setCurrentCurrency(newCurrency)}
/>

@ -49,7 +49,6 @@ const selectors = {
getAccountType,
getNumberOfAccounts,
getNumberOfTokens,
getDaiV1Token,
isEthereumNetwork,
getMetaMetricState,
getRpcPrefsForCurrentProvider,
@ -226,12 +225,6 @@ function getAddressBookEntryName (state, address) {
return entry && entry.name !== '' ? entry.name : addressSlicer(address)
}
function getDaiV1Token (state) {
const OLD_DAI_CONTRACT_ADDRESS = '0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359'
const tokens = state.metamask.tokens || []
return tokens.find(({address}) => checksumAddress(address) === OLD_DAI_CONTRACT_ADDRESS)
}
function accountsWithSendEtherInfoSelector (state) {
const accounts = getMetaMaskAccounts(state)
const { identities } = state.metamask

@ -367,7 +367,6 @@ var actions = {
// AppStateController-related actions
SET_LAST_ACTIVE_TIME: 'SET_LAST_ACTIVE_TIME',
setLastActiveTime,
setMkrMigrationReminderTimestamp,
getContractMethodData,
loadingMethoDataStarted,
@ -2756,16 +2755,6 @@ function setLastActiveTime () {
}
}
function setMkrMigrationReminderTimestamp (timestamp) {
return (dispatch) => {
background.setMkrMigrationReminderTimestamp(timestamp, (err) => {
if (err) {
return dispatch(actions.displayWarning(err.message))
}
})
}
}
function loadingMethoDataStarted () {
return {
type: actions.LOADING_METHOD_DATA_STARTED,

@ -10049,10 +10049,10 @@ eth-block-tracker@^4.4.2:
pify "^3.0.0"
safe-event-emitter "^1.0.1"
eth-contract-metadata@^1.11.0, eth-contract-metadata@^1.12.1:
version "1.12.1"
resolved "https://registry.yarnpkg.com/eth-contract-metadata/-/eth-contract-metadata-1.12.1.tgz#41014c8c0123453cee15acbcc14299c4d470c759"
integrity sha512-9u2jUcdxaKIv4RvA9RtjyD4+M2yWt4yCulR5bpdQTiG3HUFnN9lHtNL5NIRDpvQVJKerFhexrgEM2WdGP3a6VA==
eth-contract-metadata@^1.11.0, eth-contract-metadata@^1.13.0:
version "1.13.0"
resolved "https://registry.yarnpkg.com/eth-contract-metadata/-/eth-contract-metadata-1.13.0.tgz#9819d0e556ea2187da91d6b49ce96abc5fce2a73"
integrity sha512-9CjXHX8IdXysUEvOHdbCsjdAwM1E98jaeK2HeOqm/9S/vOZ8YryaBBt/YSiBq3MkpCwf+d1pEQ53p96rsdy52w==
eth-ens-namehash@2.0.8, eth-ens-namehash@^2.0.8:
version "2.0.8"
@ -10369,7 +10369,7 @@ ethereum-common@^0.0.18:
resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.0.18.tgz#2fdc3576f232903358976eb39da783213ff9523f"
integrity sha1-L9w1dvIykDNYl26znaeDIT/5Uj8=
ethereum-ens-network-map@^1.0.0:
ethereum-ens-network-map@^1.0.0, ethereum-ens-network-map@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/ethereum-ens-network-map/-/ethereum-ens-network-map-1.0.2.tgz#4e27bad18dae7bd95d84edbcac2c9e739fc959b9"
integrity sha512-5qwJ5n3YhjSpE6O/WEBXCAb2nagUgyagJ6C0lGUBWC4LjKp/rRzD+pwtDJ6KCiITFEAoX4eIrWOjRy0Sylq5Hg==

Loading…
Cancel
Save