Skip to content

Commit

Permalink
fix(Compiler): Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nduchak committed Aug 28, 2019
1 parent c4263f0 commit 3dd537c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions es/contract/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ async function contractGetACI (code, options = {}) {
return this.http.post('/aci', { code, options }, options)
}

async function setCompilerUrl (url, { forceCompatibility }) {
async function setCompilerUrl (url, { forceCompatibility } = {}) {
this.http.changeBaseUrl(url)
this.compilerVersion = null
await this.checkCompatibility({ forceCompatibility })
}

async function checkCompatibility ({ force = false, forceCompatibility = false }) {
async function checkCompatibility ({ force = false, forceCompatibility = false } = {}) {
this.compilerVersion = await this.getCompilerVersion().catch(e => null)
if (!this.compilerVersion && !force) throw new Error('Compiler do not respond')
if (!forceCompatibility && this.compilerVersion && !semverSatisfies(this.compilerVersion.split('-')[0], COMPILER_GE_VERSION, COMPILER_LT_VERSION)) {
Expand Down

0 comments on commit 3dd537c

Please sign in to comment.