From 3dd537c0da7935383ab9a6922112c08c30eb6d8a Mon Sep 17 00:00:00 2001 From: naz_dou Date: Wed, 28 Aug 2019 13:18:23 +0300 Subject: [PATCH] fix(Compiler): Tests --- es/contract/compiler.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/es/contract/compiler.js b/es/contract/compiler.js index 0f8643d7e8..f42d6a28d8 100644 --- a/es/contract/compiler.js +++ b/es/contract/compiler.js @@ -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)) {