Merge branch 'master' into i1616-AddTokenAdding

feature/default_network_editable
Dan Finlay 8 years ago
commit 06706f6e1b
  1. 2
      CHANGELOG.md
  2. 4
      app/scripts/background.js
  3. 2
      circle.yml
  4. 12
      test/integration/index.js
  5. 22
      ui/app/components/token-list.js
  6. 6
      ui/app/info.js
  7. 2
      ui/app/keychains/hd/create-vault-complete.js

@ -6,6 +6,8 @@
- Add ability to add Tokens to token list. - Add ability to add Tokens to token list.
- Add a warning to JSON file import. - Add a warning to JSON file import.
- Fix bug where slowly mined txs would sometimes be incorrectly marked as failed. - Fix bug where slowly mined txs would sometimes be incorrectly marked as failed.
- Fix bug where badge count did not reflect personal_sign pending messages.
- Seed word confirmation wording is now scarier.
## 3.7.8 2017-6-12 ## 3.7.8 2017-6-12

@ -116,13 +116,15 @@ function setupController (initState) {
updateBadge() updateBadge()
controller.txController.on('updateBadge', updateBadge) controller.txController.on('updateBadge', updateBadge)
controller.messageManager.on('updateBadge', updateBadge) controller.messageManager.on('updateBadge', updateBadge)
controller.personalMessageManager.on('updateBadge', updateBadge)
// plugin badge text // plugin badge text
function updateBadge () { function updateBadge () {
var label = '' var label = ''
var unapprovedTxCount = controller.txController.unapprovedTxCount var unapprovedTxCount = controller.txController.unapprovedTxCount
var unapprovedMsgCount = controller.messageManager.unapprovedMsgCount var unapprovedMsgCount = controller.messageManager.unapprovedMsgCount
var count = unapprovedTxCount + unapprovedMsgCount var unapprovedPersonalMsgs = controller.personalMessageManager.unapprovedPersonalMsgCount
var count = unapprovedTxCount + unapprovedMsgCount + unapprovedPersonalMsgs
if (count) { if (count) {
label = String(count) label = String(count)
} }

@ -1,6 +1,6 @@
machine: machine:
node: node:
version: 7.6.0 version: 8.0.0
dependencies: dependencies:
pre: pre:
- "npm i -g testem" - "npm i -g testem"

@ -9,13 +9,15 @@ var b = browserify()
// Remove old bundle // Remove old bundle
try { try {
fs.unlinkSync(bundlePath) fs.unlinkSync(bundlePath)
} catch (e) {}
var writeStream = fs.createWriteStream(bundlePath) var writeStream = fs.createWriteStream(bundlePath)
tests.forEach(function (fileName) { tests.forEach(function (fileName) {
b.add(path.join(__dirname, 'lib', fileName)) b.add(path.join(__dirname, 'lib', fileName))
}) })
b.bundle().pipe(writeStream) b.bundle().pipe(writeStream)
} catch (e) {
console.error('Integration build failure', e)
}

@ -29,13 +29,18 @@ function TokenList () {
TokenList.prototype.render = function () { TokenList.prototype.render = function () {
const state = this.state const state = this.state
const { isLoading, tokens } = state const { tokens, isLoading, error } = state
const { userAddress, network } = this.props const { userAddress, network } = this.props
if (isLoading) { if (isLoading) {
return this.message('Loading') return this.message('Loading')
} }
if (error) {
log.error(error)
return this.message('There was a problem loading your token balances.')
}
const tokenViews = tokens.map((tokenData) => { const tokenViews = tokens.map((tokenData) => {
tokenData.network = network tokenData.network = network
tokenData.userAddress = userAddress tokenData.userAddress = userAddress
@ -114,7 +119,10 @@ TokenList.prototype.componentDidMount = function () {
TokenList.prototype.createFreshTokenTracker = function () { TokenList.prototype.createFreshTokenTracker = function () {
if (this.tracker) { if (this.tracker) {
// Clean up old trackers when refreshing:
this.tracker.stop() this.tracker.stop()
this.tracker.removeListener('update', this.balanceUpdater)
this.tracker.removeListener('error', this.showError)
} }
if (!global.ethereumProvider) return if (!global.ethereumProvider) return
@ -126,9 +134,15 @@ TokenList.prototype.createFreshTokenTracker = function () {
pollingInterval: 8000, pollingInterval: 8000,
}) })
this.tracker.on('update', (tokenData) => {
this.updateBalances(tokenData) // Set up listener instances for cleaning up
}) this.balanceUpdater = this.updateBalances.bind(this)
this.showError = (error) => {
this.setState({ error, isLoading: false })
}
this.tracker.on('update', this.balanceUpdater)
this.tracker.on('error', this.showError)
this.tracker.updateBalances() this.tracker.updateBalances()
.then(() => { .then(() => {
this.updateBalances(this.tracker.serialize()) this.updateBalances(this.tracker.serialize())

@ -101,14 +101,12 @@ InfoScreen.prototype.render = function () {
h('a.info', { h('a.info', {
href: 'https://github.com/MetaMask/faq', href: 'https://github.com/MetaMask/faq',
target: '_blank', target: '_blank',
onClick (event) { this.navigateTo(event.target.href) },
}, 'Need Help? Read our FAQ!'), }, 'Need Help? Read our FAQ!'),
]), ]),
h('div', [ h('div', [
h('a', { h('a', {
href: 'https://metamask.io/', href: 'https://metamask.io/',
target: '_blank', target: '_blank',
onClick (event) { this.navigateTo(event.target.href) },
}, [ }, [
h('img.icon-size', { h('img.icon-size', {
src: 'images/icon-128.png', src: 'images/icon-128.png',
@ -126,7 +124,6 @@ InfoScreen.prototype.render = function () {
h('a.info', { h('a.info', {
href: 'http://slack.metamask.io', href: 'http://slack.metamask.io',
target: '_blank', target: '_blank',
onClick (event) { this.navigateTo(event.target.href) },
}, 'Join the conversation on Slack'), }, 'Join the conversation on Slack'),
]), ]),
@ -134,7 +131,6 @@ InfoScreen.prototype.render = function () {
h('a.info', { h('a.info', {
href: 'https://twitter.com/metamask_io', href: 'https://twitter.com/metamask_io',
target: '_blank', target: '_blank',
onClick (event) { this.navigateTo(event.target.href) },
}, 'Follow us on Twitter'), }, 'Follow us on Twitter'),
]), ]),
@ -142,7 +138,7 @@ InfoScreen.prototype.render = function () {
h('a.info', { h('a.info', {
target: '_blank', target: '_blank',
style: { width: '85vw' }, style: { width: '85vw' },
onClick () { this.navigateTo('mailto:help@metamask.io?subject=Feedback') }, href: 'mailto:help@metamask.io?subject=Feedback',
}, 'Email us!'), }, 'Email us!'),
]), ]),
]), ]),

@ -54,7 +54,7 @@ CreateVaultCompleteScreen.prototype.render = function () {
textAlign: 'center', textAlign: 'center',
}, },
}, [ }, [
h('span.error', 'These 12 words can restore all of your MetaMask accounts for this vault.\nSave them somewhere safe and secret.'), h('span.error', 'These 12 words are the only way to restore your MetaMask accounts.\nSave them somewhere safe and secret.'),
]), ]),
h('textarea.twelve-word-phrase', { h('textarea.twelve-word-phrase', {

Loading…
Cancel
Save