diff --git a/apps/remix-ide/src/blockchain/execution-context.js b/apps/remix-ide/src/blockchain/execution-context.js index e210793c1c..0b63c241cd 100644 --- a/apps/remix-ide/src/blockchain/execution-context.js +++ b/apps/remix-ide/src/blockchain/execution-context.js @@ -20,7 +20,7 @@ if (typeof window !== 'undefined' && typeof window.ethereum !== 'undefined') { export class ExecutionContext { constructor () { this.event = new EventManager() - this.executionContext = null + this.executionContext = 'vm' this.lastBlock = null this.blockGasLimitDefault = 4300000 this.blockGasLimit = this.blockGasLimitDefault diff --git a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx index 7aef284f10..ef4ac18ad0 100644 --- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx +++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx @@ -26,7 +26,11 @@ export function Workspace () { const initGitRepoRef = useRef() useEffect(() => { - setCurrentWorkspace(localStorage.getItem('currentWorkspace') ? localStorage.getItem('currentWorkspace') : '') + let workspaceName = localStorage.getItem('currentWorkspace') + if (!workspaceName && global.fs.browser.workspaces.length) { + workspaceName = global.fs.browser.workspaces[0].name + } + setCurrentWorkspace(workspaceName) resetFocus() }, [])