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

Version v7.7.9 RC #8444

Merged
merged 18 commits into from
May 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
a7911ce
Version v7.7.9
metamaskbot Apr 28, 2020
2a51399
Backport "Fix popup not opening (#8314)" (#8446)
Gudahtt Apr 29, 2020
8fb615c
Backport "Skip adding history entry for empty txMeta diffs (#8379)" (…
Gudahtt Apr 29, 2020
57fdc03
Backport "Delete Dai/Sai migration notification (#8418)" (#8447)
Gudahtt Apr 29, 2020
08fd6cf
Backport "Update deposit copy for Wyre (#7654)" (#8460)
Gudahtt Apr 29, 2020
50b48b7
Backport "Clean up list of available currencies (#7667)" (#8454)
Gudahtt Apr 29, 2020
f91bd3a
Backport "Snapshot txMeta without cloning history (#8363)" (#8458)
Gudahtt Apr 29, 2020
3dc8387
Backport "Fix method registry initialization (#8200)" (#8459)
Gudahtt Apr 29, 2020
361c571
Backport "Fixes #5706 - Adds Dai/Sai to currency display (#7986)" (#8…
Gudahtt Apr 29, 2020
4d9d732
Backport "fix destructuring of lastSelectedProvider (#8197)" (#8461)
Gudahtt Apr 29, 2020
0232954
Backport "Add INR currency option (#7673)" (#8457)
Gudahtt Apr 29, 2020
8a8c774
Backport "Fix Kovan and Rinkeby chain IDs (#7762)" (#8462)
Gudahtt Apr 29, 2020
aab262a
Backport "Use ethereum-ens-network-map for network support (#7960)" (…
Gudahtt Apr 29, 2020
2d36d42
Backport "Updating deprecated Etherscam link (#7464)" (#8463)
Gudahtt Apr 29, 2020
14d4c10
Backport "Don't updatePendingTxs outside of block updates (#8445)" (#…
Gudahtt Apr 30, 2020
b64cbbd
Backport "update eth-contract-metadata (#8466)" (#8476)
Gudahtt Apr 30, 2020
8d8a17d
Update changelog for v7.7.9 (#8477)
Gudahtt Apr 30, 2020
b81558a
Backport "fixed Tohen Typo (#7808)" (#8509)
Gudahtt May 4, 2020
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
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/_locales/de/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
11 changes: 1 addition & 10 deletions app/_locales/en/messages.json
Original file line number Diff line number Diff line change
@@ -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"
},
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion app/manifest.json
Original file line number Diff line number Diff line change
@@ -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__",
Expand Down
2 changes: 1 addition & 1 deletion app/phishing.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ <h1>
<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.
Expand Down
1 change: 0 additions & 1 deletion app/scripts/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,6 @@ function triggerUi () {
const currentlyActiveMetamaskTab = Boolean(tabs.find(tab => openMetamaskTabsIDs[tab.id]))
if (!popupIsOpen && !currentlyActiveMetamaskTab && !notificationIsOpen) {
notificationManager.showPopup()
notificationIsOpen = true
}
})
}
Expand Down
7 changes: 0 additions & 7 deletions app/scripts/controllers/app-state.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class AppStateController {
this.onInactiveTimeout = onInactiveTimeout || (() => {})
this.store = new ObservableStore(extend({
timeoutMinutes: 0,
mkrMigrationReminderTimestamp: null,
}, initState))
this.timer = null

Expand All @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/controllers/ens/ens.js
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
1 change: 0 additions & 1 deletion app/scripts/controllers/transactions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
4 changes: 3 additions & 1 deletion app/scripts/controllers/transactions/tx-state-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions app/scripts/metamask-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/phishing-detect.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
17 changes: 17 additions & 0 deletions test/unit/app/controllers/transactions/tx-state-manager-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down
6 changes: 3 additions & 3 deletions test/unit/balance-formatter-test.js
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion ui/app/components/app/dai-migration-component/index.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading