Skip to content

Commit 160805e

Browse files
ci(release): publish latest release
1 parent 64ff3de commit 160805e

470 files changed

Lines changed: 14970 additions & 5761 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.defaults

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ INFURA_KEY=stored-in-.env.local
1212
ONESIGNAL_APP_ID=stored-in-.env.local
1313
QUICKNODE_ENDPOINT_NAME=stored-in-.env.local
1414
QUICKNODE_ENDPOINT_TOKEN=stored-in-.env.local
15-
SIMPLEHASH_API_KEY=stored-in-.env.local
16-
SIMPLEHASH_API_URL=stored-in-.env.local
1715
STATSIG_API_KEY=stored-in-.env.local
1816
STATSIG_PROXY_URL=stored-in-.env
1917
UNISWAP_API_KEY=stored-in-.env.local

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ claude.local.md
8585
CLAUDE.local.md
8686
.claude/settings.local.json
8787
.claude/local/
88+
.claude/worktrees/
8889
**/*/.claude/user/*
8990
**/*/.claude/local/
9091

.husky/pre-commit

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,23 @@ call_lefthook()
6161
then
6262
devbox run lefthook "$@"
6363
else
64-
echo "Can't find lefthook in PATH"
64+
# Fallback: lefthook not available (fresh worktree without `bun install`).
65+
# Rather than silently skip every pre-commit check, run the security-
66+
# critical ones directly — git-secrets and trufflehog are system binaries
67+
# that don't need node_modules/. Skips fast-checks since `bun g:check:fast`
68+
# genuinely requires deps. Mirrors backend's hand-written husky pre-commit,
69+
# so worktree DX is symmetric across repos.
70+
# NOTE: this branch is regenerated if `lefthook install` runs directly
71+
# (bun install's postinstall re-patches it). Re-apply this edit if so.
72+
echo "WARN: lefthook not available — running fallback security checks (fast-checks skipped; run 'bun install' to enable full pre-commit)." >&2
73+
if command -v git-secrets >/dev/null 2>&1; then
74+
git-secrets --register-aws >/dev/null
75+
echo "Running git-secrets..."
76+
git-secrets --pre_commit_hook -- "$@" || exit $?
77+
fi
78+
if command -v trufflehog >/dev/null 2>&1; then
79+
git diff --cached --no-color | trufflehog stdin --only-verified --fail || exit $?
80+
fi
6581
fi
6682
fi
6783
}

RELEASE

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
IPFS hash of the deployment:
2-
- CIDv0: `Qmb4zXkPZsA1Mo65s4tq4LZkBJWVyAyKGzG3wHkm2i8WLc`
3-
- CIDv1: `bafybeif5eugjw27xojeumxxdaeieu6ffz7k47hsdnbvr75tp4nulsr2yju`
2+
- CIDv0: `QmcukkHM6KzGpybfLemQMdm4yJidKjUv9LxMRZSG65vMMD`
3+
- CIDv1: `bafybeigyp2od2wm72pdk2bjqjtgrivhlt7xcxamjartbzj5rscnhvcdcjq`
44

