mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +01:00
test: sanitize url hostname check (#19053)
This commit is contained in:
parent
ebc887021e
commit
0e2d641813
@ -149,7 +149,7 @@ function mockRpcCall({
|
||||
}
|
||||
}
|
||||
/* @ts-expect-error The types for Nock do not include `basePath` in the interface for Nock.Scope. */
|
||||
const url = nockScope.basePath.includes('infura.io')
|
||||
const url = new URL(nockScope.basePath).hostname.match(/(\.|^)infura.io$/u)
|
||||
? `/v3/${MOCK_INFURA_PROJECT_ID}`
|
||||
: '/';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user