-
Notifications
You must be signed in to change notification settings - Fork 928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix get solidity version for udapp docs #4841
Conversation
✅ Deploy Preview for remixproject ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
a1be46e
to
38ab598
Compare
@@ -32,6 +32,22 @@ 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 }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
const getVersion = () => window.location.href.split('=')[5].split('+')[0].split('-')[1] | ||
|
||
// const [solcVersion, setSolcVersion] = useState({ version: '', canReceive: true }) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
const getVersion = () => { | ||
let version = '' | ||
try { | ||
version = window.location.href.split('=')[5].split('+')[0].split('-')[1].slice(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
source of issue was this code. When there is no version in URL params, this throws. Better to check if version is available before splitting again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using null coalescing to make sure that there is a default compiler selected. Hope this is agreeable
f686636
to
d6aeece
Compare
3a61402
to
b4e6865
Compare
@@ -299,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} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these needed? "firstbullseye"
and "bullseye"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
fixes #4834