diff --git a/.env b/.env deleted file mode 100644 index 8db17993d7..0000000000 --- a/.env +++ /dev/null @@ -1,4 +0,0 @@ -gist_token= -account_passphrase= -account_password= -NODE_OPTIONS=--max-old-space-size=2048 \ No newline at end of file diff --git a/apps/remix-ide-e2e/src/tests/defaultLayout.test.ts b/apps/remix-ide-e2e/src/tests/defaultLayout.test.ts index 239f55a448..94bc20207d 100644 --- a/apps/remix-ide-e2e/src/tests/defaultLayout.test.ts +++ b/apps/remix-ide-e2e/src/tests/defaultLayout.test.ts @@ -50,7 +50,6 @@ module.exports = { 'Toggles Terminal': function (browser: NightwatchBrowser) { browser.waitForElementVisible('div[data-id="terminalContainer"]') - .pause(5000) .assert.visible('div[data-id="terminalContainerDisplay"]') .click('i[data-id="terminalToggleIcon"]') .checkElementStyle('div[data-id="terminalToggleMenu"]', 'height', '35px') diff --git a/apps/remix-ide-e2e/src/tests/libraryDeployment.test.ts b/apps/remix-ide-e2e/src/tests/libraryDeployment.test.ts index ec513b9831..0a759aa332 100644 --- a/apps/remix-ide-e2e/src/tests/libraryDeployment.test.ts +++ b/apps/remix-ide-e2e/src/tests/libraryDeployment.test.ts @@ -77,7 +77,6 @@ function checkDeployShouldFail (browser: NightwatchBrowser, callback: VoidFuncti .clickLaunchIcon('udapp') .selectContract('test') // deploy lib .createContract('') - .pause(60000) .getText('div[class^="terminal"]', (value) => { console.log('value: ', value) }) diff --git a/libs/remix-ui/terminal/src/index.ts b/libs/remix-ui/terminal/src/index.ts index 1735a3cf89..5b8eeca5b5 100644 --- a/libs/remix-ui/terminal/src/index.ts +++ b/libs/remix-ui/terminal/src/index.ts @@ -1 +1 @@ -export * from './lib/remix-ui-terminal'; +export * from './lib/remix-ui-terminal' diff --git a/libs/remix-ui/terminal/src/lib/actions/terminalAction.ts b/libs/remix-ui/terminal/src/lib/actions/terminalAction.ts index 5d1023c34a..190c411500 100644 --- a/libs/remix-ui/terminal/src/lib/actions/terminalAction.ts +++ b/libs/remix-ui/terminal/src/lib/actions/terminalAction.ts @@ -1,6 +1,5 @@ export const registerCommandAction = (name, command, activate, dispatch) => { - console.log(name, ' object key') const commands: any = {} const _commands: any = {} _commands[name] = command @@ -91,8 +90,6 @@ export const registerCommandAction = (name, command, activate, dispatch) => { console.log({ scopedCommands }) return scopedCommands } - - console.log('david test dispatch') } export const filterFnAction = (name, filterFn, dispatch) => { @@ -173,8 +170,23 @@ export const initListeningOnNetwork = (props, dispatch) => { // log(this, tx, null) }) props.txListener.event.register('newTransaction', (tx, receipt) => { - console.log('new Transaction now') log(props, tx, receipt, dispatch) + registerCommandAction('knownTransaction', function (args, cmds, append) { + var data = args[0] + console.log({ data }) + // let el + // if (data.tx.isCall) { + // console.log({ data }) + // // el = renderCall(this, data) + // } else { + // // el = renderKnownTransaction(this, data, blockchain) + // } + // this.seen[data.tx.hash] = el + // append(el) + }, { activate: true }, dispatch) + // const result = Object.assign([], tx) + // console.log({ result }) + // scriptRunnerDispatch({ type: 'knownTransaction', payload: { message: result } }) }) const log = async (props, tx, receipt, dispatch) => { @@ -202,12 +214,9 @@ export const initListeningOnNetwork = (props, dispatch) => { props.txListener.event.register('debuggingRequested', async (hash) => { // TODO should probably be in the run module + console.log({ hash }, 'register Call') if (!await props.options.appManager.isActive('debugger')) await props.options.appManager.activatePlugin('debugger') props.thisState.call('menuicons', 'select', 'debugger') props.thisState.call('debugger', 'debug', hash) }) - - props.thisState.on('udapp', 'logHtml', (log) => { - console.log({ log }, ' listen to logHTML call') - }) } diff --git a/libs/remix-ui/terminal/src/lib/reducers/terminalReducer.ts b/libs/remix-ui/terminal/src/lib/reducers/terminalReducer.ts index 332402b427..b949f4a272 100644 --- a/libs/remix-ui/terminal/src/lib/reducers/terminalReducer.ts +++ b/libs/remix-ui/terminal/src/lib/reducers/terminalReducer.ts @@ -141,12 +141,9 @@ export const remixWelcomeTextReducer = (state, action) => { } export const registerScriptRunnerReducer = (state, action) => { + const result = Object.assign([], action.payload.message) + console.log({ result }) switch (action.type) { - case 'html': - return { - ...state, - journalBlocks: initialState.journalBlocks.push({ message: action.payload.message, style: 'text-log' }) - } case 'log': return { ...state, diff --git a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx index de84b13d29..d37600ff2d 100644 --- a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx +++ b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx @@ -43,8 +43,7 @@ export interface RemixUiTerminalProps { registry: any, commands: any, txListener: any, - eventsDecoder: any, - logHtml: any + eventsDecoder: any } export interface ClipboardEvent extends SyntheticEvent { @@ -102,11 +101,6 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { messagesEndRef.current.scrollIntoView({ behavior: 'smooth' }) } - useEffect(() => { - scriptRunnerDispatch({ type: 'html', payload: { message: props.logHtml } }) - }, [props.logHtml]) - - console.log({ logHtml: props.logHtml }) // events useEffect(() => { initListeningOnNetwork(props, scriptRunnerDispatch) @@ -114,6 +108,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { registerInfoScriptRunnerAction(props.thisState, 'info', newstate.commands, scriptRunnerDispatch) registerWarnScriptRunnerAction(props.thisState, 'warn', newstate.commands, scriptRunnerDispatch) registerErrorScriptRunnerAction(props.thisState, 'error', newstate.commands, scriptRunnerDispatch) + registerCommandAction('html', _blocksRenderer('html'), { activate: true }, dispatch) registerCommandAction('log', _blocksRenderer('log'), { activate: true }, dispatch) registerCommandAction('info', _blocksRenderer('info'), { activate: true }, dispatch) @@ -122,13 +117,12 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { registerCommandAction('script', function execute (args, scopedCommands, append) { var script = String(args[0]) - console.log({ script }, 'script') _shell(script, scopedCommands, function (error, output) { if (error) scriptRunnerDispatch({ type: 'error', payload: { message: error } }) if (output) scriptRunnerDispatch({ type: 'script', payload: { message: '5' } }) }) }, { activate: true }, dispatch) - }, [props.thisState.autoCompletePopup, autoCompletState.text, props.logHtml]) + }, [props.thisState.autoCompletePopup, autoCompletState.text]) useEffect(() => { scrollToBottom() @@ -1435,15 +1429,15 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { { handleAutoComplete() } -
-
+
{!clearConsole && } {newstate.journalBlocks && newstate.journalBlocks.map((x, index) => { if (x.name === 'emptyBlock') {