Merge pull request #2831 from ethereum/fix_loading_udapp

Fix loading udapp
renderS^2
bunsenstraat 2 years ago committed by GitHub
commit aac85395e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      apps/remix-ide/src/blockchain/execution-context.js
  2. 6
      libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx

@ -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

@ -26,7 +26,11 @@ export function Workspace () {
const initGitRepoRef = useRef<HTMLInputElement>()
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()
}, [])

Loading…
Cancel
Save