From 80de10cd495f2afe9491cd2150a2d95f718b61f0 Mon Sep 17 00:00:00 2001 From: serapath Date: Sun, 15 Apr 2018 21:13:19 +0100 Subject: [PATCH] fix compilers url --- src/app/tabs/settings-tab.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/app/tabs/settings-tab.js b/src/app/tabs/settings-tab.js index 39d7876172..555a7ed57a 100644 --- a/src/app/tabs/settings-tab.js +++ b/src/app/tabs/settings-tab.js @@ -31,7 +31,11 @@ module.exports = class SettingsTab { plugin: null, remixd: null, localremixd: null } } /* eslint-enable */ - self.data = { allversions: null, selectedVersion: null } + self.data = { + allversions: null, + selectedVersion: null, + baseurl: 'https://solc-bin.ethereum.org/bin' + } self.event = new EventManager() self._components.queryParams = new QueryParams() self._components.themeStorage = new Storage('style:') @@ -238,7 +242,7 @@ module.exports = class SettingsTab { if (self.data.selectedVersion.indexOf('soljson') !== 0 || helper.checkSpecialChars(self.data.selectedVersion)) { return console.log('loading ' + self.data.selectedVersion + ' not allowed') } - url = 'https://ethereum.github.io/solc-bin/bin/' + self.data.selectedVersion + url = `${self.data.baseurl}/${self.data.selectedVersion}` } var isFirefox = typeof InstallTrigger !== 'undefined' if (document.location.protocol !== 'file:' && Worker !== undefined && isFirefox) { @@ -254,7 +258,7 @@ module.exports = class SettingsTab { } fetchAllVersion (callback) { var self = this - minixhr('https://ethereum.github.io/solc-bin/bin/list.json', function (json, event) { + minixhr(`${self.data.baseurl}/list.json`, function (json, event) { // @TODO: optimise and cache results to improve app loading times var allversions, selectedVersion if (event.type !== 'error') {