From 6d76d25e6764b67fadb8befc79e108330c7bc939 Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 18 Jan 2022 12:06:25 +0100 Subject: [PATCH] fix debugging live transactions --- apps/debugger/src/app/debugger-api.ts | 2 +- libs/remix-core-plugin/src/lib/compiler-content-imports.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/debugger/src/app/debugger-api.ts b/apps/debugger/src/app/debugger-api.ts index 6727988c9a..6163ee766c 100644 --- a/apps/debugger/src/app/debugger-api.ts +++ b/apps/debugger/src/app/debugger-api.ts @@ -83,7 +83,7 @@ export const DebuggerApiMixin = (Base) => class extends Base { const target = (address && remixDebug.traceHelper.isContractCreation(address)) ? receipt.contractAddress : address const targetAddress = target || receipt.contractAddress || receipt.to const codeAtAddress = await this._web3.eth.getCode(targetAddress) - const output = await this.call('fetchAndCompile', 'resolve', targetAddress, codeAtAddress, 'browser/.debug') + const output = await this.call('fetchAndCompile', 'resolve', targetAddress, codeAtAddress, '.debug') if (output) { return new CompilerAbstract(output.languageversion, output.data, output.source) } diff --git a/libs/remix-core-plugin/src/lib/compiler-content-imports.ts b/libs/remix-core-plugin/src/lib/compiler-content-imports.ts index 7eab9205ce..624c756357 100644 --- a/libs/remix-core-plugin/src/lib/compiler-content-imports.ts +++ b/libs/remix-core-plugin/src/lib/compiler-content-imports.ts @@ -35,7 +35,8 @@ export class CompilerImports extends Plugin { isExternalUrl (url) { const handlers = this.urlResolver.getHandlers() - return handlers.some(handler => handler.match(url)) + // we filter out "npm" because this will be recognized as internal url although it's not the case. + return handlers.filter((handler) => handler.type !== 'npm').some(handler => handler.match(url)) } /**