mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-10-23 03:36:18 +02:00
commit
c8c77aa8bd
@ -6,6 +6,7 @@
|
|||||||
- Transaction history now has a hard limit.
|
- Transaction history now has a hard limit.
|
||||||
- Added info link on account screen that visits Etherscan.
|
- Added info link on account screen that visits Etherscan.
|
||||||
- Added shortcut to open MetaMask (Ctrl+Alt+M or Cmd+Opt/Alt+M)
|
- Added shortcut to open MetaMask (Ctrl+Alt+M or Cmd+Opt/Alt+M)
|
||||||
|
- Prevent API calls in tests.
|
||||||
- Fixed bug where sign message confirmation would sometimes render blank.
|
- Fixed bug where sign message confirmation would sometimes render blank.
|
||||||
|
|
||||||
## 2.9.0 2016-08-22
|
## 2.9.0 2016-08-22
|
||||||
|
@ -300,6 +300,7 @@ ConfigManager.prototype.updateConversionRate = function () {
|
|||||||
this.setConversionPrice(0)
|
this.setConversionPrice(0)
|
||||||
this.setConversionDate('N/A')
|
this.setConversionDate('N/A')
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigManager.prototype.setConversionPrice = function (price) {
|
ConfigManager.prototype.setConversionPrice = function (price) {
|
||||||
@ -372,4 +373,3 @@ ConfigManager.prototype.createShapeShiftTx = function (depositAddress, depositTy
|
|||||||
}
|
}
|
||||||
this.setData(data)
|
this.setData(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,6 +108,7 @@
|
|||||||
"mocha-eslint": "^2.1.1",
|
"mocha-eslint": "^2.1.1",
|
||||||
"mocha-jsdom": "^1.1.0",
|
"mocha-jsdom": "^1.1.0",
|
||||||
"mocha-sinon": "^1.1.5",
|
"mocha-sinon": "^1.1.5",
|
||||||
|
"nock": "^8.0.0",
|
||||||
"qs": "^6.2.0",
|
"qs": "^6.2.0",
|
||||||
"qunit": "^0.9.1",
|
"qunit": "^0.9.1",
|
||||||
"sinon": "^1.17.3",
|
"sinon": "^1.17.3",
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
var assert = require('assert')
|
const assert = require('assert')
|
||||||
const extend = require('xtend')
|
const extend = require('xtend')
|
||||||
const STORAGE_KEY = 'metamask-persistance-key'
|
const STORAGE_KEY = 'metamask-persistance-key'
|
||||||
var configManagerGen = require('../lib/mock-config-manager')
|
var configManagerGen = require('../lib/mock-config-manager')
|
||||||
var configManager
|
var configManager
|
||||||
const rp = require('request-promise')
|
const rp = require('request-promise')
|
||||||
|
const nock = require('nock')
|
||||||
|
|
||||||
describe('config-manager', function() {
|
describe('config-manager', function() {
|
||||||
|
|
||||||
@ -47,6 +48,10 @@ describe('config-manager', function() {
|
|||||||
describe('#updateConversionRate', function() {
|
describe('#updateConversionRate', function() {
|
||||||
it('should retrieve an update for ETH to USD and set it in memory', function(done) {
|
it('should retrieve an update for ETH to USD and set it in memory', function(done) {
|
||||||
this.timeout(15000)
|
this.timeout(15000)
|
||||||
|
var usdMock = nock('https://www.cryptonator.com')
|
||||||
|
.get('/api/ticker/eth-USD')
|
||||||
|
.reply(200, '{"ticker":{"base":"ETH","target":"USD","price":"11.02456145","volume":"44948.91745289","change":"-0.01472534"},"timestamp":1472072136,"success":true,"error":""}')
|
||||||
|
|
||||||
assert.equal(configManager.getConversionRate(), false)
|
assert.equal(configManager.getConversionRate(), false)
|
||||||
var promise = new Promise(
|
var promise = new Promise(
|
||||||
function (resolve, reject) {
|
function (resolve, reject) {
|
||||||
@ -69,6 +74,12 @@ describe('config-manager', function() {
|
|||||||
it('should work for JPY as well.', function() {
|
it('should work for JPY as well.', function() {
|
||||||
this.timeout(15000)
|
this.timeout(15000)
|
||||||
assert.equal(configManager.getConversionRate(), false)
|
assert.equal(configManager.getConversionRate(), false)
|
||||||
|
|
||||||
|
var jpyMock = nock('https://www.cryptonator.com')
|
||||||
|
.get('/api/ticker/eth-JPY')
|
||||||
|
.reply(200, '{"ticker":{"base":"ETH","target":"JPY","price":"11.02456145","volume":"44948.91745289","change":"-0.01472534"},"timestamp":1472072136,"success":true,"error":""}')
|
||||||
|
|
||||||
|
|
||||||
var promise = new Promise(
|
var promise = new Promise(
|
||||||
function (resolve, reject) {
|
function (resolve, reject) {
|
||||||
configManager.setCurrentFiat('JPY')
|
configManager.setCurrentFiat('JPY')
|
||||||
|
Loading…
Reference in New Issue
Block a user