Skip to content

Commit dbe8057

Browse files
committed
Merge branch 'main' of https://github.com/ensdomains/ens-app-v3 into unused-deps
2 parents 20b99c3 + 4b3a09f commit dbe8057

40 files changed

Lines changed: 576 additions & 877 deletions

.github/workflows/pages-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Cloudflare Pages
33
env:
44
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
55
NEXT_PUBLIC_INTERCOM_ID: re9q5yti
6-
NEXT_PUBLIC_PARA_API_KEY_PROD: ${{ secrets.PARA_API_KEY_PROD }}
6+
NEXT_PUBLIC_PARA_API_KEY_PROD: ${{ github.ref == 'refs/heads/main' && secrets.NEXT_PUBLIC_PARA_API_KEY_PROD || '' }}
77
NEXT_PUBLIC_DRPC_KEY: AnmpasF2C0JBqeAEzxVO8aTteiMlrW4R75hpDonbV6cR
88

99
on: [push]

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @sugh01
1+
* @sugh01 @laurgk

e2e/specs/stateful/dnsclaim.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ test.describe('Import DNSSEC name', () => {
3131
await expect(page.getByTestId('import-next-button')).toBeDisabled()
3232
})
3333

34-
// TODO: this is failing because stateful tests are still on goerli, we should switch to sepolia/holesky
35-
test.skip('should not allow the user to proceed if they have not set the correct TXT record - offchain', async ({
34+
test('should not allow the user to proceed if they have not set the correct TXT record - offchain', async ({
3635
page,
3736
login,
3837
}) => {
@@ -43,10 +42,10 @@ test.describe('Import DNSSEC name', () => {
4342
await page.getByTestId('import-next-button').click()
4443
await expect(page.getByTestId('import-heading')).toContainText('Verify Ownership')
4544
await expect(page.getByTestId('status-checker-message')).toContainText('No record found')
46-
await expect(page.getByTestId('import-next-button')).toBeDisabled()
45+
await expect(page.getByTestId('offchain-claim')).toBeDisabled()
4746
})
4847

49-
test('should not allow the use to proceed if they have not set the correct subdomain with the correct info', async ({
48+
test('should not allow the user to proceed if they have not set the correct subdomain with the correct info', async ({
5049
page,
5150
login,
5251
}) => {
@@ -60,7 +59,8 @@ test.describe('Import DNSSEC name', () => {
6059
await expect(page.getByTestId('import-next-button')).toBeDisabled()
6160
})
6261

63-
test('should resolve .pw domains', async ({ page, login }) => {
62+
test.skip('should resolve .pw domains', async ({ page, login }) => {
63+
// pw domain does not resolve on localhost
6464
await page.goto('/test.pw?chain=holesky')
6565
await login.connect()
6666

e2e/specs/stateless/settings.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ test.describe('Select Primary Name', () => {
125125
login,
126126
makeName,
127127
makePageObject,
128+
accounts,
128129
}) => {
129130
test.slow()
130131

@@ -141,6 +142,7 @@ test.describe('Select Primary Name', () => {
141142
const settingsPage = makePageObject('SettingsPage')
142143
const selectPrimaryNameModal = makePageObject('SelectPrimaryNameModal')
143144
await settingsPage.goto()
145+
await expect(settingsPage.walletAddress).toHaveText(new RegExp(accounts.getAddress('user')))
144146
await settingsPage.choosePrimaryNameButton.click()
145147
await selectPrimaryNameModal.waitForPageLoad()
146148
const nameWithoutSuffix = name.slice(0, -4)

e2e/specs/stateless/wrapName.spec.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,13 +265,16 @@ test('should calculate needed steps without localstorage', async ({
265265

266266
await page.waitForTimeout(10000)
267267

268-
await page.evaluate(() => localStorage.clear())
268+
await page.evaluate(() => window.localStorage.clear())
269+
await page.evaluate(() => window.sessionStorage.clear())
269270
await page.reload()
270271
await login.reconnect()
271272

272273
await morePage.wrapButton.click()
273274

274-
await expect(page.getByTestId('display-item-Step 1-normal')).toContainText('Migrate profile')
275+
await expect(page.getByTestId('display-item-Step 1-normal')).toContainText('Migrate profile', {
276+
timeout: 10000,
277+
})
275278
await expect(page.getByTestId('display-item-Step 2-normal')).toContainText('Wrap name')
276279

277280
await transactionModal.introButton.click()
@@ -287,7 +290,10 @@ test('should calculate needed steps without localstorage', async ({
287290
await transactionModal.introButton.click()
288291
await transactionModal.confirm()
289292
await transactionModal.complete()
290-
await expect(page.getByTestId('namewrapper-status')).not.toContainText('Unwrapped')
293+
294+
await expect(page.getByTestId('namewrapper-status')).not.toContainText('Unwrapped', {
295+
timeout: 10000,
296+
})
291297

292298
await profilePage.goto(subname)
293299
await expect(profilePage.record('text', 'description')).toHaveText('test')

functions/_middleware.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const staticHandler: PagesFunction = async ({ request, next, env }) => {
5252
return next()
5353
}
5454

55-
const firefoxRewrite: PagesFunction = async ({ request, next }) => {
55+
const cspRewrite: PagesFunction = async ({ request, next }) => {
5656
const userAgent = request.headers.get('user-agent')?.toLowerCase()
5757
const response = await next()
5858

@@ -64,6 +64,12 @@ const firefoxRewrite: PagesFunction = async ({ request, next }) => {
6464
.transform(response)
6565
}
6666

67+
// safari CSP exception
68+
if (userAgent?.includes('safari/') && userAgent.includes('version/')) {
69+
response.headers.set('Content-Security-Policy', cspOnlyFrameAncestors)
70+
return response
71+
}
72+
6773
// default headers
6874
response.headers.set('Content-Security-Policy', cspWithFrameAncestors)
6975
return response
@@ -166,4 +172,4 @@ const pathRewriter: PagesFunction = async ({ request, next }) => {
166172
return next()
167173
}
168174

169-
export const onRequest = [staticHandler, firefoxRewrite, pathRewriter]
175+
export const onRequest = [staticHandler, cspRewrite, pathRewriter]

next.config.mjs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { execSync } from 'child_process'
77
import path, { dirname } from 'path'
88
import { fileURLToPath } from 'url'
99

10-
import { withSentryConfig } from '@sentry/nextjs'
1110
import StylelintPlugin from 'stylelint-webpack-plugin'
1211

1312
const __dirname = dirname(fileURLToPath(import.meta.url))
@@ -255,12 +254,4 @@ if (process.env.ANALYZE) {
255254
plugins.push(withBundleAnalyzer({ enabled: true }))
256255
}
257256

258-
if (process.env.CI && process.env.NODE_ENV === 'production' && !process.env.NEXT_PUBLIC_IPFS) {
259-
plugins.push((config) =>
260-
withSentryConfig(config, {
261-
silent: false,
262-
}),
263-
)
264-
}
265-
266257
export default plugins.reduce((acc, next) => next(acc), nextConfig)

next.config.wizardcopy.js

Lines changed: 0 additions & 26 deletions
This file was deleted.

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
"dev:holesky": "NEXT_PUBLIC_CHAIN_NAME=holesky pnpm dev",
77
"dev:sepolia": "NEXT_PUBLIC_CHAIN_NAME=sepolia pnpm dev",
88
"dev:https": "next dev --experimental-https --port 443",
9+
"dev:https:holesky": "NEXT_PUBLIC_CHAIN_NAME=holesky pnpm dev:https",
10+
"dev:https:sepolia": "NEXT_PUBLIC_CHAIN_NAME=sepolia pnpm dev:https",
911
"dev:nlocal": "NEXT_PUBLIC_PROVIDER=http://localhost:8545 NEXT_PUBLIC_AVUP_ENDPOINT=http://localhost:8787 pnpm dev",
1012
"dev:localname": "NEXT_PUBLIC_PROVIDER=\"http://$(\"hostname\"):8545\" && NEXT_PUBLIC_AVUP_ENDPOINT=\"http://$(\"hostname\"):8787\" && NEXT_PUBLIC_GRAPH_URI=\"http://$(\"hostname\"):8000/subgraphs/name/graphprotocol/ens\" && pnpm dev",
1113
"dev:glocal": "SWC_CACHE=false rm -rf .next && NEXT_PUBLIC_GRAPH_URI=http://localhost:8000/subgraphs/name/graphprotocol/ens NEXT_PUBLIC_ETH_NODE=anvil pnpm dev:nlocal",
@@ -54,19 +56,18 @@
5456
"@ensdomains/ens-test-env": "0.6.0",
5557
"@ensdomains/ensjs": "4.0.3-alpha.12",
5658
"@ensdomains/thorin": "1.0.0-beta.26",
57-
"@getpara/rainbowkit": "1.2.0-dev.6",
58-
"@getpara/rainbowkit-wallet": "1.2.0-dev.5",
5959
"@metamask/post-message-stream": "^6.1.2",
6060
"@metamask/providers": "^14.0.2",
6161
"@noble/hashes": "^1.3.2",
62-
"@sentry/nextjs": "7.43.x",
6362
"@splidejs/react-splide": "^0.7.12",
6463
"@svgr/webpack": "^8.1.0",
6564
"@tanstack/query-persist-client-core": "5.22.2",
6665
"@tanstack/query-sync-storage-persister": "5.22.2",
6766
"@tanstack/react-query": "5.22.2",
6867
"@tanstack/react-query-devtools": "^5.59.0",
6968
"@tanstack/react-query-persist-client": "5.22.2",
69+
"@getpara/rainbowkit": "1.3.0",
70+
"@getpara/rainbowkit-wallet": "1.3.0",
7071
"@wagmi/core": "2.13.3",
7172
"calendar-link": "^2.8.0",
7273
"dequal": "2.0.3",
@@ -81,6 +82,7 @@
8182
"markdown-to-jsx": "^7.7.3",
8283
"next": "13.5.8",
8384
"node-fetch": "^3.3.2",
85+
"node-forge": "1.3.1",
8486
"posthog-js": "^1.217.0",
8587
"react": "*",
8688
"react-confetti": "6.1.0",
@@ -175,7 +177,6 @@
175177
},
176178
"pnpm": {
177179
"overrides": {
178-
"@getpara/react-sdk": "1.6.1-dev.0",
179180
"@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers@0.3.0-beta.13",
180181
"@wagmi/core": "2.13.3",
181182
"@walletconnect/ethereum-provider": "2.11.1",

playwright/fixtures/login.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export class Login {
2828
/**
2929
* TEMP FIX
3030
* A bug in rainbow kit needs time to load the provider. Could be fixed in version 1.0.4
31-
* Also throws eror with walletconnect if not enough time has passed.
31+
* Also throws error with walletconnect if not enough time has passed.
3232
*/
3333
}
3434

0 commit comments

Comments
 (0)