From 6191fd1bad8e53f82986741d6a9c9687a93fbbff Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Fri, 8 Jul 2022 13:16:32 +0530 Subject: [PATCH 1/6] env name updated --- apps/remix-ide-e2e/src/tests/terminal.test.ts | 2 +- apps/remix-ide/src/app/tabs/external-http-provider.tsx | 2 +- apps/remix-ide/src/blockchain/execution-context.js | 2 +- libs/remix-ui/run-tab/src/lib/components/account.tsx | 2 +- libs/remix-ui/run-tab/src/lib/components/environment.tsx | 2 +- libs/remix-ui/run-tab/src/lib/components/recorderCardUI.tsx | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/terminal.test.ts b/apps/remix-ide-e2e/src/tests/terminal.test.ts index c061d8fd39..b958b7d42d 100644 --- a/apps/remix-ide-e2e/src/tests/terminal.test.ts +++ b/apps/remix-ide-e2e/src/tests/terminal.test.ts @@ -46,7 +46,7 @@ module.exports = { .waitForElementContainsText('*[data-id="terminalJournal"]', '["0x5B38Da6a701c568545dCfcB03FcB875f56beddC4","0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2","0x4B20993Bc481177ec7E8f571ceCaE8A9e22C02db","0x78731D3Ca6b7E34aC0F824c42a7cC18A495cabaB","0x617F2E2fD72FD9D5503197092aC168c91465E7f2","0x17F6AD8Ef982297579C203069C1DbfFE4348c372","0x5c6B0f7Bf3E7ce046039Bd8FABdfD3f9F5021678","0x03C6FcED478cBbC9a4FAB34eF9f40767739D1Ff7","0x1aE0EA34a72D944a8C7603FfB3eC30a6669E454C","0x0A098Eda01Ce92ff4A4CCb7A4fFFb5A43EBC70DC","0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c","0x14723A09ACff6D2A60DcdF7aA4AFf308FDDC160C","0x4B0897b0513fdC7C541B6d9D7E929C4e5364D2dB","0x583031D1113aD414F02576BD6afaBfb302140225","0xdD870fA1b7C4700F2BD7f44238821C26f7392148"]') }, - 'Call web3.eth.getAccounts() using Web3 Provider #group5': function (browser: NightwatchBrowser) { + 'Call web3.eth.getAccounts() using External Http Provider #group5': function (browser: NightwatchBrowser) { browser .click('*[data-id="terminalClearConsole"]') // clear the terminal .clickLaunchIcon('udapp') diff --git a/apps/remix-ide/src/app/tabs/external-http-provider.tsx b/apps/remix-ide/src/app/tabs/external-http-provider.tsx index 5a22b48ba4..71c7c249c0 100644 --- a/apps/remix-ide/src/app/tabs/external-http-provider.tsx +++ b/apps/remix-ide/src/app/tabs/external-http-provider.tsx @@ -30,7 +30,7 @@ export class ExternalHttpProvider extends AbstractProvider {
WARNING: It is not safe to use the --http.corsdomain flag with a wildcard: --http.corsdomain *
-
For more info: Remix Docs on Web3 Provider +
For more info: Remix Docs on External HTTP Provider

External HTTP Provider Endpoint diff --git a/apps/remix-ide/src/blockchain/execution-context.js b/apps/remix-ide/src/blockchain/execution-context.js index a6286ed507..1fe181acfb 100644 --- a/apps/remix-ide/src/blockchain/execution-context.js +++ b/apps/remix-ide/src/blockchain/execution-context.js @@ -152,7 +152,7 @@ export class ExecutionContext { if (context === 'injected') { if (injectedProvider === undefined) { - infoCb('No injected Web3 provider found. Make sure your provider (e.g. MetaMask) is active and running (when recently activated you may have to reload the page).') + infoCb('No injected provider found. Make sure your provider (e.g. MetaMask) is active and running (when recently activated you may have to reload the page).') return cb() } else { if (injectedProvider && injectedProvider._metamask && injectedProvider._metamask.isUnlocked) { diff --git a/libs/remix-ui/run-tab/src/lib/components/account.tsx b/libs/remix-ui/run-tab/src/lib/components/account.tsx index 1cb7aebc4c..1429d8d33a 100644 --- a/libs/remix-ui/run-tab/src/lib/components/account.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/account.tsx @@ -22,7 +22,7 @@ export function AccountUI (props: AccountProps) { case 'injected': setPlusOpt({ classList: 'udapp_disableMouseEvents', - title: "Unfortunately it's not possible to create an account using injected web3. Please create the account directly from your provider (i.e metamask or other of the same type)." + title: "Unfortunately it's not possible to create an account using injected provider. Please create the account directly from your provider (i.e metamask or other of the same type)." }) break diff --git a/libs/remix-ui/run-tab/src/lib/components/environment.tsx b/libs/remix-ui/run-tab/src/lib/components/environment.tsx index 6a346fcf53..3e8b020613 100644 --- a/libs/remix-ui/run-tab/src/lib/components/environment.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/environment.tsx @@ -10,7 +10,7 @@ export function EnvironmentUI (props: EnvironmentProps) { const handleChangeExEnv = (env: string) => { const provider = props.providers.providerList.find(exEnv => exEnv.value === env) - const fork = provider.fork // can be undefined if connected to an external source (web3 provider / injected) + const fork = provider.fork // can be undefined if connected to an external source (External Http Provider / injected) let context = provider.value context = context.startsWith('vm') ? 'vm' : context diff --git a/libs/remix-ui/run-tab/src/lib/components/recorderCardUI.tsx b/libs/remix-ui/run-tab/src/lib/components/recorderCardUI.tsx index e7fb5c9795..51413c2c82 100644 --- a/libs/remix-ui/run-tab/src/lib/components/recorderCardUI.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/recorderCardUI.tsx @@ -27,7 +27,7 @@ export function RecorderUI (props: RecorderProps) {
{props.count}
- Save transactions (deployed contracts and function executions) and replay them in another environment.
e.g Transactions created in Javascript VM can be replayed in the Injected Web3. + Save transactions (deployed contracts and function executions) and replay them in another environment.
e.g Transactions created in Remix VM can be replayed in the Injected Provider.
}> From 086bfbe505075d4257cccf330706187f18776953 Mon Sep 17 00:00:00 2001 From: lianahus Date: Fri, 8 Jul 2022 10:34:25 +0200 Subject: [PATCH 2/6] fixing conflicts and localhost case --- apps/remix-ide/src/app/panels/file-panel.js | 3 +++ .../src/lib/components/LocalPluginForm.tsx | 6 +++--- libs/remix-ui/workspace/src/lib/actions/index.ts | 8 ++++++++ .../src/lib/providers/FileSystemProvider.tsx | 4 +++- .../workspace/src/lib/remix-ui-workspace.tsx | 14 ++++++++------ 5 files changed, 25 insertions(+), 10 deletions(-) diff --git a/apps/remix-ide/src/app/panels/file-panel.js b/apps/remix-ide/src/app/panels/file-panel.js index b25fe16c82..08e4d8edff 100644 --- a/apps/remix-ide/src/app/panels/file-panel.js +++ b/apps/remix-ide/src/app/panels/file-panel.js @@ -152,6 +152,9 @@ module.exports = class Filepanel extends ViewPlugin { const workspaceProvider = this.fileProviders.workspace this.currentWorkspaceMetadata = { name: workspace.name, isLocalhost: workspace.isLocalhost, absolutePath: `${workspaceProvider.workspacesPath}/${workspace.name}` } + if (workspace.name !== " - connect to localhost - ") { + localStorage.setItem('currentWorkspace', workspace.name) + } else {console.log("ciurrent is")} this.emit('setWorkspace', workspace) } diff --git a/libs/remix-ui/plugin-manager/src/lib/components/LocalPluginForm.tsx b/libs/remix-ui/plugin-manager/src/lib/components/LocalPluginForm.tsx index b9a2a84932..5bac19b432 100644 --- a/libs/remix-ui/plugin-manager/src/lib/components/LocalPluginForm.tsx +++ b/libs/remix-ui/plugin-manager/src/lib/components/LocalPluginForm.tsx @@ -191,7 +191,7 @@ function LocalPluginForm ({ closeModal, visible, pluginManager }: LocalPluginFor type="radio" name="location" value="sidePanel" - id="none" + id="localPluginRadioButtonsidePanelSidePanel" data-id='localPluginRadioButtonsidePanel' checked={location === 'sidePanel'} onChange={(e) => setLocation(e.target.value as 'sidePanel' | 'mainPanel' | 'none')} /> @@ -203,7 +203,7 @@ function LocalPluginForm ({ closeModal, visible, pluginManager }: LocalPluginFor type="radio" name="location" value="mainPanel" - id="none" + id="localPluginRadioButtonsidePanelMainPanel" data-id='localPluginRadioButtonmainPanel' checked={location === 'mainPanel'} onChange={(e) => setLocation(e.target.value as 'sidePanel' | 'mainPanel' | 'none')} /> @@ -215,7 +215,7 @@ function LocalPluginForm ({ closeModal, visible, pluginManager }: LocalPluginFor type="radio" name="location" value="none" - id="none" + id="localPluginRadioButtonsidePanelNone" data-id='localPluginRadioButtonnone' checked={location === 'none'} onChange={(e) => setLocation(e.target.value as 'sidePanel' | 'mainPanel' | 'none')} /> diff --git a/libs/remix-ui/workspace/src/lib/actions/index.ts b/libs/remix-ui/workspace/src/lib/actions/index.ts index 7a5387474b..51e7e68567 100644 --- a/libs/remix-ui/workspace/src/lib/actions/index.ts +++ b/libs/remix-ui/workspace/src/lib/actions/index.ts @@ -127,6 +127,14 @@ export const initWorkspace = (filePanelPlugin) => async (reducerDispatch: React. plugin.on('editor', 'editorMounted', async () => await plugin.fileManager.openFile(route)) } else await basicWorkspaceInit(workspaces, workspaceProvider) } else await basicWorkspaceInit(workspaces, workspaceProvider) + } else if (localStorage.getItem("currentWorkspace")) { + const index = workspaces.indexOf(localStorage.getItem("currentWorkspace")) + if (index !== -1) { + const name = localStorage.getItem("currentWorkspace") + workspaceProvider.setWorkspace(name) + plugin.setWorkspace({ name, isLocalhost: false }) + dispatch(setCurrentWorkspace(name)) + } } else { await basicWorkspaceInit(workspaces, workspaceProvider) } diff --git a/libs/remix-ui/workspace/src/lib/providers/FileSystemProvider.tsx b/libs/remix-ui/workspace/src/lib/providers/FileSystemProvider.tsx index 86f4cccaf2..f754869931 100644 --- a/libs/remix-ui/workspace/src/lib/providers/FileSystemProvider.tsx +++ b/libs/remix-ui/workspace/src/lib/providers/FileSystemProvider.tsx @@ -5,7 +5,9 @@ import { Toaster } from '@remix-ui/toaster' // eslint-disable-line // eslint-disable-next-line @typescript-eslint/no-unused-vars import { FileSystemContext } from '../contexts' import { browserReducer, browserInitialState } from '../reducers/workspace' -import { initWorkspace, fetchDirectory, removeInputField, deleteWorkspace, clearPopUp, publishToGist, createNewFile, setFocusElement, createNewFolder, deletePath, renamePath, copyFile, copyFolder, runScript, emitContextMenuEvent, handleClickFile, handleExpandPath, addInputField, createWorkspace, fetchWorkspaceDirectory, renameWorkspace, switchToWorkspace, uploadFile, handleDownloadFiles, restoreBackupZip, cloneRepository } from '../actions' +import { initWorkspace, fetchDirectory, removeInputField, deleteWorkspace, clearPopUp, publishToGist, createNewFile, setFocusElement, createNewFolder, + deletePath, renamePath, copyFile, copyFolder, runScript, emitContextMenuEvent, handleClickFile, handleExpandPath, addInputField, createWorkspace, + fetchWorkspaceDirectory, renameWorkspace, switchToWorkspace, uploadFile, handleDownloadFiles, restoreBackupZip, cloneRepository } from '../actions' import { Modal, WorkspaceProps, WorkspaceTemplate } from '../types' // eslint-disable-next-line @typescript-eslint/no-unused-vars import { Workspace } from '../remix-ui-workspace' diff --git a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx index 0870442cb2..cd85975ba1 100644 --- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx +++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx @@ -19,6 +19,7 @@ export function Workspace () { const cloneUrlRef = useRef() useEffect(() => { + setCurrentWorkspace(localStorage.getItem('currentWorkspace') ? localStorage.getItem('currentWorkspace') : '') resetFocus() }, []) @@ -102,6 +103,7 @@ export function Workspace () { const workspaceTemplateName = workspaceCreateTemplateInput.current.value || 'remixDefault' try { + console.log("create workspace") await global.dispatchCreateWorkspace(workspaceName, workspaceTemplateName) } catch (e) { global.modal('Create Workspace', e.message, 'OK', () => {}, '') @@ -272,13 +274,13 @@ export function Workspace () { }} data-id={`dropdown-item-${name}`} > - { isGitRepo ? -
- { currentWorkspace === name ? ✓ { name } : { name } } - -
: + { isGitRepo ? +
{ currentWorkspace === name ? ✓ { name } : { name } } - } + +
: + { currentWorkspace === name ? ✓ { name } : { name } } + } )) } From c92d4c6be56a6e39a0114f882f5b8895efb3a788 Mon Sep 17 00:00:00 2001 From: lianahus Date: Tue, 21 Jun 2022 21:49:27 +0200 Subject: [PATCH 3/6] rm consol.log --- libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx index cd85975ba1..de5bff2fb6 100644 --- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx +++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx @@ -103,7 +103,6 @@ export function Workspace () { const workspaceTemplateName = workspaceCreateTemplateInput.current.value || 'remixDefault' try { - console.log("create workspace") await global.dispatchCreateWorkspace(workspaceName, workspaceTemplateName) } catch (e) { global.modal('Create Workspace', e.message, 'OK', () => {}, '') From a89b5f453235d20a3c5e62b2c08522b5cba2ad18 Mon Sep 17 00:00:00 2001 From: lianahus Date: Fri, 8 Jul 2022 11:45:58 +0200 Subject: [PATCH 4/6] fixing the build --- libs/remix-ui/workspace/src/lib/actions/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/remix-ui/workspace/src/lib/actions/index.ts b/libs/remix-ui/workspace/src/lib/actions/index.ts index 51e7e68567..b684fdc05a 100644 --- a/libs/remix-ui/workspace/src/lib/actions/index.ts +++ b/libs/remix-ui/workspace/src/lib/actions/index.ts @@ -128,12 +128,12 @@ export const initWorkspace = (filePanelPlugin) => async (reducerDispatch: React. } else await basicWorkspaceInit(workspaces, workspaceProvider) } else await basicWorkspaceInit(workspaces, workspaceProvider) } else if (localStorage.getItem("currentWorkspace")) { - const index = workspaces.indexOf(localStorage.getItem("currentWorkspace")) + const index = workspaces.findIndex(element => element.name == localStorage.getItem("currentWorkspace")) if (index !== -1) { const name = localStorage.getItem("currentWorkspace") workspaceProvider.setWorkspace(name) - plugin.setWorkspace({ name, isLocalhost: false }) - dispatch(setCurrentWorkspace(name)) + plugin.setWorkspace({ name: name, isLocalhost: false }) + dispatch(setCurrentWorkspace({ name: name, isGitRepo: false })) } } else { await basicWorkspaceInit(workspaces, workspaceProvider) From ce2f2e4c1f24cd8b053c1bec3c17dc4724038938 Mon Sep 17 00:00:00 2001 From: lianahus Date: Fri, 8 Jul 2022 14:22:43 +0200 Subject: [PATCH 5/6] removing a consol.log --- apps/remix-ide/src/app/panels/file-panel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/panels/file-panel.js b/apps/remix-ide/src/app/panels/file-panel.js index 08e4d8edff..a0d4e5dff3 100644 --- a/apps/remix-ide/src/app/panels/file-panel.js +++ b/apps/remix-ide/src/app/panels/file-panel.js @@ -154,7 +154,7 @@ module.exports = class Filepanel extends ViewPlugin { this.currentWorkspaceMetadata = { name: workspace.name, isLocalhost: workspace.isLocalhost, absolutePath: `${workspaceProvider.workspacesPath}/${workspace.name}` } if (workspace.name !== " - connect to localhost - ") { localStorage.setItem('currentWorkspace', workspace.name) - } else {console.log("ciurrent is")} + } this.emit('setWorkspace', workspace) } From 33e60b439fe8d6223d29a4063bad9ddad18d3630 Mon Sep 17 00:00:00 2001 From: Bruce Xu <95468177+brucexu-eth@users.noreply.github.com> Date: Sat, 9 Jul 2022 13:09:49 +1200 Subject: [PATCH 6/6] Update Nx CLI links --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 06fd3fbe16..84cc44a09b 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ Note: It contains the latest supported version of Solidity available at the time "npm": "^6.14.15" } ``` -* Install [Nx CLI](https://nx.dev/react/cli/overview) globally to enable running **nx executable commands**. +* Install [Nx CLI](https://nx.dev/using-nx/nx-cli) globally to enable running **nx executable commands**. ```bash yarn global add @nrwl/cli ``` @@ -127,7 +127,7 @@ curl https://raw.githubusercontent.com/ethereum/remix-project/master/docker-comp ### Troubleshooting -If you have trouble building the project, make sure that you have the correct version of `node`, `npm` and `nvm`. Also ensure [Nx CLI](https://nx.dev/react/cli/overview) is installed globally. +If you have trouble building the project, make sure that you have the correct version of `node`, `npm` and `nvm`. Also ensure [Nx CLI](https://nx.dev/using-nx/nx-cli) is installed globally. Run: