cleanup e2e. clean up comments. add default compiler version

pull/5370/head
Joseph Izang 6 months ago
parent a63d995cf5
commit d23bbfe09b
  1. 3
      apps/remix-ide-e2e/src/tests/terminal.test.ts
  2. 21
      libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx
  3. 17
      libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx
  4. 4
      libs/remix-ui/run-tab/src/lib/run-tab.tsx

@ -407,9 +407,6 @@ module.exports = {
}
}
const asyncAwait = `
var p = function () {
return new Promise(function (resolve, reject) {

@ -32,23 +32,6 @@ export function ContractGUI(props: ContractGUIProps) {
const initializeFields = useRef<Array<HTMLInputElement | null>>([])
const basicInputRef = useRef<HTMLInputElement>()
const intl = useIntl()
// const [solcVersion, setSolcVersion] = useState({ version: '', canReceive: true })
// const getVersion = () => {
// let version = ''
// try {
// version = window.location.href.split('=')[5].split('+')[0].split('-')[1].slice(1)
// if (parseFloat(version) < 0.6) {
// setSolcVersion({ version: version, canReceive: false })
// }
// setSolcVersion({ version: version, canReceive: false })
// } catch (e) {
// version = window.location.href.split('=')[5].split('+')[0].split('-')[1].slice(1)
// console.log(e)
// }
// return version
// }
useEffect(() => {
if (props.deployOption && Array.isArray(props.deployOption)) {
if (props.deployOption[0] && props.deployOption[0].title === 'Deploy with Proxy' && props.deployOption[0].active) handleDeployProxySelect(true)
@ -316,8 +299,8 @@ export function ContractGUI(props: ContractGUIProps) {
<div className="d-flex p-0 wrapperElement" onClick={handleActionClick} data-id={buttonOptions.dataId} data-title={buttonOptions.title}>
<button
className={`udapp_instanceButton text-nowrap overflow-hidden text-truncate ${props.widthClass} btn btn-sm ${buttonOptions.classList}`}
data-id={buttonOptions.dataId}
data-title={buttonOptions.title}
data-id={`${buttonOptions.dataId}firstbullseye`}
data-title={`${buttonOptions.title}bullseye`}
disabled={(toggleUpgradeImp && !proxyAddress) || props.disabled || (props.inputs !== '' && basicInput === '')}
>
{title}

@ -27,22 +27,7 @@ export function UniversalDappUI(props: UdappProps) {
const [calldataValue, setCalldataValue] = useState<string>('')
const [evmBC, setEvmBC] = useState(null)
const [instanceBalance, setInstanceBalance] = useState(0)
// const [solcVersion, setSolcVersion] = useState({ version: '', canReceive: true })
// const getVersion = () => {
// let version = ''
// try {
// version = window.location.href.split('=')[5].split('+')[0].split('-')[1].slice(1)
// if (parseFloat(version) < 0.6) {
// setSolcVersion({ version: version, canReceive: false })
// }
// setSolcVersion({ version: version, canReceive: false })
// } catch (e) {
// version = window.location.href.split('=')[5].split('+')[0].split('-')[1].slice(1)
// console.log(e)
// }
// return version
// }
useEffect(() => {
if (!props.instance.abi) {
const abi = txHelper.sortAbiFunction(props.instance.contractData.abi)

@ -85,13 +85,13 @@ export function RunTabUI(props: RunTabProps) {
const getVersion = () => {
let version = ''
try {
version = window.location.href.split('=')[5].split('+')[0].split('-')[1].slice(1)
version = window.location.href.split('=')[5].split('+')[0].split('-')[1].slice(1) ?? 'v0.8.25'
if (parseFloat(version) < 0.6) {
setSolcVersion({ version: version, canReceive: false })
}
setSolcVersion({ version: version, canReceive: true })
} catch (e) {
version = window.location.href.split('=')[5].split('+')[0].split('-')[1].slice(1)
version = window.location.href.split('=')[5].split('+')[0].split('-')[1].slice(1) ?? 'v0.8.25'
console.log(e)
}
return version

Loading…
Cancel
Save