fix issue 3985

pull/5370/head
drafish 1 year ago committed by Aniket
parent e2b5201000
commit 47dbe143f0
  1. 2
      libs/remix-ui/terminal/src/lib/components/RenderCall.tsx
  2. 2
      libs/remix-ui/terminal/src/lib/components/RenderKnownTransactions.tsx
  3. 2
      libs/remix-ui/terminal/src/lib/components/RenderUnknownTransactions.tsx
  4. 2
      libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx

@ -15,7 +15,7 @@ const RenderCall = ({ tx, resolvedData, logs, index, plugin, showTableHash, txDe
const debug = (event, tx) => { const debug = (event, tx) => {
event.stopPropagation() event.stopPropagation()
if (tx.isCall && !tx.envMode.startsWith('vm')) { if (tx.isCall && !tx.envMode.startsWith('vm')) {
modal('VM mode', 'Cannot debug this call. Debugging calls is only possible in Remix VM mode.', 'Ok', true, () => {}, 'Cancel', () => {}) modal('VM mode', 'Cannot debug this call. Debugging calls is only possible in Remix VM mode.', 'Ok', false, () => {}, 'Cancel', () => {})
} else { } else {
plugin.event.trigger('debuggingRequested', [tx.hash]) plugin.event.trigger('debuggingRequested', [tx.hash])
} }

@ -11,7 +11,7 @@ const RenderKnownTransactions = ({ tx, receipt, resolvedData, logs, index, plugi
const debug = (event, tx) => { const debug = (event, tx) => {
event.stopPropagation() event.stopPropagation()
if (tx.isCall && !tx.envMode.startsWith('vm')) { if (tx.isCall && !tx.envMode.startsWith('vm')) {
modal('VM mode', 'Cannot debug this call. Debugging calls is only possible in Remix VM mode.', 'Ok', true, () => {}, 'Cancel', () => {}) modal('VM mode', 'Cannot debug this call. Debugging calls is only possible in Remix VM mode.', 'Ok', false, () => {}, 'Cancel', () => {})
} else { } else {
plugin.event.trigger('debuggingRequested', [tx.hash]) plugin.event.trigger('debuggingRequested', [tx.hash])
} }

@ -8,7 +8,7 @@ const RenderUnKnownTransactions = ({ tx, receipt, index, plugin, showTableHash,
const debug = (event, tx) => { const debug = (event, tx) => {
event.stopPropagation() event.stopPropagation()
if (tx.isCall && !tx.envMode.startsWith('vm')) { if (tx.isCall && !tx.envMode.startsWith('vm')) {
modal('VM mode', 'Cannot debug this call. Debugging calls is only possible in Remix VM mode.', 'Ok', true, () => {}, 'Cancel', () => {}) modal('VM mode', 'Cannot debug this call. Debugging calls is only possible in Remix VM mode.', 'Ok', false, () => {}, 'Cancel', () => {})
} else { } else {
plugin.event.trigger('debuggingRequested', [tx.hash]) plugin.event.trigger('debuggingRequested', [tx.hash])
} }

@ -371,7 +371,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
} }
const modal = (title: string, message: string, okLabel: string, hide: boolean, okFn: () => void, cancelLabel?: string, cancelFn?: () => void) => { const modal = (title: string, message: string, okLabel: string, hide: boolean, okFn: () => void, cancelLabel?: string, cancelFn?: () => void) => {
setModalState(prevState => ({ ...prevState, message, okLabel, okFn, cancelLabel, cancelFn, hide })) setModalState(prevState => ({ ...prevState, title, message, okLabel, okFn, cancelLabel, cancelFn, hide }))
} }
const handleHideModal = () => { const handleHideModal = () => {

Loading…
Cancel
Save