Skip to content

Commit

Permalink
trying to test wasm versions
Browse files Browse the repository at this point in the history
  • Loading branch information
LianaHus committed May 14, 2020
1 parent 1867276 commit a94f8d3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/app/compiler/compiler-utils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const semver = require('semver')
// const semver = require('semver')
/* global Worker */

export const baseUrl = 'https://solc-bin.ethereum.org/wasm'
Expand All @@ -13,7 +13,7 @@ export function urlFromVersion (version) {
export function canUseWorker (selectedVersion) {
// Following restrictions should be deleted when Solidity will release fixed versions of compilers.
// See https://github.com/ethereum/remix-ide/issues/2461
const isChrome = !!window.chrome
/* const isChrome = !!window.chrome
const os = retrieveOS()
// define a whitelist for Linux
const linuxWL = ['0.4.26', '0.5.3', '0.5.4', '0.5.5']
Expand All @@ -29,20 +29,20 @@ export function canUseWorker (selectedVersion) {
break
default :
isFromWhiteList = true
}
} */
return browserSupportWorker()// && (!isChrome || (isChrome && isFromWhiteList))
}

function browserSupportWorker () {
return document.location.protocol !== 'file:' && Worker !== undefined
}

function retrieveOS () {
/* function retrieveOS () {
let osName = 'Unknown OS'
if (navigator.platform.indexOf('Win') !== -1) {
osName = 'Windows'
} else if (navigator.platform.indexOf('Linux') !== -1) {
osName = 'Linux'
}
return osName
}
} */

0 comments on commit a94f8d3

Please sign in to comment.