Skip to content

Commit

Permalink
abort calls to blockanalitica
Browse files Browse the repository at this point in the history
  • Loading branch information
oskarvu committed Dec 20, 2024
1 parent 593c14a commit ec74756
Showing 1 changed file with 20 additions and 19 deletions.
39 changes: 20 additions & 19 deletions packages/app/src/test/e2e/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,26 @@ export type AssetBalances = Partial<Record<AssetsInTests, number>>
export type ConnectionType = 'not-connected' | 'connected-random' | 'connected-pkey' | 'connected-address'
export type AccountOptions<T extends ConnectionType> = T extends 'not-connected'
? {
type: T
}
type: T
}
: T extends 'connected-random'
? {
type: T
assetBalances?: Partial<Record<AssetsInTests, number>>
}
: T extends 'connected-pkey'
? {
type: T
privateKey: Hash
assetBalances?: Partial<Record<AssetsInTests, number>>
}
: T extends 'connected-address'
? {
type: T
address: Address
assetBalances?: Partial<Record<AssetsInTests, number>>
}
: never
? {
type: T
assetBalances?: Partial<Record<AssetsInTests, number>>
}
: T extends 'connected-pkey'
? {
type: T
privateKey: Hash
assetBalances?: Partial<Record<AssetsInTests, number>>
}
: T extends 'connected-address'
? {
type: T
address: Address
assetBalances?: Partial<Record<AssetsInTests, number>>
}
: never

export interface BlockchainOptions {
chainId: number
Expand Down Expand Up @@ -183,6 +183,7 @@ async function injectPageSetup({
// if explicitly disabled, do not inject network config abort all network requests to RPC providers
await page.route(/alchemy/, (route) => route.abort())
await page.route(/rpc.ankr/, (route) => route.abort())
await page.route(/blockanalitica.com/, (route) => route.abort())
} else {
await injectNetworkConfiguration(page, getUrlFromClient(testnetClient), options.blockchain.chainId)
}
Expand Down

0 comments on commit ec74756

Please sign in to comment.