fix obtain solidity ver function

pull/4841/head
Joseph Izang 6 months ago
parent f0643f1cc8
commit bd5d6e6e24
  1. 12
      libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx

@ -28,8 +28,16 @@ export function UniversalDappUI(props: UdappProps) {
const [evmBC, setEvmBC] = useState(null) const [evmBC, setEvmBC] = useState(null)
const [instanceBalance, setInstanceBalance] = useState(0) const [instanceBalance, setInstanceBalance] = useState(0)
const getVersion = () => window.location.href.split('=')[5].split('+')[0].split('-')[1] const getVersion = () => {
let version = ''
try {
version = window.location.href.split('=')[5].split('+')[0].split('-')[1]
console.log('try part to see what version is', version)
} catch {
version = window.location.href.split('=')[5].split('+')[0].split('-')[1]
console.log('there was an error so retrying. lets see what version is now', 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)

Loading…
Cancel
Save