Commit cf239575 authored by Alex Beregszaszi's avatar Alex Beregszaszi

Compiler: truncate compiler version

parent 77b2758f
......@@ -277,10 +277,18 @@ function Compiler (editor, handleGithubCall) {
cb(null, { 'sources': files })
}
function truncateVersion (version) {
var tmp = /^(\d+.\d+.\d+)/.exec(version)
if (tmp) {
return tmp[1]
}
return version
}
function updateInterface (data) {
for (var contract in data.contracts) {
var abi = JSON.parse(data.contracts[contract].interface)
abi = solcABI.update(currentVersion, abi)
abi = solcABI.update(truncateVersion(currentVersion), abi)
data.contracts[contract].interface = JSON.stringify(abi)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment