diff --git a/apps/remix-ide/src/app/panels/layout.ts b/apps/remix-ide/src/app/panels/layout.ts index 451c2aefe7..663692db26 100644 --- a/apps/remix-ide/src/app/panels/layout.ts +++ b/apps/remix-ide/src/app/panels/layout.ts @@ -80,7 +80,8 @@ export class Layout extends Plugin { const params = queryParams.get() if (params.minimizeterminal || params.embed) { this.panels.terminal.minimized = true - this.event.emit('change', null) + this.event.emit('change', this.panels) + this.emit('change', this.panels) } if (params.minimizesidepanel || params.embed) { this.event.emit('minimizesidepanel') diff --git a/apps/remix-ide/src/blockchain/blockchain.js b/apps/remix-ide/src/blockchain/blockchain.js index 88ea275779..a747ba0f31 100644 --- a/apps/remix-ide/src/blockchain/blockchain.js +++ b/apps/remix-ide/src/blockchain/blockchain.js @@ -353,7 +353,7 @@ export class Blockchain extends Plugin { if (network.name === 'VM') return this.call('terminal', 'logHtml', ( - open in etherscan + view on etherscan )) }) }) diff --git a/libs/remix-lib/src/execution/txRunnerWeb3.ts b/libs/remix-lib/src/execution/txRunnerWeb3.ts index 9b41fe9e5f..c62b655fb8 100644 --- a/libs/remix-lib/src/execution/txRunnerWeb3.ts +++ b/libs/remix-lib/src/execution/txRunnerWeb3.ts @@ -153,7 +153,7 @@ async function tryTillReceiptAvailable (txhash, web3) { async function tryTillTxAvailable (txhash, web3) { try { const tx = await web3.eth.getTransaction(txhash) - if (tx) return tx + if (tx && tx.blockHash) return tx } catch (e) {} return await tryTillTxAvailable(txhash, web3) } diff --git a/libs/remix-tests/src/compiler.ts b/libs/remix-tests/src/compiler.ts index 740a306931..b8fd320f00 100644 --- a/libs/remix-tests/src/compiler.ts +++ b/libs/remix-tests/src/compiler.ts @@ -47,7 +47,6 @@ function isRemixTestFile (path: string) { function processFile (filePath: string, sources: SrcIfc, isRoot = false) { const importRegEx = /import ['"](.+?)['"];/g - let group: RegExpExecArray| null = null const isFileAlreadyInSources: boolean = Object.keys(sources).includes(filePath) // Return if file is a remix test file or already processed @@ -62,14 +61,6 @@ function processFile (filePath: string, sources: SrcIfc, isRoot = false) { content = includeTestLibs.concat(content) } sources[filePath] = { content } - importRegEx.exec('') // Resetting state of RegEx - - // Process each 'import' in file content - while ((group = importRegEx.exec(content))) { - const importedFile: string = group[1] - const importedFilePath: string = path.join(path.dirname(filePath), importedFile) - processFile(importedFilePath, sources) - } } const userAgent = (typeof (navigator) !== 'undefined') && navigator.userAgent ? navigator.userAgent.toLowerCase() : '-' @@ -123,7 +114,13 @@ export function compileFileOrFiles (filename: string, isDirectory: boolean, opts } finally { async.waterfall([ function loadCompiler (next) { - compiler = new RemixCompiler() + compiler = new RemixCompiler((url, cb) => { + try { + cb(null, fs.readFileSync(url, 'utf-8')) + } catch (e) { + cb(e.message) + } + }) if (compilerConfig) { const { currentCompilerUrl, evmVersion, optimize, runs } = compilerConfig if (evmVersion) compiler.set('evmVersion', evmVersion) diff --git a/libs/remix-ui/panel/src/lib/dragbar/dragbar.tsx b/libs/remix-ui/panel/src/lib/dragbar/dragbar.tsx index 232f23ff10..116630c64c 100644 --- a/libs/remix-ui/panel/src/lib/dragbar/dragbar.tsx +++ b/libs/remix-ui/panel/src/lib/dragbar/dragbar.tsx @@ -20,6 +20,7 @@ const DragBar = (props: IRemixDragBarUi) => { props.refObject.current.setAttribute('style', `height: ${h}px;`) setDragBarPosY(window.innerHeight - props.refObject.current.offsetHeight) setDragState(false) + props.setHideStatus(false) } const handleResize = () => { setDragBarPosY(window.innerHeight - props.refObject.current.offsetHeight) diff --git a/libs/remix-ui/panel/src/lib/main/main-panel.tsx b/libs/remix-ui/panel/src/lib/main/main-panel.tsx index 4fb00ddf65..4ea7dc20f2 100644 --- a/libs/remix-ui/panel/src/lib/main/main-panel.tsx +++ b/libs/remix-ui/panel/src/lib/main/main-panel.tsx @@ -37,14 +37,24 @@ const RemixUIMainPanel = () => { appContext.layout.event.on('change', () => { renderPanels() }) + + return () => { + appContext.layout.event.off('change') + } }, []) + const showTerminal = (hide: boolean) => { + appContext.layout.panels.terminal.minimized = hide + appContext.layout.event.emit('change', appContext.layout.panels) + appContext.layout.emit('change', appContext.layout.panels) + } + return (