remove ethereumjsvm at starts

pull/5370/head
yann300 2 years ago
parent 60a00c5076
commit 037b4be546
  1. 1
      apps/remix-ide/src/blockchain/blockchain.js
  2. 3
      apps/remix-ide/src/blockchain/execution-context.js
  3. 10
      libs/remix-ui/settings/src/lib/remix-ui-settings.tsx
  4. 5
      libs/remix-ui/settings/src/lib/settingsAction.ts

@ -500,7 +500,6 @@ export class Blockchain extends Plugin {
} }
// NOTE: the config is only needed because exectuionContext.init does // NOTE: the config is only needed because exectuionContext.init does
// if config.get('settings/always-use-vm'), we can simplify this later
async resetAndInit (config, transactionContextAPI) { async resetAndInit (config, transactionContextAPI) {
this.transactionContextAPI = transactionContextAPI this.transactionContextAPI = transactionContextAPI
this.executionContext.init(config) this.executionContext.init(config)

@ -34,9 +34,6 @@ export class ExecutionContext {
} }
init (config) { init (config) {
if (config.get('settings/always-use-vm')) {
this.executionContext = 'vm-merge'
}
this.event.trigger('contextChanged', [this.executionContext]) this.event.trigger('contextChanged', [this.executionContext])
} }

@ -41,9 +41,6 @@ export const RemixUiSettings = (props: RemixUiSettingsProps) => {
const metadataConfig = props.config.get('settings/generate-contract-metadata') const metadataConfig = props.config.get('settings/generate-contract-metadata')
if (metadataConfig === undefined || metadataConfig === null) generateContractMetadat(props.config, true, dispatch) if (metadataConfig === undefined || metadataConfig === null) generateContractMetadat(props.config, true, dispatch)
const javascriptVM = props.config.get('settings/always-use-vm')
if (javascriptVM === null || javascriptVM === undefined) ethereumVM(props.config, true, dispatch)
const useAutoComplete = props.config.get('settings/auto-completion') const useAutoComplete = props.config.get('settings/auto-completion')
if (useAutoComplete === null || useAutoComplete === undefined) useAutoCompletion(props.config, true, dispatch) if (useAutoComplete === null || useAutoComplete === undefined) useAutoCompletion(props.config, true, dispatch)
@ -148,7 +145,6 @@ export const RemixUiSettings = (props: RemixUiSettingsProps) => {
const generalConfig = () => { const generalConfig = () => {
const isMetadataChecked = props.config.get('settings/generate-contract-metadata') || false const isMetadataChecked = props.config.get('settings/generate-contract-metadata') || false
const isEthereumVMChecked = props.config.get('settings/always-use-vm') || false
const isEditorWrapChecked = props.config.get('settings/text-wrap') || false const isEditorWrapChecked = props.config.get('settings/text-wrap') || false
const isPersonalChecked = props.config.get('settings/personal-mode') || false const isPersonalChecked = props.config.get('settings/personal-mode') || false
const isMatomoChecked = props.config.get('settings/matomo-analytics') || false const isMatomoChecked = props.config.get('settings/matomo-analytics') || false
@ -192,12 +188,6 @@ export const RemixUiSettings = (props: RemixUiSettingsProps) => {
<FormattedMessage id='settings.generateContractMetadataText' /> <FormattedMessage id='settings.generateContractMetadataText' />
</label> </label>
</div> </div>
<div className="fmt-2 custom-control custom-checkbox mb-1">
<input onChange={onchangeOption} className="custom-control-input" id="alwaysUseVM" data-id="settingsTabAlwaysUseVM" type="checkbox" name="ethereumVM" checked={isEthereumVMChecked} />
<label className={`form-check-label custom-control-label align-middle ${getTextClass('settings/always-use-vm')}`} htmlFor="alwaysUseVM">
<FormattedMessage id='settings.ethereunVMText' />
</label>
</div>
<div className="mt-2 custom-control custom-checkbox mb-1"> <div className="mt-2 custom-control custom-checkbox mb-1">
<input id="editorWrap" className="custom-control-input" type="checkbox" onChange={textWrapEvent} checked={isEditorWrapChecked} /> <input id="editorWrap" className="custom-control-input" type="checkbox" onChange={textWrapEvent} checked={isEditorWrapChecked} />
<label className={`form-check-label custom-control-label align-middle ${getTextClass('settings/text-wrap')}`} htmlFor="editorWrap"> <label className={`form-check-label custom-control-label align-middle ${getTextClass('settings/text-wrap')}`} htmlFor="editorWrap">

@ -13,11 +13,6 @@ export const generateContractMetadat = (config, checked, dispatch) => {
dispatch({ type: 'contractMetadata', payload: { isChecked: checked, textClass: checked ? textDark : textSecondary } }) dispatch({ type: 'contractMetadata', payload: { isChecked: checked, textClass: checked ? textDark : textSecondary } })
} }
export const ethereumVM = (config, checked: boolean, dispatch) => {
config.set('settings/always-use-vm', checked)
dispatch({ type: 'ethereumVM', payload: { isChecked: checked, textClass: checked ? textDark : textSecondary } })
}
export const textWrapEventAction = (config, editor, checked, dispatch) => { export const textWrapEventAction = (config, editor, checked, dispatch) => {
config.set('settings/text-wrap', checked) config.set('settings/text-wrap', checked)
editor.resize(checked) editor.resize(checked)

Loading…
Cancel
Save