Skip to content

Commit 5df99a1

Browse files
ci(release): publish latest release
1 parent 569072d commit 5df99a1

499 files changed

Lines changed: 14659 additions & 6653 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.

.cursor/rules/writing-tests.mdc

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
---
2+
description:
3+
globs:
4+
alwaysApply: true
5+
---
6+
# Frontend Testing Strategy
7+
8+
When writing tests for our frontend monorepo, follow these principles:
9+
10+
## Core Philosophy
11+
- Test behaviors, not implementations
12+
- Optimize for confidence, readability, and maintainability
13+
- Follow the testing pyramid: unit tests > integration tests > E2E tests
14+
- Reference existing tests for examples of our team's best practices. For example: [useBooleanState.test.ts](mdc:packages/utilities/src/react/useBooleanState.test.ts) [useSwapNetworkNotification.test.ts](mdc:packages/uniswap/src/features/transactions/swap/form/hooks/useSwapNetworkNotification.test.ts)
15+
16+
## Test Structure & Patterns
17+
18+
### Unit Tests
19+
- Test individual functions, hooks, and components in isolation
20+
- Use Jest and React Testing Library/React Native Testing Library
21+
- Follow Arrange-Act-Assert pattern
22+
- Mock dependencies appropriately
23+
- Name tests descriptively: `it('should [behavior] when [condition]')`
24+
25+
```typescript
26+
// Component test example
27+
test('should display error when form submission fails', async () => {
28+
// Arrange
29+
const errorMessage = 'Invalid credentials';
30+
const mockSubmit = jest.fn().mockRejectedValue(new Error(errorMessage));
31+
render(<LoginForm onSubmit={mockSubmit} />);
32+
33+
// Act
34+
await userEvent.type(screen.getByLabelText(/email/i), 'user@example.com');
35+
await userEvent.type(screen.getByLabelText(/password/i), 'password123');
36+
await userEvent.click(screen.getByRole('button', { name: /login/i }));
37+
38+
// Assert
39+
expect(await screen.findByText(errorMessage)).toBeInTheDocument();
40+
expect(mockSubmit).toHaveBeenCalledWith({
41+
email: 'user@example.com',
42+
password: 'password123'
43+
});
44+
});
45+
46+
// Hook test example
47+
test('should increment counter when increment function is called', () => {
48+
// Arrange
49+
const { result } = renderHook(() => useCounter(0));
50+
51+
// Act
52+
act(() => {
53+
result.current.increment();
54+
});
55+
56+
// Assert
57+
expect(result.current.count).toBe(1);
58+
});
59+
```
60+
61+
### Integration Tests
62+
- Test interactions between multiple components
63+
- Focus on user workflows and component communication
64+
- Use React Testing Library's user-event
65+
- Minimize mocking to test actual integrations
66+
67+
## Best Practices
68+
69+
### Test Data Management
70+
- Create factory functions for generating test data
71+
- Use TypeScript to ensure test data matches expected interfaces
72+
73+
```typescript
74+
const createUser = (overrides = {}): User => ({
75+
id: uuid(),
76+
name: 'Test User',
77+
email: 'test@example.com',
78+
role: 'user',
79+
...overrides
80+
});
81+
```
82+
83+
### Mocking Strategy
84+
- Prefer manual mocks over automatic mocks
85+
- Mock at the boundary of your system (API calls, third-party services)
86+
- For React Native, mock native modules using Jest's mock functions
87+
88+
```typescript
89+
jest.mock('packages/uniswap/...', () => ({
90+
fetchUserData: jest.fn().mockResolvedValue({
91+
id: '123',
92+
name: 'Test User',
93+
email: 'test@example.com'
94+
})
95+
}));
96+
```
97+
98+
### Coverage Guidelines
99+
- Aim for 80% coverage overall, 90%+ for critical business logic
100+
- When requested to write UI tests, cover all user-facing components with at least basic rendering tests
101+
- Test error states and edge cases; when unceratin about these states and cases, stop and ask for clarification before continuing
102+
- Focus on quality over quantity - 5 well-written tests > 20 poor tests
103+
104+
## Monorepo Considerations
105+
- Use the same path import strategy found in other files; everything should pass linting
106+
- Respect the testing configuration of each package
107+
- For shared components, test in their own package, not in consuming packages
108+
109+
## Implementation Checklist
110+
111+
When implementing tests, verify:
112+
113+
1. ✅ Tests focus on component/function behavior
114+
2. ✅ Tests are isolated and don't depend on each other
115+
3. ✅ Mocks are used appropriately and documented
116+
4. ✅ Error states and edge cases are covered
117+
5. ✅ Tests are readable and maintainable
118+
6. ✅ Tests fail when they should (verify with temporary bug)
119+
7. ✅ Test file structure matches source code structure
120+
8. ✅ Import paths follow monorepo conventions

