Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #68 from ethereum/bump2
Browse files Browse the repository at this point in the history
Fix references
  • Loading branch information
yann300 committed Jul 28, 2021
2 parents 5a80366 + 5a3ba63 commit 556ff43
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,19 +109,23 @@ const setupApplicationMenu = async () => {
applicationMenu(status === 'OUTDATED', (folder) => {
sharedFolderClient.sharedFolder(folder, false)
sharedFolderClient.setupNotifications(folder)
gitClient.sharedFolder(folder, false)
slitherClient.sharedFolder(folder)
hardhatClient.sharedFolder(folder)
})
}


// Similar object is also defined in websocket.ts
const ports = {
git: 65521,
hardhat: 65522,
slither: 65523,
folder: 65520
}

function startService (service, callback) {
try {
const socket = new remix.Websocket(ports[service], { remixIdeUrl }, () => services[service]())
const socket = new remixd.Websocket(ports[service], { remixIdeUrl }, () => services[service]())
socket.start(callback)
} catch (e) {
console.error(e)
Expand All @@ -143,15 +147,10 @@ let remixdStart = () => {
client.sharedFolder(currentFolder)
})

// Run hardhat service if a hardhat project is shared as folder
const hardhatConfigFilePath = utils.absolutePath('./', currentFolder) + '/hardhat.config.js'
const isHardhatProject = fs.existsSync(hardhatConfigFilePath)
if (isHardhatProject) {
startService('hardhat', (ws, client) => {
client.setWebSocket(ws)
client.sharedFolder(currentFolder)
})
}
startService('hardhat', (ws, client) => {
client.setWebSocket(ws)
client.sharedFolder(currentFolder)
})

} catch (error) {
throw new Error(error)
Expand Down

0 comments on commit 556ff43

Please sign in to comment.