mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
* redesign "add chain" button * fix wallet detection * [skip ci] update default value for ENV * fix tests * return button to the footer and add source to mixpanel event * regcred from helmfile for review * [skip ci] remove wallets env from values for demo stand * use react-query to cache detection result * add cookie to hide button in the topbar * add prefix to svg ids to fix rabby icon * update screenshot * remove unnecessary comment --------- Co-authored-by: Nick Zenchik <[email protected]>
20 lines
484 B
TypeScript
20 lines
484 B
TypeScript
import type { TestFixture, Page } from '@playwright/test';
|
|
|
|
import type { WalletProvider } from 'types/web3';
|
|
|
|
export type InjectMetaMaskProvider = () => Promise<void>;
|
|
|
|
const fixture: TestFixture<InjectMetaMaskProvider, { page: Page }> = async({ page }, use) => {
|
|
await use(async() => {
|
|
await page.evaluate(() => {
|
|
window.ethereum = {
|
|
isMetaMask: true,
|
|
_events: {},
|
|
_state: {},
|
|
} as WalletProvider;
|
|
});
|
|
});
|
|
};
|
|
|
|
export default fixture;
|