From 6480e5724c9ce69e1f131e2c3eef970a20da3371 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 12 Jan 2022 09:47:03 +0100 Subject: [PATCH 1/4] Update .babelrc --- libs/remix-ui/run-tab/.babelrc | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/libs/remix-ui/run-tab/.babelrc b/libs/remix-ui/run-tab/.babelrc index ccae900be4..09d67939cc 100644 --- a/libs/remix-ui/run-tab/.babelrc +++ b/libs/remix-ui/run-tab/.babelrc @@ -1,12 +1,4 @@ { - "presets": [ - [ - "@nrwl/react/babel", - { - "runtime": "automatic", - "useBuiltIns": "usage" - } - ] - ], + "presets": ["@nrwl/react/babel"], "plugins": [] } From 28ed4c84929b770553e5da2f0b4b0b14787ed530 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 12 Jan 2022 10:44:52 +0100 Subject: [PATCH 2/4] use onSelect from Tabs --- libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx b/libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx index 740dfae507..3c791d1c1b 100644 --- a/libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx +++ b/libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx @@ -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 ( -
{ props.onSelect(index); currentIndexRef.current = index; setSelectedIndex(index) }} ref={el => { tabsRef.current[index] = el }} className={classNameTab} title={tab.tooltip}> +
{ tabsRef.current[index] = el }} className={classNameTab} title={tab.tooltip}> {tab.icon ? () : ()} {tab.title} { 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) + }} > {props.tabs.map((tab, i) => {renderTab(tab, i)})} From 5353a094c857924f9b7b7b01b33c131aaea96d1e Mon Sep 17 00:00:00 2001 From: David Disu Date: Wed, 12 Jan 2022 11:37:03 +0100 Subject: [PATCH 3/4] Do not clear instance list for AtAddress --- libs/remix-ui/run-tab/src/lib/actions/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/libs/remix-ui/run-tab/src/lib/actions/index.ts b/libs/remix-ui/run-tab/src/lib/actions/index.ts index c659b2a802..9ee2446b1c 100644 --- a/libs/remix-ui/run-tab/src/lib/actions/index.ts +++ b/libs/remix-ui/run-tab/src/lib/actions/index.ts @@ -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)) From 4fdf4ad94fd7f7e8f3bf027e6d1a12500fe471f8 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Thu, 13 Jan 2022 12:54:01 +0530 Subject: [PATCH 4/4] fix input encoding --- libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx b/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx index dd13a983ef..4bd6c7df96 100644 --- a/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx @@ -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