Merge branch 'master' into homeFixes

pull/5370/head
David Disu 3 years ago committed by GitHub
commit d203b785fc
  1. 2
      libs/remix-url-resolver/src/resolve.ts
  2. 2
      libs/remix-url-resolver/tests/test.ts

@ -117,7 +117,7 @@ export class RemixURLResolver {
// If you don't find greeter.sol on ipfs gateway use local // If you don't find greeter.sol on ipfs gateway use local
// const req = 'http://localhost:8080/' + url // const req = 'http://localhost:8080/' + url
const response: AxiosResponse = await axios.get(req) const response: AxiosResponse = await axios.get(req)
return { content: response.data, cleanUrl: url } return { content: response.data, cleanUrl: url.replace('ipfs/', '') }
} catch (e) { } catch (e) {
throw e throw e
} }

@ -260,7 +260,7 @@ describe('testRunner', () => {
const content = fs.readFileSync(__dirname + '/example_1/greeter.sol', { encoding: 'utf8'}) const content = fs.readFileSync(__dirname + '/example_1/greeter.sol', { encoding: 'utf8'})
const expt: object = { const expt: object = {
content: content, content: content,
cleanUrl: 'ipfs/QmcuCKyokk9Z6f65ADAADNiS2R2xCjfRkv7mYBSWDwtA7M', cleanUrl: 'QmcuCKyokk9Z6f65ADAADNiS2R2xCjfRkv7mYBSWDwtA7M',
type: 'ipfs' type: 'ipfs'
} }
assert.deepEqual(results, expt) assert.deepEqual(results, expt)

Loading…
Cancel
Save