diff --git a/apps/remix-ide/src/app.js b/apps/remix-ide/src/app.js index 1386443818..cca71d7632 100644 --- a/apps/remix-ide/src/app.js +++ b/apps/remix-ide/src/app.js @@ -119,8 +119,6 @@ class AppComponent { this.engine = new RemixEngine() this.engine.register(appManager); - - const matomoDomains = { 'remix-alpha.ethereum.org': 27, 'remix-beta.ethereum.org': 25, @@ -450,7 +448,11 @@ class AppComponent { if ( this.appManager.pluginLoader.current === 'queryParams' && this.workspace.length > 0 - ) { this.menuicons.select(this.workspace[this.workspace.length - 1]) } + ) { + this.menuicons.select(this.workspace[this.workspace.length - 1]) + } else { + this.appManager.call('tabs', 'focus', 'home') + } } if (params.call) { @@ -484,19 +486,16 @@ class AppComponent { } } } - - }) .catch(console.error) } const loadedElement = document.createElement('span') loadedElement.setAttribute('data-id', 'apploaded') document.body.appendChild(loadedElement) - }) + // activate solidity plugin this.appManager.activatePlugin(['solidity', 'udapp', 'deploy-libraries', 'link-libraries', 'openzeppelin-proxy']) - // Load and start the service who manager layout and frame } } diff --git a/apps/remix-ide/src/app/providers/abstract-provider.tsx b/apps/remix-ide/src/app/providers/abstract-provider.tsx index a83b435e2b..5d9df384c3 100644 --- a/apps/remix-ide/src/app/providers/abstract-provider.tsx +++ b/apps/remix-ide/src/app/providers/abstract-provider.tsx @@ -13,7 +13,8 @@ export type JsonDataRequest = { export type JsonDataResult = { id: number, jsonrpc: string // version - result: any + result?: any, + error?: any, } export type RejectRequest = (error: Error) => void diff --git a/apps/remix-ide/src/app/providers/injected-provider.tsx b/apps/remix-ide/src/app/providers/injected-provider.tsx index 13d7793d7a..adbb614fe5 100644 --- a/apps/remix-ide/src/app/providers/injected-provider.tsx +++ b/apps/remix-ide/src/app/providers/injected-provider.tsx @@ -57,14 +57,21 @@ export class InjectedProvider extends Plugin implements IProvider { // This will be displayed on UI tooltip as 'cannot get account list: Environment Updated !!' if (!this.provider) { this.call('notification', 'toast', 'No injected provider (e.g Metamask) has been found.') - return reject(new Error('no injected provider found.')) + return resolve({ jsonrpc: '2.0', error: 'no injected provider found', id: data.id }) } try { if ((window as any) && typeof (window as any).ethereum.request === "function") (window as any).ethereum.request({ method: "eth_requestAccounts" }); - const resultData = await this.provider.currentProvider.send(data.method, data.params) - resolve({ jsonrpc: '2.0', result: resultData.result, id: data.id }) + let resultData = await this.provider.currentProvider.send(data.method, data.params) + if (resultData) { + if (resultData.jsonrpc && resultData.jsonrpc === '2.0') { + resultData = resultData.result + } + resolve({ jsonrpc: '2.0', result: resultData, id: data.id }) + } else { + resolve({ jsonrpc: '2.0', error: 'no return data provided', id: data.id }) + } } catch (error) { - reject(error) + resolve({ jsonrpc: '2.0', error: error.message, id: data.id }) } } } diff --git a/apps/remix-ide/src/app/providers/mainnet-vm-fork-provider.tsx b/apps/remix-ide/src/app/providers/mainnet-vm-fork-provider.tsx index 582ded0745..ff0f305568 100644 --- a/apps/remix-ide/src/app/providers/mainnet-vm-fork-provider.tsx +++ b/apps/remix-ide/src/app/providers/mainnet-vm-fork-provider.tsx @@ -15,7 +15,7 @@ export class MainnetForkVMProvider extends BasicVMProvider { }, blockchain) this.blockchain = blockchain this.fork = 'london' - this.nodeUrl = 'https://rpc.archivenode.io/e50zmkroshle2e2e50zm0044i7ao04ym' + this.nodeUrl = 'https://mainnet.infura.io/v3/08b2a484451e4635a28b3d8234f24332' this.blockNumber = 'latest' } diff --git a/apps/remix-ide/src/assets/img/remix-logo-blue.png b/apps/remix-ide/src/assets/img/remix-logo-blue.png new file mode 100644 index 0000000000..cc79f5ece6 Binary files /dev/null and b/apps/remix-ide/src/assets/img/remix-logo-blue.png differ diff --git a/apps/remix-ide/src/index.html b/apps/remix-ide/src/index.html index d8fb23c3d8..a7a99db6c2 100644 --- a/apps/remix-ide/src/index.html +++ b/apps/remix-ide/src/index.html @@ -26,7 +26,7 @@ Remix - Ethereum IDE - + diff --git a/apps/remix-ide/src/webpack.index.html b/apps/remix-ide/src/webpack.index.html deleted file mode 100644 index 8e1f7b6db1..0000000000 --- a/apps/remix-ide/src/webpack.index.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - Remix - Ethereum IDE - - - - - - - - - - - -
- - - - - \ No newline at end of file diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx index 7861d95bf6..760e5aa6b0 100644 --- a/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx +++ b/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx @@ -1,7 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ // eslint-disable-next-line @nrwl/nx/enforce-module-boundaries -import BasicLogo from 'libs/remix-ui/vertical-icons-panel/src/lib/components/BasicLogo' -import { ThemeContext } from '../themeContext' import React, { useEffect, useState, useRef, useContext } from 'react' import { FormattedMessage, useIntl } from 'react-intl' import { CustomTooltip } from '@remix-ui/helper' @@ -21,7 +19,6 @@ function HomeTabTitle() { searchDisable: true }) - const themeFilter = useContext(ThemeContext) const searchInputRef = useRef(null) const remiAudioEl = useRef(null) const intl = useIntl() @@ -52,13 +49,12 @@ function HomeTabTitle() { return (
-
- Remix + Remix
playRemi()} > - +
- + + className="border-0 px-1 h-100 btn fab fa-youtube"> - + className="border-0 px-1 h-100 btn fab fa-twitter"> - + className="border-0 px-1 h-100 btn fa fa-linkedin"> - + className="border-0 h-100 px-1 btn fab fa-medium"> @@ -145,7 +138,7 @@ function HomeTabTitle() { openLink("https://discord.gg/mh9hFCKkEq") _paq.push(['trackEvent', 'hometab', 'socialmedia', 'discord']) }} - className="border-0 h-100 p-1 pr-2 btn fab fa-discord"> + className="border-0 h-100 pl-1 pr-0 btn fab fa-discord"> diff --git a/libs/remix-ui/solidity-compiler/src/lib/css/style.css b/libs/remix-ui/solidity-compiler/src/lib/css/style.css index 892dc26e0b..dbf0fc47d0 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/css/style.css +++ b/libs/remix-ui/solidity-compiler/src/lib/css/style.css @@ -137,7 +137,7 @@ .remixui_log { display: flex; flex-direction: column; - margin-bottom: 5%; + margin-bottom: 0.5rem; overflow: visible; } .remixui_key {