Merge pull request #1387 from ethereum/handle-url-param

Fix Loading with code or url param
pull/5370/head
bunsenstraat 3 years ago committed by GitHub
commit aa687ee191
  1. 3
      apps/remix-ide/src/app.js
  2. 5
      libs/remix-core-plugin/src/lib/compiler-content-imports.ts

@ -460,7 +460,8 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
await appManager.activatePlugin(['mainPanel', 'menuicons', 'tabs']) await appManager.activatePlugin(['mainPanel', 'menuicons', 'tabs'])
await appManager.activatePlugin(['sidePanel']) // activating host plugin separately await appManager.activatePlugin(['sidePanel']) // activating host plugin separately
await appManager.activatePlugin(['home']) await appManager.activatePlugin(['home'])
await appManager.activatePlugin(['hiddenPanel', 'pluginManager', 'filePanel', 'settings', 'contextualListener', 'terminal', 'fetchAndCompile', 'contentImport']) await appManager.activatePlugin(['settings'])
await appManager.activatePlugin(['hiddenPanel', 'pluginManager', 'filePanel', 'contextualListener', 'terminal', 'fetchAndCompile', 'contentImport'])
const queryParams = new QueryParams() const queryParams = new QueryParams()
const params = queryParams.get() const params = queryParams.get()

@ -26,10 +26,6 @@ export class CompilerImports extends Plugin {
this.urlResolver.setGistToken(token, protocol) this.urlResolver.setGistToken(token, protocol)
} }
onActivation () {
this.setToken()
}
isRelativeImport (url) { isRelativeImport (url) {
return /^([^/]+)/.exec(url) return /^([^/]+)/.exec(url)
} }
@ -73,6 +69,7 @@ export class CompilerImports extends Plugin {
let resolved let resolved
try { try {
await this.setToken()
resolved = await this.urlResolver.resolve(url) resolved = await this.urlResolver.resolve(url)
const { content, cleanUrl, type } = resolved const { content, cleanUrl, type } = resolved
self.previouslyHandled[url] = { self.previouslyHandled[url] = {

Loading…
Cancel
Save