Skip to content

Commit

Permalink
ci(release): publish latest release
Browse files Browse the repository at this point in the history
  • Loading branch information
hello-happy-puppy committed Jul 16, 2024
1 parent 6a249e4 commit 5ab5356
Show file tree
Hide file tree
Showing 1,376 changed files with 45,856 additions and 19,738 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ __mocks__
*.inc
*.json
*.md
*.test.ts
*.yml
babel.config.js
build
Expand Down
14 changes: 14 additions & 0 deletions .yarn/patches/detox-npm-20.18.1-b532b310b4.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/android/rninfo.gradle b/android/rninfo.gradle
index c09d2af1d219a4134dc0301e9270aef568730d2b..f1b887cf5dcf56c2f66fff3e6f1b674d48704dac 100644
--- a/android/rninfo.gradle
+++ b/android/rninfo.gradle
@@ -3,7 +3,8 @@ import groovy.json.JsonSlurper
def getRNVersion = { workingDir ->
println("RNInfo: workingDir=$workingDir")
def jsonSlurper = new JsonSlurper()
- def packageFile = "$workingDir/../node_modules/react-native/package.json"
+ // Fixes patch to node_modules in monorepo project
+ def packageFile = "$workingDir/../../../node_modules/react-native/package.json"
println("RNInfo: reading $packageFile")
Map<String, Object> packageJSON = jsonSlurper.parse(new File(packageFile))
String rnVersion = packageJSON.get('version')
Binary file removed .yarn/patches/detox-npm-20.23.0-6d61110e63.patch
Binary file not shown.
1 change: 0 additions & 1 deletion CODEOWNERS

This file was deleted.

5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ An open source repository for all Uniswap front end interfaces maintained by Uni
## Interfaces

- Web: [app.uniswap.org](https://app.uniswap.org)
- Wallet: [wallet.uniswap.org](https://wallet.uniswap.org)
- Wallet (mobile + extension): [wallet.uniswap.org](https://wallet.uniswap.org)

## Socials / Contact

Expand All @@ -31,6 +31,7 @@ For instructions per application or package, see the README published for each a

- [Web](apps/web/README.md)
- [Mobile](apps/mobile/README.md)
- [Extension](apps/extension/README.md)

## Releases

Expand All @@ -43,7 +44,7 @@ Translations for our applications are done through [crowdin](https://crowdin.com
| App | Coverage |
| ------- | -------- |
| web | [![Crowdin](https://badges.crowdin.net/uniswap-interface/localized.svg)](https://crowdin.com/project/uniswap-interface) |
| mobile | [![Crowdin](https://badges.crowdin.net/uniswap-wallet/localized.svg)](https://crowdin.com/project/uniswap-wallet) |
| wallet | [![Crowdin](https://badges.crowdin.net/uniswap-wallet/localized.svg)](https://crowdin.com/project/uniswap-wallet) |

## 🗂 Directory Structure

Expand Down
29 changes: 7 additions & 22 deletions RELEASE
Original file line number Diff line number Diff line change
@@ -1,24 +1,9 @@
IPFS hash of the deployment:
- CIDv0: `QmdnXm6P6JYgiiW7hLc8cFmDMQYLE2WuZWAw6JMhxzQTby`
- CIDv1: `bafybeihfqcgfsnr2ocpxfqatxukii6i6vzrv2vjxm7qwnsxemv7sskmudq`

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

You can also access the Uniswap Interface from an IPFS gateway.
**BEWARE**: The Uniswap interface uses [`localStorage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage) to remember your settings, such as which tokens you have imported.
**You should always use an IPFS gateway that enforces origin separation**, or our hosted deployment of the latest release at [app.uniswap.org](https://app.uniswap.org).
Your Uniswap settings are never remembered across different URLs.

IPFS gateways:
- https://bafybeihfqcgfsnr2ocpxfqatxukii6i6vzrv2vjxm7qwnsxemv7sskmudq.ipfs.dweb.link/
- https://bafybeihfqcgfsnr2ocpxfqatxukii6i6vzrv2vjxm7qwnsxemv7sskmudq.ipfs.cf-ipfs.com/
- [ipfs://QmdnXm6P6JYgiiW7hLc8cFmDMQYLE2WuZWAw6JMhxzQTby/](ipfs://QmdnXm6P6JYgiiW7hLc8cFmDMQYLE2WuZWAw6JMhxzQTby/)

### 5.40.1 (2024-07-15)


### Bug Fixes

* **web:** [ext-gtm] Remove outline on button on pageload - prod (#10194) 623eeca
Developed by Uniswap Labs, the Uniswap Extension allows you to access and explore onchain apps while maintaining full control of your crypto assets. The Uniswap Extension is the first wallet extension to live in your browser’s sidebar, persisting no matter where you are on the web. So you can explore crypto without obstructing your window or losing your place.

- Connect to thousands of onchain apps across Ethereum, Base, Arbitrum and many other EVM blockchains
- Explore tokens directly on Uniswap, one of the most trusted DeFi protocols with over $2 trillion in volume
- View all of your crypto assets without switching, across Ethereum and other EVM-compatible blockchains
- Easily create a new wallet or import your existing wallet
- Safely send and receive crypto tokens with other wallets

The Uniswap Extension’s source code is audited by the security firm Trail of Bits as an added measure to ensure that your crypto assets are safe.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web/5.40.1
extension/1.0.3
17 changes: 17 additions & 0 deletions apps/extension/.depcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
ignores: [
# Dependencies that depcheck thinks are unused but are actually used
"react-native-web",
"jest-environment-jsdom",
"webpack-cli",
# Dependencies that depcheck thinks are missing but are actually present or never used
## Internal packages / workspaces
"src",
"tsconfig",
# Webpack plugins
"@svgr/webpack",
"tamagui-loader",
"esbuild-loader",
"swc-loader",
## Testing
"@testing-library/dom",
]
1 change: 1 addition & 0 deletions apps/extension/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
jest-setup.js
28 changes: 28 additions & 0 deletions apps/extension/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
module.exports = {
root: true,
extends: ['@uniswap/eslint-config/native'],
ignorePatterns: ['node_modules', 'dist', '.turbo', 'build', '.eslintrc.js', 'webpack.config.js', 'webpack.dev.config.js', 'manifest.json'],
parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir: __dirname,
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
sourceType: 'module',
},
overrides: [
{
files: ['*.ts', '*.tsx'],
rules: {
'no-relative-import-paths/no-relative-import-paths': [
'error',
{
allowSameFolder: false,
},
],
},
},
],
rules: {},
}
30 changes: 30 additions & 0 deletions apps/extension/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dev
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

.tamagui

# Sentry Config File
.env.sentry-build-plugin
53 changes: 53 additions & 0 deletions apps/extension/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Uniswap Extension

## Developer Quickstart

### Running the extension locally

To run the extension, run the following from the top level of the monorepo:

```bash
yarn
yarn extension start
```

### Environment variables

You need to get the environment variables from 1password in order to get full functionality. Run the command `yarn extension env:local:download` to copy them to your root folder.

### Loading the extension into Chrome

1. Go to **chrome://extensions**
2. At the top right, turn on **Developer mode**
3. Click **Load unpacked**
4. Find and select the extension folder (apps/extension/dev)

## Running the extension locally with an absolute path (for testing scantastic)

Our scantastic API requires a consistent origin header so the build must be loaded from an absolute path. This works because Chrome generates a consistent ID for the extension based on the path it was loaded from.

To run the extension, run the following from the top level of the monorepo:

Mac:

```bash
yarn
yarn extension start:absolute
```

Windows:

```bash
yarn
yarn extension start:absolute:windows
```

1. Go to **chrome://extensions**
2. At the top right, turn on **Developer mode**
3. Click **Load unpacked**
4. Find and select the extension folder with an absolute path (`/Users/Shared/stretch` on Mac and `C:/ProgramData/stretch` on Windows)
5. Your chrome extension url should be `chrome-extension://ceofpnbcmdjbibjjdniemjemmgaibeih` on Mac and `chrome-extension://ffogefanhjekjafbpofianlhkonejcoe` on Windows. The backend allows this origin and the ID will be consistently generated based off an absolute path that is consistent on all machines.

## Migrations

We use `redux-persist` to persist the Redux state between user sessions. Most of this state is shared between the mobile app and the extension. Please review the [Wallet Migrations README](../../packages/wallet/src/state//README.md) for details on how to write migrations when you add or remove anything from the Redux state structure.
71 changes: 71 additions & 0 deletions apps/extension/jest-setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import 'utilities/src/logger/mocks'

import { chrome } from 'jest-chrome'
import { AppearanceSettingType } from 'wallet/src/features/appearance/slice'
import { TextEncoder, TextDecoder } from 'util';

process.env.IS_UNISWAP_EXTENSION = true

global.TextEncoder = TextEncoder;
global.TextDecoder = TextDecoder;

const ignoreLogs = {
error: [
// We need to use _persist property to ensure that the state is properly
// rehydrated (https://github.com/Uniswap/universe/pull/7502/files#r1566259088)
'Unexpected key "_persist" found in previous state received by the reducer.'
]
}

// Ignore certain logs that are expected during tests.
Object.entries(ignoreLogs).forEach(([method, messages]) => {
const key = method
const originalMethod = console[key]
console[key] = ((...args) => {
if (messages.some((message) => args.some((arg) => typeof arg === 'string' && arg.startsWith(message)))) {
return
}
originalMethod(...args)
})
})

globalThis.matchMedia =
globalThis.matchMedia ||
((query) => {
const reducedMotion = query.match(/prefers-reduced-motion: ([a-zA-Z0-9-]+)/)

return {
// Needed for reanimated to disable reduced motion warning in tests
matches: reducedMotion ? reducedMotion[1] === 'no-preference' : false,
addListener: jest.fn(),
addEventListener: jest.fn(),
removeEventListener: jest.fn(),
}
})

require('react-native-reanimated').setUpTests()

global.chrome = chrome

jest.mock('src/app/navigation/utils', () => ({
useExtensionNavigation: () => ({
navigateTo: jest.fn(),
navigateBack: jest.fn(),
})
}))

jest.mock('wallet/src/features/focus/useIsFocused', () => {
return jest.fn().mockReturnValue(true)
})

const mockAppearanceSetting = AppearanceSettingType.System
jest.mock('wallet/src/features/appearance/hooks', () => {
return {
useCurrentAppearanceSetting: () => mockAppearanceSetting,
}
})
jest.mock('wallet/src/features/appearance/hooks', () => {
return {
useSelectedColorScheme: () => 'light',
}
})
58 changes: 58 additions & 0 deletions apps/extension/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
const preset = require('../../config/jest-presets/jest/jest-preset')

const fileExtensions = [
'eot',
'gif',
'jpeg',
'jpg',
'otf',
'png',
'ttf',
'woff',
'woff2',
'mp4',
]

module.exports = {
...preset,
preset: 'jest-expo',
transform: {
'^.+\\.(t|j)sx?$': [
'babel-jest',
{
configFile: './src/test/babel.config.js',
}
],
},
moduleNameMapper: {
...preset.moduleNameMapper,
'^react-native$': 'react-native-web',
},
moduleFileExtensions: [
'web.js',
'web.jsx',
'web.ts',
'web.tsx',
...fileExtensions,
...preset.moduleFileExtensions,
],
resolver: "<rootDir>/src/test/jest-resolver.js",
displayName: 'Extension Wallet',
collectCoverageFrom: [
'src/app/**/*.{js,ts,tsx}',
'src/background/**/*.{js,ts,tsx}',
'src/contentScript/**/*.{js,ts,tsx}',
'!src/**/*.stories.**',
'!**/node_modules/**',
],
coverageThreshold: {
global: {
lines: 0,
},
},
setupFiles: [
'../../config/jest-presets/jest/setup.js',
'./jest-setup.js',
'../../node_modules/react-native-gesture-handler/jestSetup.js',
],
}
Loading

0 comments on commit 5ab5356

Please sign in to comment.