pull/1346/head
yann300 3 years ago
parent 2720bbdda3
commit 8d44d31cb3
  1. 41
      libs/remix-ui/debugger-ui/src/lib/vm-debugger/assembly-items.tsx

@ -28,19 +28,7 @@ export const AssemblyItems = ({ registerEvent }) => {
}
}, [assemblyItems.opCodes.index])
const clearItems = () => {
let currentItem = refs.current[selectedItem] ? refs.current[selectedItem] : null
if (currentItem) {
currentItem.removeAttribute('selected')
currentItem.removeAttribute('style')
if (currentItem.firstChild) {
currentItem.firstChild.removeAttribute('style')
}
}
currentItem = refs.current[nextSelectedItem] ? refs.current[nextSelectedItem] : null
let clearItem = (currentItem) => {
if (currentItem) {
currentItem.removeAttribute('selected')
currentItem.removeAttribute('style')
@ -48,33 +36,20 @@ export const AssemblyItems = ({ registerEvent }) => {
currentItem.firstChild.removeAttribute('style')
}
}
}
const clearItems = () => {
clearItem(refs.current[selectedItem] ? refs.current[selectedItem] : null)
clearItem(refs.current[nextSelectedItem] ? refs.current[nextSelectedItem] : null)
returnInstructionIndexes.map((index) => {
if (index < 0) return
currentItem = refs.current[index] ? refs.current[index] : null
if (currentItem) {
currentItem.removeAttribute('selected')
currentItem.removeAttribute('style')
if (currentItem.firstChild) {
currentItem.firstChild.removeAttribute('style')
}
}
clearItem(refs.current[index] ? refs.current[index] : null)
})
outOfGasInstructionIndexes.map((index) => {
if (index < 0) return
currentItem = refs.current[index] ? refs.current[index] : null
if (currentItem) {
currentItem.removeAttribute('selected')
currentItem.removeAttribute('style')
if (currentItem.firstChild) {
currentItem.firstChild.removeAttribute('style')
}
}
clearItem(refs.current[index] ? refs.current[index] : null)
})
}

Loading…
Cancel
Save