Merge branch 'master' into vicons

pull/5370/head
bunsenstraat 3 years ago committed by GitHub
commit 47647ed860
  1. 10
      libs/remix-ui/run-tab/.babelrc
  2. 1
      libs/remix-ui/run-tab/src/lib/actions/index.ts
  3. 8
      libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx
  4. 7
      libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx

@ -1,12 +1,4 @@
{
"presets": [
[
"@nrwl/react/babel",
{
"runtime": "automatic",
"useBuiltIns": "usage"
}
]
],
"presets": ["@nrwl/react/babel"],
"plugins": []
}

@ -548,7 +548,6 @@ export const clearInstances = () => {
export const loadAddress = (contract: ContractData, address: string) => {
if (!contract) return dispatch(displayPopUp('No compiled contracts found.'))
clearInstances()
loadContractFromAddress(address,
(cb) => {
dispatch(displayNotification('At Address', `Do you really want to interact with ${address} using the current ABI definition?`, 'OK', 'Cancel', cb, null))

@ -62,13 +62,7 @@ export function ContractGUI (props: ContractGUIProps) {
return 'cannot encode empty arguments'
}
const multiJSON = JSON.parse('[' + multiString + ']')
let encodeObj
if (props.evmBC) {
encodeObj = txFormat.encodeData(props.funcABI, multiJSON, props.evmBC)
} else {
encodeObj = txFormat.encodeData(props.funcABI, multiJSON, null)
}
const encodeObj = txFormat.encodeData(props.funcABI, multiJSON, null)
if (encodeObj.error) {
console.error(encodeObj.error)
return encodeObj.error

@ -36,7 +36,7 @@ export const TabsUI = (props: TabsUIProps) => {
const classNameImg = 'my-1 mr-1 text-dark ' + tab.iconClass
const classNameTab = 'nav-item nav-link d-flex justify-content-center align-items-center px-2 py-1 tab' + (index === currentIndexRef.current ? ' active' : '')
return (
<div onClick={() => { props.onSelect(index); currentIndexRef.current = index; setSelectedIndex(index) }} ref={el => { tabsRef.current[index] = el }} className={classNameTab} title={tab.tooltip}>
<div ref={el => { tabsRef.current[index] = el }} className={classNameTab} title={tab.tooltip}>
{tab.icon ? (<img className="my-1 mr-1 iconImage" src={tab.icon} />) : (<i className={classNameImg}></i>)}
<span className="title-tabs">{tab.title}</span>
<span className="close-tabs" onClick={(event) => { props.onClose(index); event.stopPropagation() }}>
@ -88,6 +88,11 @@ export const TabsUI = (props: TabsUIProps) => {
tabsElement.current = domEl
tabsElement.current.addEventListener('wheel', transformScroll)
}}
onSelect={(index) => {
props.onSelect(index)
currentIndexRef.current = index
setSelectedIndex(index)
}}
>
<TabList className="d-flex flex-row align-items-center">
{props.tabs.map((tab, i) => <Tab className="py-1" key={tab.name}>{renderTab(tab, i)}</Tab>)}

Loading…
Cancel
Save