55
The latest release is always mirrored at [app.uniswap.org](https://app.uniswap.org).
66

@@ -10,5 +10,5 @@ You can also access the Uniswap Interface from an IPFS gateway.
1010
Your Uniswap settings are never remembered across different URLs.
1111

1212
IPFS gateways:
13-
- https://bafybeif5eugjw27xojeumxxdaeieu6ffz7k47hsdnbvr75tp4nulsr2yju.ipfs.dweb.link/
14-
- [ipfs://Qmb4zXkPZsA1Mo65s4tq4LZkBJWVyAyKGzG3wHkm2i8WLc/](ipfs://Qmb4zXkPZsA1Mo65s4tq4LZkBJWVyAyKGzG3wHkm2i8WLc/)
13+
- https://bafybeigyp2od2wm72pdk2bjqjtgrivhlt7xcxamjartbzj5rscnhvcdcjq.ipfs.dweb.link/
14+
- [ipfs://QmcukkHM6KzGpybfLemQMdm4yJidKjUv9LxMRZSG65vMMD/](ipfs://QmcukkHM6KzGpybfLemQMdm4yJidKjUv9LxMRZSG65vMMD/)

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
web/5.142.0
1+
web/5.143.0

apps/extension/e2e/fixtures/extension-context.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ interface CreateExtensionContextOptions {
1414
export async function createExtensionContext(options: CreateExtensionContextOptions = {}): Promise<BrowserContext> {
1515
const { userDataDirPrefix = 'playwright-extension' } = options
1616

17-
const extensionPath = path.join(__dirname, '../../build')
17+
// Default to the WXT output directory (the primary build system). The legacy webpack
18+
// output at `../../build` can still be loaded by overriding EXTENSION_BUILD_DIR.
19+
// Using `||` (not `??`) so an empty-string env var falls through to the default,
20+
// which matters in CI matrices where the var is set to '' for the WXT leg.
21+
const extensionPath = process.env['EXTENSION_BUILD_DIR'] || path.join(__dirname, '../../.output/chrome-mv3')
1822

1923
// Generate a unique user data directory for each test to ensure isolation
2024
const userDataDir = path.join(

apps/extension/project.json

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,27 @@
156156
}
157157
},
158158
"build:e2e": {
159-
"command": "webpack --node-env=production --env BUILD_ENV=dev BUILD_NUM=0",
159+
"command": "wxt build -b chrome --mode production",
160+
"options": {
161+
"cwd": "{projectRoot}",
162+
"env": {
163+
"NODE_ENV": "production",
164+
"BUILD_ENV": "dev",
165+
"BUILD_NUM": "0"
166+
}
167+
},
168+
"inputs": ["dependencies", "sourceFiles", "tsConfig"],
169+
"outputs": ["{projectRoot}/.output/chrome-mv3"],
170+
"cache": true,
171+
"dependsOn": ["^build", "prepare"]
172+
},
173+
"build:e2e:webpack": {
174+
"command": "webpack --node-env=production --env BUILD_ENV=dev --env BUILD_NUM=0",
160175
"options": {
161176
"cwd": "{projectRoot}"
162177
},
163178
"inputs": ["dependencies", "sourceFiles", "tsConfig"],
164-
"outputs": ["{projectRoot}/dist", "{projectRoot}/build", "{projectRoot}/.next", "{projectRoot}/types"],
179+
"outputs": ["{projectRoot}/build"],
165180
"cache": true,
166181
"dependsOn": ["^build", "prepare"]
167182
},

apps/extension/src/app/core/BaseAppContainer.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import { type DatadogAppNameTag } from 'src/app/datadog'
2828
import { onHashcashSolveCompleted, sessionInitAnalytics } from 'src/app/features/sessions/analytics'
2929
import { useOnCrashAppStateResetter } from 'src/store/appStateResetter'
3030
import { getReduxStore } from 'src/store/store'
31+
import { createHashcashWorker } from 'src/workers/hashcashWorker'
3132
import { BlankUrlProvider } from 'uniswap/src/contexts/UrlContext'
3233
import { useCurrentLanguage } from 'uniswap/src/features/language/hooks'
3334
import { LocalizationContextProvider } from 'uniswap/src/features/language/LocalizationContext'
@@ -61,11 +62,7 @@ const provideSessionInitializationService = (): SessionInitializationService =>
6162
performanceTracker,
6263
getWorkerChannel: () =>
6364
createHashcashWorkerChannel({
64-
getWorker: () =>
65-
new Worker(
66-
new URL('@universe/sessions/src/challenge-solvers/hashcash/worker/hashcash.worker.ts', import.meta.url),
67-
{ type: 'module' },
68-
),
65+
getWorker: createHashcashWorker,
6966
}),
7067
onSolveCompleted: onHashcashSolveCompleted,
7168
getLogger,

apps/extension/src/app/core/StatsigProvider.tsx

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,41 @@
11
import { useQuery } from '@tanstack/react-query'
22
import { SharedQueryClient } from '@universe/api'
3-
import { StatsigCustomAppValue, StatsigUser } from '@universe/gating'
4-
import { useEffect, useState } from 'react'
3+
import { type StatsigUser } from '@universe/gating'
4+
import { useMemo } from 'react'
55
import { makeStatsigUser } from 'src/app/core/initStatSigForBrowserScripts'
66
import { StatsigProviderWrapper } from 'uniswap/src/features/gating/StatsigProviderWrapper'
77
import { initializeDatadog } from 'uniswap/src/utils/datadog'
88
import { uniqueIdQuery } from 'utilities/src/device/uniqueIdQuery'
9+
import { useEvent } from 'utilities/src/react/hooks'
10+
11+
/**
12+
* Warms the uniqueId cache so `ExtensionStatsigProvider` can render with a valid
13+
* `userID` on first mount. Call once per entry point before `createRoot().render(...)`.
14+
*/
15+
export function prefetchExtensionStatsigUserId(): void {
16+
SharedQueryClient.prefetchQuery(uniqueIdQuery()).catch(() => undefined)
17+
}
918

1019
export function ExtensionStatsigProvider({
1120
children,
1221
appName,
1322
}: {
1423
children: React.ReactNode
1524
appName: string
16-
}): JSX.Element {
25+
}): JSX.Element | null {
1726
const { data: uniqueId } = useQuery(uniqueIdQuery(), SharedQueryClient)
18-
const [initFinished, setInitFinished] = useState(false)
19-
const [user, setUser] = useState<StatsigUser>({
20-
userID: undefined,
21-
custom: {
22-
app: StatsigCustomAppValue.Extension,
23-
},
24-
appVersion: process.env.VERSION,
25-
})
2627

27-
useEffect(() => {
28-
if (uniqueId && initFinished) {
29-
setUser(makeStatsigUser(uniqueId))
30-
}
31-
}, [uniqueId, initFinished])
28+
const user = useMemo<StatsigUser | null>(() => (uniqueId ? makeStatsigUser(uniqueId) : null), [uniqueId])
3229

33-
const onStatsigInit = (): void => {
34-
setInitFinished(true)
30+
const onStatsigInit = useEvent((): void => {
3531
initializeDatadog(appName).catch(() => undefined)
32+
})
33+
34+
// We don't want to initialize Statsig until the user ID is ready, as it messes up experiment exposure data.
35+
if (!user) {
36+
// This should never happen, as the user should always exist by the time this component is rendered,
37+
// unless for some reason the cache is too slow.
38+
return null
3639
}
3740

3841
return (

apps/extension/src/app/features/dappRequests/types/EthersTypes.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* oxlint-disable eslint-js/no-restricted-syntax */
12
import { isHexString } from 'ethers/lib/utils'
23
import { HexadecimalNumberSchema } from 'src/app/features/dappRequests/types/utilityTypes'
34
import { z } from 'zod'

0 commit comments

Comments
 (0)