cleanup e2e. clean up comments. add default compiler version

pull/4841/head
Joseph Izang 6 months ago
parent ecdfbbd7d5
commit c26f1d86ca
  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 = ` const asyncAwait = `
var p = function () { var p = function () {
return new Promise(function (resolve, reject) { return new Promise(function (resolve, reject) {

@ -32,23 +32,6 @@ export function ContractGUI(props: ContractGUIProps) {
const initializeFields = useRef<Array<HTMLInputElement | null>>([]) const initializeFields = useRef<Array<HTMLInputElement | null>>([])
const basicInputRef = useRef<HTMLInputElement>() const basicInputRef = useRef<HTMLInputElement>()
const intl = useIntl() 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(() => { useEffect(() => {
if (props.deployOption && Array.isArray(props.deployOption)) { if (props.deployOption && Array.isArray(props.deployOption)) {
if (props.deployOption[0] && props.deployOption[0].title === 'Deploy with Proxy' && props.deployOption[0].active) handleDeployProxySelect(true) 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}> <div className="d-flex p-0 wrapperElement" onClick={handleActionClick} data-id={buttonOptions.dataId} data-title={buttonOptions.title}>
<button <button
className={`udapp_instanceButton text-nowrap overflow-hidden text-truncate ${props.widthClass} btn btn-sm ${buttonOptions.classList}`} className={`udapp_instanceButton text-nowrap overflow-hidden text-truncate ${props.widthClass} btn btn-sm ${buttonOptions.classList}`}
data-id={buttonOptions.dataId} data-id={`${buttonOptions.dataId}firstbullseye`}
data-title={buttonOptions.title} data-title={`${buttonOptions.title}bullseye`}
disabled={(toggleUpgradeImp && !proxyAddress) || props.disabled || (props.inputs !== '' && basicInput === '')} disabled={(toggleUpgradeImp && !proxyAddress) || props.disabled || (props.inputs !== '' && basicInput === '')}
> >
{title} {title}

@ -27,22 +27,7 @@ export function UniversalDappUI(props: UdappProps) {
const [calldataValue, setCalldataValue] = useState<string>('') const [calldataValue, setCalldataValue] = useState<string>('')
const [evmBC, setEvmBC] = useState(null) const [evmBC, setEvmBC] = useState(null)
const [instanceBalance, setInstanceBalance] = useState(0) 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(() => { useEffect(() => {
if (!props.instance.abi) { if (!props.instance.abi) {
const abi = txHelper.sortAbiFunction(props.instance.contractData.abi) const abi = txHelper.sortAbiFunction(props.instance.contractData.abi)

@ -85,13 +85,13 @@ export function RunTabUI(props: RunTabProps) {
const getVersion = () => { const getVersion = () => {
let version = '' let version = ''
try { 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) { if (parseFloat(version) < 0.6) {
setSolcVersion({ version: version, canReceive: false }) setSolcVersion({ version: version, canReceive: false })
} }
setSolcVersion({ version: version, canReceive: true }) setSolcVersion({ version: version, canReceive: true })
} catch (e) { } 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) console.log(e)
} }
return version return version

Loading…
Cancel
Save