aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md1
-rw-r--r--app/manifest.json2
-rw-r--r--app/scripts/controllers/currency.js2
-rw-r--r--test/unit/currency-controller-test.js4
4 files changed, 5 insertions, 4 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cbab1c71a..0d9de93d3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,7 @@
## Current Master
+- Fix currency API URL from cryptonator.
## 3.7.6 2017-6-5
- Fix bug that prevented publishing contracts.
diff --git a/app/manifest.json b/app/manifest.json
index 2d321e862..06f9b48a0 100644
--- a/app/manifest.json
+++ b/app/manifest.json
@@ -58,7 +58,7 @@
"storage",
"clipboardWrite",
"http://localhost:8545/",
- "https://www.cryptonator.com/"
+ "https://api.cryptonator.com/"
],
"web_accessible_resources": [
"scripts/inpage.js"
diff --git a/app/scripts/controllers/currency.js b/app/scripts/controllers/currency.js
index fb130ed76..1f20dc005 100644
--- a/app/scripts/controllers/currency.js
+++ b/app/scripts/controllers/currency.js
@@ -45,7 +45,7 @@ class CurrencyController {
updateConversionRate () {
const currentCurrency = this.getCurrentCurrency()
- return fetch(`https://www.cryptonator.com/api/ticker/eth-${currentCurrency}`)
+ return fetch(`https://api.cryptonator.com/api/ticker/eth-${currentCurrency}`)
.then(response => response.json())
.then((parsedResponse) => {
this.setConversionRate(Number(parsedResponse.ticker.price))
diff --git a/test/unit/currency-controller-test.js b/test/unit/currency-controller-test.js
index cfbce7fb3..5eeaf9bcc 100644
--- a/test/unit/currency-controller-test.js
+++ b/test/unit/currency-controller-test.js
@@ -36,7 +36,7 @@ describe('currency-controller', function () {
describe('#updateConversionRate', function () {
it('should retrieve an update for ETH to USD and set it in memory', function (done) {
this.timeout(15000)
- nock('https://www.cryptonator.com')
+ nock('https://api.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":""}')
@@ -57,7 +57,7 @@ describe('currency-controller', function () {
this.timeout(15000)
assert.equal(currencyController.getConversionRate(), 0)
- nock('https://www.cryptonator.com')
+ nock('https://api.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":""}')