From 203a573f3fa8cf636c846a0a467318f6767d05fe Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Mon, 5 Jun 2017 16:23:56 -0700 Subject: [PATCH 1/4] Use new URL for currency API from cryptonator. --- app/manifest.json | 2 +- app/scripts/controllers/currency.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/manifest.json b/app/manifest.json index 99a083f0f..01ee173a6 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)) From f7773538ebb583905b5385096abea48c58e7673c Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Mon, 5 Jun 2017 16:24:32 -0700 Subject: [PATCH 2/4] Modify tests for new api mock.' --- test/unit/currency-controller-test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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":""}') From 0fb38632befc8a09dc12de8f609edfb0ffab9d35 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Mon, 5 Jun 2017 16:25:02 -0700 Subject: [PATCH 3/4] Bump changelog. --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e7b292b5..52d187ccf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Current Master +- Fix currency API URL from cryptonator. + ## 3.7.4 2017-6-2 - Fix bug with inflight cache that caused some block lookups to return bad values (affected OasisDex). From f788ba7244d78a60233b9516423524ebd931fbb6 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Mon, 5 Jun 2017 16:27:15 -0700 Subject: [PATCH 4/4] Resolve changelog merging. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d9de93d3..7bfa441b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Current Master - Fix currency API URL from cryptonator. + ## 3.7.6 2017-6-5 - Fix bug that prevented publishing contracts.