aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md5
-rw-r--r--app/manifest.json2
-rw-r--r--app/scripts/lib/tx-state-manager.js4
-rw-r--r--app/scripts/migrations/024.js2
-rw-r--r--old-ui/app/util.js1
-rw-r--r--test/unit/migrations/024-test.js12
-rw-r--r--ui/app/add-token.js1
-rw-r--r--ui/app/send-v2.js10
-rw-r--r--ui/app/util.js1
9 files changed, 32 insertions, 6 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ae56ad2e5..4731faffc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,11 @@
# Changelog
## Current Master
+- Fix link for 'Learn More' in the Add Token Screen to open to a new tab.
+
+- Fix Download State Logs button [#3791](https://github.com/MetaMask/metamask-extension/issues/3791)
+
+## 4.5.3 Wed Apr 04 2018
- Fix bug where checksum address are messing with balance issue [#3843](https://github.com/MetaMask/metamask-extension/issues/3843)
- new ui: fix the confirm transaction screen
diff --git a/app/manifest.json b/app/manifest.json
index 2a18bdb2d..61d2c5b5e 100644
--- a/app/manifest.json
+++ b/app/manifest.json
@@ -1,7 +1,7 @@
{
"name": "__MSG_appName__",
"short_name": "__MSG_appName__",
- "version": "4.5.2",
+ "version": "4.5.3",
"manifest_version": 2,
"author": "https://metamask.io",
"description": "__MSG_appDescription__",
diff --git a/app/scripts/lib/tx-state-manager.js b/app/scripts/lib/tx-state-manager.js
index 2ab24d6a0..d8ea17400 100644
--- a/app/scripts/lib/tx-state-manager.js
+++ b/app/scripts/lib/tx-state-manager.js
@@ -108,6 +108,10 @@ module.exports = class TransactionStateManager extends EventEmitter {
updateTx (txMeta, note) {
// validate txParams
if (txMeta.txParams) {
+ if (typeof txMeta.txParams.data === 'undefined') {
+ delete txMeta.txParams.data
+ }
+
this.validateTxParams(txMeta.txParams)
}
diff --git a/app/scripts/migrations/024.js b/app/scripts/migrations/024.js
index c917a167c..d0b276a79 100644
--- a/app/scripts/migrations/024.js
+++ b/app/scripts/migrations/024.js
@@ -25,8 +25,8 @@ module.exports = {
function transformState (state) {
const newState = state
+ if (!newState.TransactionController) return newState
const transactions = newState.TransactionController.transactions
-
newState.TransactionController.transactions = transactions.map((txMeta, _, txList) => {
if (
txMeta.status === 'unapproved' &&
diff --git a/old-ui/app/util.js b/old-ui/app/util.js
index 3f8b4dcc3..962832ce7 100644
--- a/old-ui/app/util.js
+++ b/old-ui/app/util.js
@@ -231,6 +231,7 @@ function exportAsFile (filename, data) {
window.navigator.msSaveBlob(blob, filename)
} else {
const elem = window.document.createElement('a')
+ elem.target = '_blank'
elem.href = window.URL.createObjectURL(blob)
elem.download = filename
document.body.appendChild(elem)
diff --git a/test/unit/migrations/024-test.js b/test/unit/migrations/024-test.js
index dab77d4e4..c3c03d06b 100644
--- a/test/unit/migrations/024-test.js
+++ b/test/unit/migrations/024-test.js
@@ -1,5 +1,9 @@
const assert = require('assert')
const migration24 = require('../../../app/scripts/migrations/024')
+const firstTimeState = {
+ meta: {},
+ data: require('../../../app/scripts/first-time-state'),
+}
const properTime = (new Date()).getTime()
const storage = {
"meta": {},
@@ -34,4 +38,12 @@ describe('storage is migrated successfully and the txParams.from are lowercase',
done()
}).catch(done)
})
+
+ it('should migrate first time state', (done) => {
+ migration24.migrate(firstTimeState)
+ .then((migratedData) => {
+ assert.equal(migratedData.meta.version, 24)
+ done()
+ }).catch(done)
+ })
})
diff --git a/ui/app/add-token.js b/ui/app/add-token.js
index a73874320..46564a5e5 100644
--- a/ui/app/add-token.js
+++ b/ui/app/add-token.js
@@ -360,6 +360,7 @@ AddTokenScreen.prototype.renderTabs = function () {
h('div.add-token__info-box__copy', this.context.t('keepTrackTokens')),
h('a.add-token__info-box__copy--blue', {
href: 'http://metamask.helpscoutdocs.com/article/16-managing-erc20-tokens',
+ target: '_blank',
}, this.context.t('learnMore')),
]),
h('div.add-token__input-container', [
diff --git a/ui/app/send-v2.js b/ui/app/send-v2.js
index 0f2997fb2..094743ff0 100644
--- a/ui/app/send-v2.js
+++ b/ui/app/send-v2.js
@@ -254,7 +254,6 @@ SendTransactionScreen.prototype.handleToChange = function (to, nickname = '') {
const {
updateSendTo,
updateSendErrors,
- from: {address: from},
} = this.props
let toError = null
@@ -262,8 +261,6 @@ SendTransactionScreen.prototype.handleToChange = function (to, nickname = '') {
toError = this.context.t('required')
} else if (!isValidAddress(to)) {
toError = this.context.t('invalidAddressRecipient')
- } else if (to === from) {
- toError = this.context.t('fromToSame')
}
updateSendTo(to, nickname)
@@ -579,12 +576,17 @@ SendTransactionScreen.prototype.getEditedTx = function () {
data,
})
} else {
- const data = unapprovedTxs[editingTransactionId].txParams.data
+ const { data } = unapprovedTxs[editingTransactionId].txParams
+
Object.assign(editingTx.txParams, {
value: ethUtil.addHexPrefix(amount),
to: ethUtil.addHexPrefix(to),
data,
})
+
+ if (typeof editingTx.txParams.data === 'undefined') {
+ delete editingTx.txParams.data
+ }
}
return editingTx
diff --git a/ui/app/util.js b/ui/app/util.js
index 800ccb218..bbe2bb09e 100644
--- a/ui/app/util.js
+++ b/ui/app/util.js
@@ -271,6 +271,7 @@ function exportAsFile (filename, data) {
window.navigator.msSaveBlob(blob, filename)
} else {
const elem = window.document.createElement('a')
+ elem.target = '_blank'
elem.href = window.URL.createObjectURL(blob)
elem.download = filename
document.body.appendChild(elem)