fix linting

auto_exec
yann300 3 years ago
parent f6a2db64d3
commit 5ced5f445c
  1. 14
      apps/solidity-compiler/src/app/compiler-api.ts
  2. 2
      libs/remix-ui/settings/src/lib/remix-ui-settings.tsx

@ -261,7 +261,10 @@ export const CompilerApiMixin = (Base) => class extends Base {
this.on('fileManager', 'fileClosed', this.data.eventHandlers.onFileClosed)
let postCompilationAction
this.on('compilerMetadata', 'artefactsUpdated', async () => {
if (postCompilationAction === 69) {
postCompilationAction = null
if (!await this.getAppParameter('live-mode')) return
const path = await this.getAppParameter('live-mode-script')
if (path) {
@ -270,6 +273,8 @@ export const CompilerApiMixin = (Base) => class extends Base {
await this.call('udapp', 'clearAllInstances')
this.call('scriptRunner', 'execute', content)
}
}
postCompilationAction = null
})
this.data.eventHandlers.onCompilationFinished = async (success, data, source, input, version) => {
@ -318,15 +323,14 @@ export const CompilerApiMixin = (Base) => class extends Base {
this.data.eventHandlers.onKeyDown = async (e) => {
if ((e.metaKey || e.ctrlKey) && e.keyCode === 83 && this.currentFile && this.currentFile.endsWith('.sol')) {
// ctrl+s or command+s
postCompilationAction = e.keyCode
e.preventDefault()
this.compileTabLogic.runCompiler(await this.getAppParameter('hardhat-compilation'))
} else if ((e.metaKey || e.ctrlKey) && e.keyCode === 69 && this.currentFile && this.currentFile.endsWith('.js')) {
} else if ((e.metaKey || e.ctrlKey) && e.keyCode === 69 && this.currentFile && this.currentFile.endsWith('.sol')) {
// ctrl+e or command+e
postCompilationAction = e.keyCode
e.preventDefault()
this.call('terminal', 'log', `running ${this.currentFile} ...`)
const content = await this.call('fileManager', 'readFile', this.currentFile)
await this.call('udapp', 'clearAllInstances')
this.call('scriptRunner', 'execute', content)
this.compileTabLogic.runCompiler(await this.getAppParameter('hardhat-compilation'))
}
}
window.document.addEventListener('keydown', this.data.eventHandlers.onKeyDown)

@ -1,7 +1,7 @@
import React, { useState, useReducer, useEffect, useCallback } from 'react' // eslint-disable-line
import { CopyToClipboard } from '@remix-ui/clipboard' // eslint-disable-line
import { enablePersonalModeText, ethereunVMText, labels, generateContractMetadataText, matomoAnalytics, textDark, textSecondary, warnText, wordWrapText, swarmSettingsTitle, liveModeSettingsText, liveModeText, liveModeText2, liveModeText4, liveModeText3, liveModeText5, liveModeSettingsTitle } from './constants'
import { enablePersonalModeText, ethereunVMText, labels, generateContractMetadataText, matomoAnalytics, textDark, textSecondary, warnText, wordWrapText, swarmSettingsTitle, liveModeText, liveModeText2, liveModeText4, liveModeText3, liveModeText5, liveModeSettingsTitle } from './constants'
import './remix-ui-settings.css'
import { ethereumVM, generateContractMetadat, liveMode, personal, textWrapEventAction, useMatomoAnalytics, saveTokenToast, removeTokenToast, saveSwarmSettingsToast } from './settingsAction'

Loading…
Cancel
Save