diff --git a/apps/debugger/src/app/debugger-api.ts b/apps/debugger/src/app/debugger-api.ts index 6d52279ccd..6e93648d54 100644 --- a/apps/debugger/src/app/debugger-api.ts +++ b/apps/debugger/src/app/debugger-api.ts @@ -130,6 +130,8 @@ export const DebuggerApiMixin = (Base) => class extends Base { this.off('editor', 'breakpointAdded') this.off('editor', 'contentChanged') } + + showMessage (title: string, body: string) {} } export class CompilerAbstract implements CompilationOutput { // this is a subset of /remix-ide/src/app/compiler/compiler-abstract.js diff --git a/apps/remix-ide/src/app/tabs/debugger-tab.js b/apps/remix-ide/src/app/tabs/debugger-tab.js index edf7f39145..0f20b27cbf 100644 --- a/apps/remix-ide/src/app/tabs/debugger-tab.js +++ b/apps/remix-ide/src/app/tabs/debugger-tab.js @@ -62,6 +62,10 @@ export class DebuggerTab extends DebuggerApiMixin(ViewPlugin) { return this.el } + showMessage (title, body) { + modalDialogCustom.alert(title, body) + } + renderComponent () { ReactDOM.render( diff --git a/libs/remix-ui/debugger-ui/src/lib/DebuggerAPI.ts b/libs/remix-ui/debugger-ui/src/lib/DebuggerAPI.ts deleted file mode 100644 index d9f8d10ff0..0000000000 --- a/libs/remix-ui/debugger-ui/src/lib/DebuggerAPI.ts +++ /dev/null @@ -1,65 +0,0 @@ - -import type { CompilationResult, CompilationSource } from '@remix-project/remix-solidity-ts' - -export interface DebuggerUIProps { - debuggerAPI: DebuggerAPI -} - -interface EditorEvent { - event: { - register(eventName: 'breakpointCleared' | 'breakpointAdded' | 'contentChanged', - callback: (fileName: string, row: string | number) => void) - } -} - -interface LineColumnLocation { - start: { - line: number, column: number - }, - end: { - line: number, column: number - } -} - -interface RawLocation { - start: number, length: number -} - -interface Sources { - [fileName: string] : {content: string} -} - -interface CompilationOutput { - source: { sources: Sources, target: string } - data: CompilationResult - getSourceName: (id: number) => string -} - -interface Asts { - [fileName: string] : CompilationSource // ast -} - -interface TransactionReceipt { - blockHash: string - blockNumber: number - transactionHash: string - transactionIndex: number - from: string - to: string - contractAddress: string | null - } - -export interface DebuggerAPI { - offsetToLineColumnConverter: { offsetToLineColumn: (sourceLocation: RawLocation, file: number, contents: Sources, asts: Asts) => LineColumnLocation } - debugHash: string - debugHashRequest: string - removeHighlights: boolean - editor: EditorEvent - discardHighlight: () => void - highlight: (lineColumnPos: LineColumnLocation, path: string) => void - fetchContractAndCompile: (address: string, currentReceipt: TransactionReceipt) => CompilationOutput - getFile: (path: string) => string - setFile: (path: string, content: string) => void - getDebugWeb3: () => any // returns an instance of web3.js - showMessage: (title: string, message: string) => void -} \ No newline at end of file diff --git a/libs/remix-ui/debugger-ui/src/lib/idebugger-api.ts b/libs/remix-ui/debugger-ui/src/lib/idebugger-api.ts index 4919b2ca13..70d5dcdb4a 100644 --- a/libs/remix-ui/debugger-ui/src/lib/idebugger-api.ts +++ b/libs/remix-ui/debugger-ui/src/lib/idebugger-api.ts @@ -63,4 +63,5 @@ export interface IDebuggerApi { getFile: (path: string) => Promise setFile: (path: string, content: string) => Promise getDebugWeb3: () => any // returns an instance of web3.js -} + showMessage (title: string, body: string): void +}