Merge branch 'master' into homeFixes

pull/1959/head
David Disu 3 years ago committed by GitHub
commit 9993e141a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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
// const req = 'http://localhost:8080/' + url
const response: AxiosResponse = await axios.get(req)
return { content: response.data, cleanUrl: url }
return { content: response.data, cleanUrl: url.replace('ipfs/', '') }
} catch (e) {
throw e
}

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

Loading…
Cancel
Save