fix props. fix vm environments

pull/5367/head
Joseph Izang 3 weeks ago committed by Aniket
parent d45b9f4534
commit fc20cf9117
  1. 2
      libs/remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx
  2. 2
      libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx
  3. 1
      libs/remix-ui/run-tab/src/lib/components/instanceContainerUI.tsx
  4. 5
      libs/remix-ui/run-tab/src/lib/components/settingsUI.tsx
  5. 2
      libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx
  6. 3
      libs/remix-ui/run-tab/src/lib/run-tab.tsx
  7. 6
      libs/remix-ui/run-tab/src/lib/types/index.ts

@ -483,6 +483,8 @@ export function ContractDropdownUI(props: ContractDropdownProps) {
setSolcVersion={props.setCompilerVersion} setSolcVersion={props.setCompilerVersion}
getVersion={props.getCompilerVersion} getVersion={props.getCompilerVersion}
evmCheckComplete={props.evmCheckComplete} evmCheckComplete={props.evmCheckComplete}
plugin={props.plugin}
runTabState={props.runTabState}
/> />
<div className="d-flex py-1 align-items-center custom-control custom-checkbox"> <div className="d-flex py-1 align-items-center custom-control custom-checkbox">
<input <input

@ -175,7 +175,7 @@ export function ContractGUI(props: ContractGUIProps) {
const handleActionClick = async () => { const handleActionClick = async () => {
props.getVersion() props.getVersion()
await props.getCompilerDetails() await props.getCompilerDetails()
if (props.evmCheckComplete === false) return if (props.evmCheckComplete === false && !props.runTabState.selectExEnv.toLowerCase().includes('vm-')) return
if (deployState.deploy) { if (deployState.deploy) {
const proxyInitializeString = getMultiValsString(initializeFields.current) const proxyInitializeString = getMultiValsString(initializeFields.current)
props.clickCallBack(props.initializerOptions.inputs.inputs, proxyInitializeString, ['Deploy with Proxy']) props.clickCallBack(props.initializerOptions.inputs.inputs, proxyInitializeString, ['Deploy with Proxy'])

@ -63,6 +63,7 @@ export function InstanceContainerUI(props: InstanceContainerProps) {
solcVersion={props.solcVersion} solcVersion={props.solcVersion}
getVersion={props.getVersion} getVersion={props.getVersion}
getCompilerDetails={props.getCompilerDetails} getCompilerDetails={props.getCompilerDetails}
runTabState={props.runTabState}
/> />
) )
})} })}

@ -10,11 +10,6 @@ import { ValueUI } from './value'
export function SettingsUI(props: SettingsProps) { export function SettingsUI(props: SettingsProps) {
// this._deps.config.events.on('settings/personal-mode_changed', this.onPersonalChange.bind(this)) // this._deps.config.events.on('settings/personal-mode_changed', this.onPersonalChange.bind(this))
useEffect(() => {
// listen for chainId change on window.ethereum and call EvaluateEnvironmentSelection
// (window as any).ethereum?.on('chainChanged', console.log('metamask did something')) //props.EvaluateEnvironmentSelection)
}, [])
return ( return (
<div className="udapp_settings"> <div className="udapp_settings">
<EnvironmentUI runTabPlugin={props.runTabPlugin} selectedEnv={props.selectExEnv} providers={props.providers} setExecutionContext={props.setExecutionContext} checkSelectionCorrectness={props.EvaluateEnvironmentSelection} /> <EnvironmentUI runTabPlugin={props.runTabPlugin} selectedEnv={props.selectExEnv} providers={props.providers} setExecutionContext={props.setExecutionContext} checkSelectionCorrectness={props.EvaluateEnvironmentSelection} />

@ -328,6 +328,8 @@ export function UniversalDappUI(props: UdappProps) {
getVersion={props.getVersion} getVersion={props.getVersion}
getCompilerDetails={props.getCompilerDetails} getCompilerDetails={props.getCompilerDetails}
evmCheckComplete={false} evmCheckComplete={false}
plugin={props.plugin}
runTabState={props.runTabState}
funcABI={funcABI} funcABI={funcABI}
clickCallBack={(valArray: {name: string; type: string}[], inputsValues: string) => { clickCallBack={(valArray: {name: string; type: string}[], inputsValues: string) => {
runTransaction(lookupOnly, funcABI, valArray, inputsValues, index) runTransaction(lookupOnly, funcABI, valArray, inputsValues, index)

@ -397,6 +397,8 @@ export function RunTabUI(props: RunTabProps) {
getCompilerVersion={getVersion} getCompilerVersion={getVersion}
getCompilerDetails={getCompilerDetails} getCompilerDetails={getCompilerDetails}
evmCheckComplete={evmCheckComplete} evmCheckComplete={evmCheckComplete}
plugin={plugin}
runTabState={runTab}
/> />
<RecorderUI <RecorderUI
plugin={plugin} plugin={plugin}
@ -412,6 +414,7 @@ export function RunTabUI(props: RunTabProps) {
<InstanceContainerUI <InstanceContainerUI
plugin={plugin} plugin={plugin}
getCompilerDetails={getCompilerDetails} getCompilerDetails={getCompilerDetails}
runTabState={runTab}
instances={runTab.instances} instances={runTab.instances}
clearInstances={removeInstances} clearInstances={removeInstances}
unpinInstance={unpinPinnedInstance} unpinInstance={unpinPinnedInstance}

@ -234,6 +234,8 @@ export type MainnetPrompt = (
export interface ContractDropdownProps { export interface ContractDropdownProps {
getCompilerDetails: () => Promise<any> getCompilerDetails: () => Promise<any>
evmCheckComplete: boolean, evmCheckComplete: boolean,
plugin: RunTab,
runTabState: RunTabState
selectedAccount: string, selectedAccount: string,
exEnvironment: string, exEnvironment: string,
contracts: { contracts: {
@ -299,6 +301,7 @@ export interface RecorderProps {
export interface InstanceContainerProps { export interface InstanceContainerProps {
getCompilerDetails: () => Promise<any> getCompilerDetails: () => Promise<any>
runTabState: RunTabState
instances: { instances: {
instanceList: { instanceList: {
contractData?: ContractData, contractData?: ContractData,
@ -382,6 +385,8 @@ export interface DeployOptions {
export interface ContractGUIProps { export interface ContractGUIProps {
getCompilerDetails: () => Promise<any> getCompilerDetails: () => Promise<any>
evmCheckComplete: boolean, evmCheckComplete: boolean,
plugin: RunTab,
runTabState: RunTabState
title?: string, title?: string,
funcABI: FuncABI, funcABI: FuncABI,
inputs: string, inputs: string,
@ -422,6 +427,7 @@ export interface MainnetProps {
export interface UdappProps { export interface UdappProps {
getCompilerDetails: () => Promise<any> getCompilerDetails: () => Promise<any>
runTabState: RunTabState
instance: { instance: {
contractData?: ContractData, contractData?: ContractData,
address: string, address: string,

Loading…
Cancel
Save