mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Merge branch 'master' into fixSignedVsSubmitted
This commit is contained in:
commit
e3650b336a
@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
## Current Master
|
## Current Master
|
||||||
|
|
||||||
|
## 3.0.0 2017-1-16
|
||||||
|
|
||||||
|
- Fix seed word account generation (https://medium.com/metamask/metamask-3-migration-guide-914b79533cdd#.t4i1qmmsz).
|
||||||
|
- Fix Bug where you see a empty transaction flash by on the confirm transaction view.
|
||||||
- Create visible difference in transaction history between a approved but not yet included in a block transaction and a transaction who has been confirmed.
|
- Create visible difference in transaction history between a approved but not yet included in a block transaction and a transaction who has been confirmed.
|
||||||
- Fix memory leak in RPC Cache
|
- Fix memory leak in RPC Cache
|
||||||
- Override RPC commands eth_syncing and web3_clientVersion
|
- Override RPC commands eth_syncing and web3_clientVersion
|
||||||
@ -15,6 +19,8 @@
|
|||||||
|
|
||||||
## 2.14.1 2016-12-20
|
## 2.14.1 2016-12-20
|
||||||
|
|
||||||
|
- Update Coinbase info. and increase the buy amount to $15
|
||||||
|
- Fixed ropsten transaction links
|
||||||
- Temporarily disable extension reload detection causing infinite reload bug.
|
- Temporarily disable extension reload detection causing infinite reload bug.
|
||||||
- Implemented basic checking for valid RPC URIs.
|
- Implemented basic checking for valid RPC URIs.
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "MetaMask",
|
"name": "MetaMask",
|
||||||
"short_name": "Metamask",
|
"short_name": "Metamask",
|
||||||
"version": "2.14.1",
|
"version": "3.0.0",
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"author": "https://metamask.io",
|
"author": "https://metamask.io",
|
||||||
"description": "Ethereum Browser Extension",
|
"description": "Ethereum Browser Extension",
|
||||||
|
@ -35,12 +35,12 @@ class SimpleKeyring extends EventEmitter {
|
|||||||
newWallets.push(Wallet.generate())
|
newWallets.push(Wallet.generate())
|
||||||
}
|
}
|
||||||
this.wallets = this.wallets.concat(newWallets)
|
this.wallets = this.wallets.concat(newWallets)
|
||||||
const hexWallets = newWallets.map(w => w.getAddress().toString('hex'))
|
const hexWallets = newWallets.map(w => ethUtil.bufferToHex(w.getAddress()))
|
||||||
return Promise.resolve(hexWallets)
|
return Promise.resolve(hexWallets)
|
||||||
}
|
}
|
||||||
|
|
||||||
getAccounts () {
|
getAccounts () {
|
||||||
return Promise.resolve(this.wallets.map(w => w.getAddress().toString('hex')))
|
return Promise.resolve(this.wallets.map(w => ethUtil.bufferToHex(w.getAddress())))
|
||||||
}
|
}
|
||||||
|
|
||||||
// tx is an instance of the ethereumjs-transaction class.
|
// tx is an instance of the ethereumjs-transaction class.
|
||||||
@ -54,6 +54,7 @@ class SimpleKeyring extends EventEmitter {
|
|||||||
// For eth_sign, we need to sign transactions:
|
// For eth_sign, we need to sign transactions:
|
||||||
signMessage (withAccount, data) {
|
signMessage (withAccount, data) {
|
||||||
const wallet = this._getWalletForAccount(withAccount)
|
const wallet = this._getWalletForAccount(withAccount)
|
||||||
|
|
||||||
const message = ethUtil.removeHexPrefix(data)
|
const message = ethUtil.removeHexPrefix(data)
|
||||||
var privKey = wallet.getPrivateKey()
|
var privKey = wallet.getPrivateKey()
|
||||||
var msgSig = ethUtil.ecsign(new Buffer(message, 'hex'), privKey)
|
var msgSig = ethUtil.ecsign(new Buffer(message, 'hex'), privKey)
|
||||||
@ -70,7 +71,9 @@ class SimpleKeyring extends EventEmitter {
|
|||||||
/* PRIVATE METHODS */
|
/* PRIVATE METHODS */
|
||||||
|
|
||||||
_getWalletForAccount (account) {
|
_getWalletForAccount (account) {
|
||||||
return this.wallets.find(w => w.getAddress().toString('hex') === account)
|
let wallet = this.wallets.find(w => ethUtil.bufferToHex(w.getAddress()) === account)
|
||||||
|
if (!wallet) throw new Error('Simple Keyring - Unable to find matching address.')
|
||||||
|
return wallet
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ var linkGen = require('../../ui/lib/explorer-link')
|
|||||||
describe('explorer-link', function() {
|
describe('explorer-link', function() {
|
||||||
|
|
||||||
it('adds testnet prefix to morden test network', function() {
|
it('adds testnet prefix to morden test network', function() {
|
||||||
var result = linkGen('hash', '2')
|
var result = linkGen('hash', '3')
|
||||||
assert.notEqual(result.indexOf('testnet'), -1, 'testnet injected')
|
assert.notEqual(result.indexOf('testnet'), -1, 'testnet injected')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
const assert = require('assert')
|
const assert = require('assert')
|
||||||
const extend = require('xtend')
|
const extend = require('xtend')
|
||||||
|
const ethUtil = require('ethereumjs-util')
|
||||||
const SimpleKeyring = require('../../../app/scripts/keyrings/simple')
|
const SimpleKeyring = require('../../../app/scripts/keyrings/simple')
|
||||||
const TYPE_STR = 'Simple Key Pair'
|
const TYPE_STR = 'Simple Key Pair'
|
||||||
|
|
||||||
@ -72,14 +73,10 @@ describe('simple-keyring', function() {
|
|||||||
it('calls getAddress on each wallet', function(done) {
|
it('calls getAddress on each wallet', function(done) {
|
||||||
|
|
||||||
// Push a mock wallet
|
// Push a mock wallet
|
||||||
const desiredOutput = 'foo'
|
const desiredOutput = '0x18a3462427bcc9133bb46e88bcbe39cd7ef0e761'
|
||||||
keyring.wallets.push({
|
keyring.wallets.push({
|
||||||
getAddress() {
|
getAddress() {
|
||||||
return {
|
return ethUtil.toBuffer(desiredOutput)
|
||||||
toString() {
|
|
||||||
return desiredOutput
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ CoinbaseForm.prototype.render = function () {
|
|||||||
lineHeight: '13px',
|
lineHeight: '13px',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
`there is a USD$ 5 a day max and a USD$ 50
|
`there is a USD$ 15 a day max and a USD$ 50
|
||||||
dollar limit per the life time of an account without a
|
dollar limit per the life time of an account without a
|
||||||
coinbase account. A fee of 3.75% will be aplied to debit/credit cards.`),
|
coinbase account. A fee of 3.75% will be aplied to debit/credit cards.`),
|
||||||
|
|
||||||
@ -136,14 +136,14 @@ CoinbaseForm.prototype.renderLoading = function () {
|
|||||||
function isValidAmountforCoinBase (amount) {
|
function isValidAmountforCoinBase (amount) {
|
||||||
amount = parseFloat(amount)
|
amount = parseFloat(amount)
|
||||||
if (amount) {
|
if (amount) {
|
||||||
if (amount <= 5 && amount > 0) {
|
if (amount <= 15 && amount > 0) {
|
||||||
return {
|
return {
|
||||||
valid: true,
|
valid: true,
|
||||||
}
|
}
|
||||||
} else if (amount > 5) {
|
} else if (amount > 15) {
|
||||||
return {
|
return {
|
||||||
valid: false,
|
valid: false,
|
||||||
message: 'The amount can not be greater then $5',
|
message: 'The amount can not be greater then $15',
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return {
|
return {
|
||||||
|
@ -28,7 +28,7 @@ TransactionListItem.prototype.render = function () {
|
|||||||
|
|
||||||
let isLinkable = false
|
let isLinkable = false
|
||||||
const numericNet = parseInt(network)
|
const numericNet = parseInt(network)
|
||||||
isLinkable = numericNet === 1 || numericNet === 2
|
isLinkable = numericNet === 1 || numericNet === 3
|
||||||
|
|
||||||
var isMsg = ('msgParams' in transaction)
|
var isMsg = ('msgParams' in transaction)
|
||||||
var isTx = ('txParams' in transaction)
|
var isTx = ('txParams' in transaction)
|
||||||
@ -42,7 +42,6 @@ TransactionListItem.prototype.render = function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const isClickable = ('hash' in transaction && isLinkable) || isPending
|
const isClickable = ('hash' in transaction && isLinkable) || isPending
|
||||||
|
|
||||||
return (
|
return (
|
||||||
h(`.transaction-list-item.flex-row.flex-space-between${isClickable ? '.pointer' : ''}`, {
|
h(`.transaction-list-item.flex-row.flex-space-between${isClickable ? '.pointer' : ''}`, {
|
||||||
onClick: (event) => {
|
onClick: (event) => {
|
||||||
|
@ -43,9 +43,11 @@ ConfirmTxScreen.prototype.render = function () {
|
|||||||
var unconfMsgs = state.unconfMsgs
|
var unconfMsgs = state.unconfMsgs
|
||||||
var unconfTxList = txHelper(unconfTxs, unconfMsgs, network)
|
var unconfTxList = txHelper(unconfTxs, unconfMsgs, network)
|
||||||
var index = state.index !== undefined ? state.index : 0
|
var index = state.index !== undefined ? state.index : 0
|
||||||
var txData = unconfTxList[index] || {txParams: {}}
|
var txData = unconfTxList[index] || {}
|
||||||
var txParams = txData.txParams || {}
|
var txParams = txData.txParams
|
||||||
var isNotification = isPopupOrNotification() === 'notification'
|
var isNotification = isPopupOrNotification() === 'notification'
|
||||||
|
if (!txParams) return null
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
||||||
h('.flex-column.flex-grow', [
|
h('.flex-column.flex-grow', [
|
||||||
|
@ -446,7 +446,7 @@ function reduceApp (state, action) {
|
|||||||
},
|
},
|
||||||
buyView: {
|
buyView: {
|
||||||
subview: 'buyForm',
|
subview: 'buyForm',
|
||||||
amount: '5.00',
|
amount: '15.00',
|
||||||
buyAddress: action.value,
|
buyAddress: action.value,
|
||||||
formView: {
|
formView: {
|
||||||
coinbase: true,
|
coinbase: true,
|
||||||
|
@ -5,7 +5,7 @@ module.exports = function (hash, network) {
|
|||||||
case 1: // main net
|
case 1: // main net
|
||||||
prefix = ''
|
prefix = ''
|
||||||
break
|
break
|
||||||
case 2: // morden test net
|
case 3: // morden test net
|
||||||
prefix = 'testnet.'
|
prefix = 'testnet.'
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user