Skip to content

Commit f630d06

Browse files
committed
fix async
1 parent 6613a63 commit f630d06

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

apps/remix-ide/src/app/tabs/test-tab.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ export default class TestTab extends ViewPlugin {
113113
const web3 = await this.call('blockchain', 'web3VM')
114114
await this.testRunner.init(web3)
115115
await this.createTestLibs()
116-
return new Promise((resolve, reject) => {
116+
return new Promise(async (resolve, reject) => {
117117
const runningTest = {}
118118
runningTest[path] = { content }
119-
const { currentVersion, evmVersion, optimize, runs } = this.compileTab.getCurrentCompilerConfig()
119+
const { currentVersion, evmVersion, optimize, runs } = await this.compileTab.getCurrentCompilerConfig()
120120
const currentCompilerUrl = urlFromVersion(currentVersion)
121121
const compilerConfig = {
122122
currentCompilerUrl,

libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ export const SolidityUnitTesting = (props: Record<string, any>) => {
180180
await updateForNewCurrent(file)
181181
})
182182
testTab.on('solidity', 'compilerLoaded', async (version: string, license: string) => {
183-
const { currentVersion } = testTab.compileTab.getCurrentCompilerConfig()
183+
const { currentVersion } = await testTab.compileTab.getCurrentCompilerConfig()
184184

185185
if (!semver.gt(truncateVersion(currentVersion), '0.4.12')) {
186186
setDisableRunButton(true)
@@ -606,7 +606,7 @@ export const SolidityUnitTesting = (props: Record<string, any>) => {
606606
const runningTests: Record<string, Record<string, string>> = {}
607607
runningTests[testFilePath] = { content }
608608
filesContent[testFilePath] = { content }
609-
const { currentVersion, evmVersion, optimize, runs, isUrl } = testTab.compileTab.getCurrentCompilerConfig()
609+
const { currentVersion, evmVersion, optimize, runs, isUrl } = await testTab.compileTab.getCurrentCompilerConfig()
610610
const currentCompilerUrl = isUrl ? currentVersion : urlFromVersion(currentVersion)
611611
const compilerConfig = {
612612
currentCompilerUrl,

0 commit comments

Comments
 (0)