RELEASE

Lines changed: 87 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
IPFS hash of the deployment:
2-
- CIDv0: `QmezmXSutzznthvc6pSCrb7JgxjGqXFNCWCZLjADjg6Tf8`
3-
- CIDv1: `bafybeihxp3cmskdb4nr76bocjhdgq32ykbfquxwakbdx33iehf44jxwuim`
2+
- CIDv0: `QmainvWX1paa5SAQXowSshKypn1tC5d59gLN8w2coWzJwx`
3+
- CIDv1: `bafybeifx7bho67bfj5b2bn7nw452bovpbv4iia5ndwi4kwvra5fcswhjr4`
44

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

@@ -10,14 +10,95 @@ 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://bafybeihxp3cmskdb4nr76bocjhdgq32ykbfquxwakbdx33iehf44jxwuim.ipfs.dweb.link/
14-
- [ipfs://QmezmXSutzznthvc6pSCrb7JgxjGqXFNCWCZLjADjg6Tf8/](ipfs://QmezmXSutzznthvc6pSCrb7JgxjGqXFNCWCZLjADjg6Tf8/)
13+
- https://bafybeifx7bho67bfj5b2bn7nw452bovpbv4iia5ndwi4kwvra5fcswhjr4.ipfs.dweb.link/
14+
- [ipfs://QmainvWX1paa5SAQXowSshKypn1tC5d59gLN8w2coWzJwx/](ipfs://QmainvWX1paa5SAQXowSshKypn1tC5d59gLN8w2coWzJwx/)
1515

16-
### 5.83.7 (2025-05-13)
16+
## 5.84.0 (2025-05-14)
17+
18+
19+
### Features
20+
21+
* **web:** add an e2e test for the sign up flow (#19146) c05749e
22+
* **web:** add connector_id to lp txs (#19207) 50b933e
23+
* **web:** add connector_id to send events (#19208) 7e4a30a
24+
* **web:** add connector_id to swap analytics (#19206) 9d734f0
25+
* **web:** add connector_id to wallet disconnect event (#19205) 6631d02
26+
* **web:** add passkey mgmt analytics (#19172) 9d12f00
27+
* **web:** detect delegations and log them (#19368) d22a9de
28+
* **web:** display min/max/market for custom range position (#19485) cc4437b
29+
* **web:** PUX add expandable swap details with tooltips (#18669) 21c0110
30+
* **web:** PUX adding token rate to currency input (#18736) d7abe9f
31+
* **web:** PUX adding user quote amount to trades (#18511) 10d6f6f
32+
* **web:** PUX FOT (#18804) ae89a01
33+
* **web:** PUX handle bridging (#19089) b7375af
34+
* **web:** PUX max slippage shield animation (#18972) 4d635a4
35+
* **web:** PUX max slippage tooltip (#18708) 23d955b
36+
* **web:** PUX network cost tooltip (#18685) dff4cc1
37+
* **web:** PUX price and route tooltips (#18681) f77ad8a
38+
* **web:** PUX price diff (#18738) 859bca1
39+
* **web:** PUX price impact warning (#18740) 9809ff3
40+
* **web:** PUX you receive panel (#18664) 326c5b1
41+
* **web:** retry with standard swap if batched fails (#19295) dbffc2b
42+
* **web:** swap tracking (#19328) 4185c10
43+
* **web:** track clicks of download app ctas (#19232) fbc651c
44+
* **web:** track user prop delegate status (#19286) f2f3e52
45+
* **web:** Update existing user cta text and remove experiment (#19349) f13e553
1746

1847

1948
### Bug Fixes
2049

21-
* **web:** only support batch swaps on supported status (#19566) da9a5ec
50+
* **web:** [lp] fix native buffer experiment (#18777) 7a03b16
51+
* **web:** add create/increase params to analytic events (#19388) b2a4177
52+
* **web:** add error handling for rewards calcs (#18988) 1923ffe
53+
* **web:** add google fonts url to CSP style-src (#19248) f64259e
54+
* **web:** add migration 24 for wallet capabilities (#19464) 3ffc371
55+
* **web:** add providers to web storybook to fix AnimatedNumber story (#18632) 12b4874
56+
* **web:** allow press on disabled web3-status-connected (#19535) b7c4ede
57+
* **web:** avoid fetching calldata for invalid range (#19384) 552a144
58+
* **web:** clicking swap setting icon should close settings modal if open (#19472) c248622
59+
* **web:** correct delegation logging (#19415) ed73ce2
60+
* **web:** correct some analytics (#19391) 26016ce
61+
* **web:** dedupe and cache wallet capabilities calls (#19739) (#19750) ad67756
62+
* **web:** delete DeprecatedWebButtons (#19213) 799b1c1
63+
* **web:** downgrade two errors to warnings (#19344) 726ba31
64+
* **web:** fix approval call for create + increase (#19223) f73b4dd
65+
* **web:** fix key open search modal (#19332) eb41c21
66+
* **web:** fix mweb chart panning (#19373) f3ab207
67+
* **web:** handle isTokenOptionArray check for bridging section (#19363) de14b83
68+
* **web:** icon bugs + lp incentive improvements (#19606) 4c7c09e
69+
* **web:** limits mobile bug (#19271) 9d49bf8
70+
* **web:** logging for mismatch and isDelegatedEOA (#19346) 53b3a5a
71+
* **web:** migrate BreadcrumbNav to tamagui (#19212) 734de02
72+
* **web:** migrate NFTTab to tamagui (#19216) d940820
73+
* **web:** migrate OpenLimitOrdersButton to tamagui (#19217) a74ae36
74+
* **web:** migrate TokensTab to tamagui (#19214) 622e711
75+
* **web:** migrate UniExtensionPoolsMenu to tamagui (#19215) 6250c24
76+
* **web:** missing permit tx (#19326) 915e983
77+
* **web:** only support batch swaps on supported status (#19580) ce53969
78+
* **web:** persist query client and remove extra provider (#19219) f2236dc
79+
* **web:** preload WalletConnect provider to avoid waterfall requests (#19195) ea3bc3f
80+
* **web:** price ux revert remove inline warning (#19439) a5574a3
81+
* **web:** PUX auto slippage (#18805) 598d9d3
82+
* **web:** pux design fixes (#19430) a1c6311
83+
* **web:** remove disconnect logic in useConnect hook (#19190) 7e2b0bc
84+
* **web:** tamagui LimitDetailActivityRow & PortfolioTabRow (#19220) 084eced
85+
* **web:** tamagui LimitsMenu / LimitDisclaimer (#19218) 28fbc8e
86+
* **web:** temp remove disabled prop from button (#19675) 17f177e
87+
* **web:** update icon props to be compatible w react-feather (#19209) 2dd772b
88+
* **web:** update url for EW sign in test (#19470) 2d1a87e
89+
* **web:** usd amount hover state currency panel (#18841) 38a3d0c
90+
* **web:** Use "Log In" in auth pop up (#19385) 9ea148b
91+
* **web:** Use sign up for New User button (#19478) a0b6690
92+
93+
94+
### Continuous Integration
95+
96+
* **web:** update sitemaps c080e0b
97+
98+
99+
### Tests
100+
101+
* **web:** handle v2, v3, v4 pool not found graphql (#19348) 4898d1c
102+
* **web:** use different test account (#19431) 014d910
22103

23104

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
web/5.83.7
1+
web/5.84.0
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
// Simple mock for expo-blur's BlurView
3+
// This is needed to avoid the Storybook Web compilation error related to `expo-blur`, something like:
4+
// Module parse failed: Unexpected token (29:12)
5+
// node_modules/expo-blur/build/BlurView.web.js 29:12
6+
// You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
7+
// We don't actually need to use `expo-blur` in the Web App, as we just use CSS; so, we can mock it out.
8+
9+
export const BlurView = (props) => <div {...props} />;
10+
11+
export default BlurView;

apps/extension/src/app/components/MnemonicViewer.tsx

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

apps/extension/src/app/components/Trace/TraceUserProperties.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ export function TraceUserProperties(): null {
6060
if (!activeAccount) {
6161
return
6262
}
63+
if (activeAccount.backups) {
64+
setUserProperty(ExtensionUserPropertyName.BackupTypes, activeAccount.backups)
65+
}
6366
setUserProperty(ExtensionUserPropertyName.ActiveWalletAddress, activeAccount.address)
6467
setUserProperty(ExtensionUserPropertyName.ActiveWalletType, activeAccount.type)
6568
setUserProperty(ExtensionUserPropertyName.IsHideSmallBalancesEnabled, hideSmallBalances)

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

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ import {
2121
} from 'src/app/features/onboarding/OnboardingSteps'
2222
import { OnboardingWrapper } from 'src/app/features/onboarding/OnboardingWrapper'
2323
import { PasswordImport } from 'src/app/features/onboarding/PasswordImport'
24-
import { NameWallet } from 'src/app/features/onboarding/create/NameWallet'
2524
import { PasswordCreate } from 'src/app/features/onboarding/create/PasswordCreate'
26-
import { TestMnemonic } from 'src/app/features/onboarding/create/TestMnemonic'
27-
import { ViewMnemonic } from 'src/app/features/onboarding/create/ViewMnemonic'
2825
import { ImportMnemonic } from 'src/app/features/onboarding/import/ImportMnemonic'
2926
import { InitiatePasskeyAuth } from 'src/app/features/onboarding/import/InitiatePasskeyAuth'
3027
import { PasskeyImport } from 'src/app/features/onboarding/import/PasskeyImport'
@@ -68,26 +65,9 @@ const allRoutes = [
6865
element: (
6966
<OnboardingStepsProvider
7067
key={OnboardingRoutes.Create}
71-
steps={{
72-
[CreateOnboardingSteps.Password]: <PasswordCreate />,
73-
[CreateOnboardingSteps.ViewMnemonic]: <ViewMnemonic />,
74-
[CreateOnboardingSteps.TestMnemonic]: <TestMnemonic />,
75-
[CreateOnboardingSteps.Naming]: <NameWallet />,
76-
[CreateOnboardingSteps.Complete]: <Complete flow={ExtensionOnboardingFlow.New} />,
77-
}}
78-
/>
79-
),
80-
},
81-
{
82-
path: OnboardingRoutes.Claim,
83-
element: (
84-
<OnboardingStepsProvider
85-
key={OnboardingRoutes.Claim}
8668
steps={{
8769
[CreateOnboardingSteps.ClaimUnitag]: <ClaimUnitagScreen />,
8870
[CreateOnboardingSteps.Password]: <PasswordCreate />,
89-
[CreateOnboardingSteps.ViewMnemonic]: <ViewMnemonic />,
90-
[CreateOnboardingSteps.TestMnemonic]: <TestMnemonic />,
9171
[CreateOnboardingSteps.Complete]: <Complete tryToClaimUnitag flow={ExtensionOnboardingFlow.New} />,
9272
}}
9373
/>
@@ -113,7 +93,6 @@ const allRoutes = [
11393
steps={{
11494
[ImportPasskeySteps.InitiatePasskeyAuth]: <InitiatePasskeyAuth />,
11595
[ImportPasskeySteps.PasskeyImport]: <PasskeyImport />,
116-
// TODO(WALL-6383): modify this flow to ask user to verify their seed phrase.
11796
[ImportOnboardingSteps.Password]: <PasswordImport flow={ExtensionOnboardingFlow.Passkey} />,
11897
[ImportOnboardingSteps.Select]: <SelectWallets flow={ExtensionOnboardingFlow.Passkey} />,
11998
[ImportOnboardingSteps.Complete]: <Complete flow={ExtensionOnboardingFlow.Passkey} />,

0 commit comments

Comments
 (0)