Skip to content

Commit 23f9bb5

Browse files
authored
Merge branch 'master' into m10
2 parents 5de3aa4 + 21fe63a commit 23f9bb5

File tree

5 files changed

+18
-5
lines changed

5 files changed

+18
-5
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ class AnalysisTab extends ViewPlugin {
3939
}
4040
}
4141

42-
onActivation () {
42+
async onActivation () {
43+
const isSolidityActive = await this.call('manager', 'isActive', 'solidity')
44+
if (!isSolidityActive) {
45+
await this.call('manager', 'activatePlugin', 'solidity')
46+
}
4347
this.renderComponent()
4448
}
4549

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ module.exports = class TestTab extends ViewPlugin {
4848

4949
appManager.event.on('activate', (name) => {
5050
if (name === 'solidity') this.updateRunAction()
51+
console.log('solidity is activated')
5152
})
5253
appManager.event.on('deactivate', (name) => {
5354
if (name === 'solidity') this.updateRunAction()
@@ -74,6 +75,14 @@ module.exports = class TestTab extends ViewPlugin {
7475
}
7576
}
7677

78+
async onActivation () {
79+
const isSolidityActive = await this.call('manager', 'isActive', 'solidity')
80+
if (!isSolidityActive) {
81+
await this.call('manager', 'activatePlugin', 'solidity')
82+
}
83+
this.updateRunAction()
84+
}
85+
7786
onDeactivation () {
7887
this.off('filePanel', 'newTestFileCreated')
7988
this.off('filePanel', 'setWorkspace')
@@ -637,7 +646,6 @@ module.exports = class TestTab extends ViewPlugin {
637646
el.setAttribute('title', 'No solidity file selected')
638647
} else {
639648
el.setAttribute('title', 'The "Solidity Plugin" should be activated')
640-
// @todo(#2747) we can activate the plugin here
641649
}
642650
}
643651
if (!this.runActionElement) {

apps/remix-ide/src/remixAppManager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const requiredModules = [ // services + layout views + system views
1414
const dependentModules = ['git', 'hardhat'] // module which shouldn't be manually activated (e.g git is activated by remixd)
1515

1616
export function isNative (name) {
17-
const nativePlugins = ['vyper', 'workshops', 'debugger', 'remixd', 'menuicons', 'solidity', 'hardhat-provider']
17+
const nativePlugins = ['vyper', 'workshops', 'debugger', 'remixd', 'menuicons', 'solidity', 'hardhat-provider', 'solidityStaticAnalysis', 'solidityUnitTesting']
1818
return nativePlugins.includes(name) || requiredModules.includes(name)
1919
}
2020

libs/remix-tests/src/run.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ commander
8282
const baseURL = 'https://binaries.soliditylang.org/wasm/'
8383
const response: AxiosResponse = await axios.get(baseURL + 'list.json')
8484
const { releases, latestRelease } = response.data
85-
const compString = releases[compVersion]
85+
const compString = releases ? releases[compVersion] : null
8686
if (!compString) {
8787
log.error(`No compiler found in releases with version ${compVersion}`)
8888
process.exit()

libs/remixd/src/bin/remixd.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ function errorHandler (error: any, service: string) {
156156
console.error(e)
157157
}
158158

159-
return data.includes(origin) ? data.includes(origin) : data.includes(domain)
159+
const dataArray:string[] = data
160+
return dataArray.includes(origin) ? dataArray.includes(origin) : dataArray.includes(domain)
160161
} catch (e) {
161162
try {
162163
// eslint-disable-next-line

0 commit comments

Comments
 (0)