Skip to content

Commit

Permalink
fix: format
Browse files Browse the repository at this point in the history
  • Loading branch information
matstyler committed May 10, 2024
1 parent 8f4c845 commit e324c9f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions wallets/metamask/src/fixture-actions/persistLocalStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@ export async function persistLocalStorage(
context: BrowserContext
) {
const newPage = await context.newPage()

for (const { origin, localStorage } of origins) {
const frame = newPage.mainFrame()
await frame.goto(origin)

await frame.evaluate((localStorageData) => {
localStorageData.forEach(({ name, value }) => {
window.localStorage.setItem(name, value)
})
}, localStorage)
}

await newPage.close()
}
3 changes: 2 additions & 1 deletion wallets/metamask/src/fixtures/metaMaskFixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ export const metaMaskFixtures = (walletSetup: ReturnType<typeof defineWalletSetu
slowMo: process.env.HEADLESS ? 0 : slowMo
})

const { cookies, origins } = await currentContext.storageState()
const { cookies, origins } = await currentContext.storageState()\

Check notice

Code scanning / CodeQL

Syntax error Note

Error: Invalid character.

if (cookies) {
await context.addCookies(cookies)
}
Expand Down

0 comments on commit e324c9f

Please sign in to comment.