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: 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/panels/file-panel.js b/apps/remix-ide/src/app/panels/file-panel.js index b25fe16c82..a0d4e5dff3 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) + } this.emit('setWorkspace', workspace) } 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/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/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.
}> diff --git a/libs/remix-ui/workspace/src/lib/actions/index.ts b/libs/remix-ui/workspace/src/lib/actions/index.ts index 7a5387474b..b684fdc05a 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.findIndex(element => element.name == localStorage.getItem("currentWorkspace")) + if (index !== -1) { + const name = localStorage.getItem("currentWorkspace") + workspaceProvider.setWorkspace(name) + plugin.setWorkspace({ name: name, isLocalhost: false }) + dispatch(setCurrentWorkspace({ name: name, isGitRepo: false })) + } } 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 d69c9922df..f2dcccdb00 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() }, []) @@ -272,13 +273,13 @@ export function Workspace () { }} data-id={`dropdown-item-${name}`} > - { isGitRepo ? -
- { currentWorkspace === name ? ✓ { name } : { name } } - -
: + { isGitRepo ? +
{ currentWorkspace === name ? ✓ { name } : { name } } - } + +
: + { currentWorkspace === name ? ✓ { name } : { name } } + } )) }