From 86dd84b9749553fc0df4230605832bd4a27159e9 Mon Sep 17 00:00:00 2001 From: KillariDev <killari@gmail.com> Date: Mon, 15 Jan 2024 13:03:42 +0200 Subject: [PATCH 1/8] remove some non-needed files and update contributing.md --- .github/CODEOWNERS | 1 - .github/actions/report/action.yml | 48 ------------------------------- CODEOWNERS | 1 - CONTRIBUTING.md | 14 ++++++--- package.json | 4 +-- public/451.html | 10 ------- 6 files changed, 12 insertions(+), 66 deletions(-) delete mode 100644 .github/CODEOWNERS delete mode 100644 .github/actions/report/action.yml delete mode 100644 CODEOWNERS delete mode 100644 public/451.html diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index 33ffedf4eea..00000000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1 +0,0 @@ -* @uniswap/web-reviewers diff --git a/.github/actions/report/action.yml b/.github/actions/report/action.yml deleted file mode 100644 index 6c7f7600fe5..00000000000 --- a/.github/actions/report/action.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Report -description: Report test failures via Slack -inputs: - name: - description: The name of the failing test - required: true - SLACK_WEBHOOK_URL: - description: The webhook URL to send the report to - required: true - -runs: - using: composite - steps: - - uses: slackapi/slack-github-action@007b2c3c751a190b6f0f040e47ed024deaa72844 - with: - payload: | - { - "text": "${{ inputs.name }} failing on `${{ github.ref_name }}`", - "blocks": [ - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "*${{ inputs.name }} failing on `${{ github.ref_name }}`:* <https://github.com/${{ github.repository}}/actions/runs/${{ github.run_id }}|view failing action>" - } - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "_This is blocking pull requests and branch promotions._\n_Please prioritize fixing the build._" - } - } - ] - } - env: - SLACK_WEBHOOK_URL: ${{ inputs.SLACK_WEBHOOK_URL }} - SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK - # The !oncall bot requires its own message: - - uses: slackapi/slack-github-action@007b2c3c751a190b6f0f040e47ed024deaa72844 - with: - payload: | - { - "text": "!oncall web" - } - env: - SLACK_WEBHOOK_URL: ${{ inputs.SLACK_WEBHOOK_URL }} - SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK diff --git a/CODEOWNERS b/CODEOWNERS deleted file mode 100644 index f70773659eb..00000000000 --- a/CODEOWNERS +++ /dev/null @@ -1 +0,0 @@ -* @uniswap/web-admins diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9dd59ce73ee..cad7b306693 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -20,17 +20,23 @@ The interface should automatically open. If it does not, navigate to [http://loc ## Creating a production build +Build horswap docker ``` -yarn build +docker build -f Dockerfile . -t horswap ``` -To serve the production build: +Deploy to IPFS (requires running local IPFS node) ``` -yarn serve +docker container run --rm -it horswap ``` -Then, navigate to [http://localhost:3000] to see it. +The last line of the output should say: +``` +added bafyb... export +``` + +You can then, navigate to [bafyb....ipfs.localhost:8081] to interact with Horswap, given that you are hosting IPFS gateway at localhost:8081. ## Running unit tests diff --git a/package.json b/package.json index bf5e757597a..7af4e1977d2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "@uniswap/interface", - "version": "1.1.0", + "name": "@darkflorist/horswap", + "version": "1.0.0", "description": "Horswap Interface", "license": "GPL-3.0-or-later", "scripts": { diff --git a/public/451.html b/public/451.html deleted file mode 100644 index 19918c3ecf0..00000000000 --- a/public/451.html +++ /dev/null @@ -1,10 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> - <head> - <meta charset="utf-8" /> - <title>Unavailable For Legal Reasons</title> - </head> - <body> - <h1>Unavailable For Legal Reasons</h1> - </body> -</html> From 2dcac5a0d74fdd9be68782ce643ef9c27e863242 Mon Sep 17 00:00:00 2001 From: KillariDev <killari@gmail.com> Date: Mon, 15 Jan 2024 13:10:27 +0200 Subject: [PATCH 2/8] fix text --- CONTRIBUTING.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cad7b306693..b3d6b325fe7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,7 +26,6 @@ docker build -f Dockerfile . -t horswap ``` Deploy to IPFS (requires running local IPFS node) - ``` docker container run --rm -it horswap ``` @@ -36,7 +35,7 @@ The last line of the output should say: added bafyb... export ``` -You can then, navigate to [bafyb....ipfs.localhost:8081] to interact with Horswap, given that you are hosting IPFS gateway at localhost:8081. +Given that you are hosting IPFS gateway at localhost:8081, you can then navigate to [bafyb....ipfs.localhost:8081] to interact with Horswap. ## Running unit tests From 4b9d08d5a68cdedd9f2f1fe42d74b40fa83b6c7a Mon Sep 17 00:00:00 2001 From: KillariDev <killari@gmail.com> Date: Mon, 15 Jan 2024 13:14:16 +0200 Subject: [PATCH 3/8] these as well --- public/.well-known/assetlinks.json | 29 ----------------------------- public/index.html | 6 ------ 2 files changed, 35 deletions(-) delete mode 100644 public/.well-known/assetlinks.json diff --git a/public/.well-known/assetlinks.json b/public/.well-known/assetlinks.json deleted file mode 100644 index dfcfe7ccd5e..00000000000 --- a/public/.well-known/assetlinks.json +++ /dev/null @@ -1,29 +0,0 @@ -[ - { - "relation": ["delegate_permission/common.handle_all_urls"], - "target": { - "namespace": "android_app", - "package_name": "com.uniswap.mobile", - "sha256_cert_fingerprints": - ["49:D9:3D:5D:FB:AA:64:A4:64:80:85:0F:39:A8:C1:D9:25:D3:D4:BC:8E:6B:1F:45:0C:EA:AF:B1:0C:27:DF:B8", "F9:E9:E3:F0:04:28:66:62:81:44:50:7E:D6:A9:5F:B9:65:39:02:70:1D:13:74:15:D3:E1:A3:1B:D4:38:3A:1F"] - } - }, - { - "relation": ["delegate_permission/common.handle_all_urls"], - "target": { - "namespace": "android_app", - "package_name": "com.uniswap.mobile.beta", - "sha256_cert_fingerprints": - ["75:41:9C:2D:01:4A:88:4E:8D:C6:EF:E5:51:54:28:6B:99:05:31:43:AD:84:B4:EB:39:28:B8:C3:C4:CE:48:E3", "54:4B:62:33:17:9B:5F:A8:E6:5D:D3:A6:E5:9D:80:5F:A5:02:7F:E2:14:B8:C1:7A:AC:4B:8D:E0:65:49:87:41"] - } - }, - { - "relation": ["delegate_permission/common.handle_all_urls"], - "target": { - "namespace": "android_app", - "package_name": "com.uniswap.mobile.dev", - "sha256_cert_fingerprints": - ["45:F8:15:02:C5:4F:AD:82:E7:51:F0:9C:D1:CA:77:C8:C9:BF:06:A6:D9:5A:55:4F:9E:B8:5F:81:33:2B:D0:DB", "02:E6:1C:76:8C:75:C3:78:C8:8C:FE:7B:2E:8F:4B:E1:FA:47:F2:F6:1A:DB:57:69:4A:41:99:C6:71:2C:AB:E3", "FA:C6:17:45:DC:09:03:78:6F:B9:ED:E6:2A:96:2B:39:9F:73:48:F0:BB:6F:89:9B:83:32:66:75:91:03:3B:9C"] - } - } -] \ No newline at end of file diff --git a/public/index.html b/public/index.html index aa198bd8456..d842112a817 100644 --- a/public/index.html +++ b/public/index.html @@ -24,12 +24,6 @@ <% } %> /> - <!-- - Apple Smart App Banner for Safari on iOS - https://developer.apple.com/documentation/webkit/promoting_apps_with_smart_app_banners - --> - <meta name="apple-itunes-app" content="app-id=6443944476"> - <!-- manifest.json provides metadata used when the app is installed as a PWA. See https://developers.google.com/web/fundamentals/web-app-manifest/ From 9a9c74df8015f700b432c083e1ad9a37caa6b234 Mon Sep 17 00:00:00 2001 From: KillariDev <13102010+KillariDev@users.noreply.github.com> Date: Thu, 18 Jan 2024 22:39:25 +0200 Subject: [PATCH 4/8] Update CONTRIBUTING.md Co-authored-by: Micah Zoltu <micah@zoltu.net> --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b3d6b325fe7..d5edacf1c64 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,7 +25,7 @@ Build horswap docker docker build -f Dockerfile . -t horswap ``` -Deploy to IPFS (requires running local IPFS node) +Deploy to IPFS (requires running local IPFS node with the API exposed on default port, IPFS Desktop is sufficient) ``` docker container run --rm -it horswap ``` From f441d90d954dc60b798a9dcc4bae2584615719aa Mon Sep 17 00:00:00 2001 From: Jubal Mabaquiao <jubal.mabaquiao@gmail.com> Date: Sun, 21 Jan 2024 22:19:51 +0800 Subject: [PATCH 5/8] start with accent colors --- src/components/swap/styled.tsx | 2 +- src/pages/Landing/index.tsx | 7 +++---- src/theme/colors.ts | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/components/swap/styled.tsx b/src/components/swap/styled.tsx index 5c4cbda6d32..e5f92d9fe5a 100644 --- a/src/components/swap/styled.tsx +++ b/src/components/swap/styled.tsx @@ -35,7 +35,7 @@ const SwapWrapperOuter = styled.main<{ isDark?: boolean }>` inset: 0; transform: scale(1.1); filter: blur(50px); - background-color: rgba(252, 114, 255, 0.075); + background-color: ${({ theme }) => theme.accent2}; z-index: -2; } diff --git a/src/pages/Landing/index.tsx b/src/pages/Landing/index.tsx index 1a6b69004c9..476ee540399 100644 --- a/src/pages/Landing/index.tsx +++ b/src/pages/Landing/index.tsx @@ -6,6 +6,7 @@ import ProtocolBanner from 'components/About/ProtocolBanner' import { useAccountDrawer } from 'components/AccountDrawer' import { BaseButton } from 'components/Button' import Swap from 'pages/Swap' +import { lighten } from 'polished' import { parse } from 'qs' import { useEffect, useRef } from 'react' import { ArrowDownCircle } from 'react-feather' @@ -20,8 +21,6 @@ import { textFadeIn, TRANSITION_DURATIONS } from 'theme/styles' import { Z_INDEX } from 'theme/zIndex' const PageContainer = styled.div` - position: absolute; - top: 0; padding: ${({ theme }) => theme.navHeight}px 0px 0px 0px; width: 100%; display: flex; @@ -75,7 +74,7 @@ const Glow = styled.div` position: absolute; top: 68px; bottom: 0; - background: radial-gradient(72.04% 72.04% at 50% 3.99%, #33ff99 0%, rgba(166, 151, 255, 0) 100%); + background: radial-gradient(75% 75% at 50% 0%, ${({ theme }) => theme.accent1} 0%, ${({ theme }) => theme.accent2} 100%); filter: blur(72px); border-radius: 24px; max-width: 480px; @@ -171,7 +170,7 @@ const LandingButton = styled(BaseButton)` ` const ButtonCTA = styled(LandingButton)` - background: linear-gradient(93.06deg, #00ff38 2.66%, #9fffa3 98.99%); + background: linear-gradient(93.06deg, ${({ theme }) => theme.accent1} 2.66%, ${({ theme }) => lighten(0.5, theme.accent1)} 98.99%); border: none; color: ${({ theme }) => theme.white}; transition: ${({ theme }) => `all ${theme.transition.duration.medium} ${theme.transition.timing.ease}`}; diff --git a/src/theme/colors.ts b/src/theme/colors.ts index fd9d47896c9..c98db566cc9 100644 --- a/src/theme/colors.ts +++ b/src/theme/colors.ts @@ -106,8 +106,8 @@ export const colors = { surface3_dark: '#FFFFFF12', surface4_dark: '#FFFFFF20', surface5_dark: '#00000004', - accent1_dark: '#75ff72', - accent2_dark: '#311C31', + accent1_dark: '#03982d', + accent2_dark: '#02222b', neutral1_light: '#222222', neutral2_light: '#7D7D7D', neutral3_light: '#CECECE', From 80088e30a2a5f780805804c74d7555164c825f78 Mon Sep 17 00:00:00 2001 From: Jubal Mabaquiao <jubal.mabaquiao@gmail.com> Date: Mon, 22 Jan 2024 17:55:41 +0800 Subject: [PATCH 6/8] update banners and logo --- src/components/About/ProtocolBanner.tsx | 10 ++++---- src/nft/components/icons.tsx | 18 ++++++-------- src/nft/css/sprinkles.css.ts | 9 ++++--- src/pages/Landing/index.tsx | 33 ++++++++++--------------- src/theme/colors.ts | 8 +++--- 5 files changed, 35 insertions(+), 43 deletions(-) diff --git a/src/components/About/ProtocolBanner.tsx b/src/components/About/ProtocolBanner.tsx index 565b20869a3..db2bb3d33c2 100644 --- a/src/components/About/ProtocolBanner.tsx +++ b/src/components/About/ProtocolBanner.tsx @@ -1,12 +1,12 @@ import { ButtonEmpty } from 'components/Button' +import { darken, lighten } from 'polished' import styled from 'styled-components' import { BREAKPOINTS } from 'theme' +import { colors } from 'theme/colors' import { useIsDarkMode } from 'theme/components/ThemeToggle' import meshSrc from './images/Mesh.png' -const DARK_MODE_GRADIENT = 'radial-gradient(101.8% 4091.31% at 0% 0%, #4673FA 0%, #9646FA 100%)' - const Banner = styled.div<{ isDarkMode: boolean }>` height: 340px; width: 100%; @@ -22,10 +22,10 @@ const Banner = styled.div<{ isDarkMode: boolean }>` box-shadow: 0px 10px 24px rgba(51, 53, 72, 0.04); - background: ${({ isDarkMode }) => + background: ${({ isDarkMode, theme }) => isDarkMode - ? `url(${meshSrc}), ${DARK_MODE_GRADIENT}` - : `url(${meshSrc}), linear-gradient(93.06deg, #00ff38 2.66%, #9fffa3 98.99%);`}; + ? `url(${meshSrc}), linear-gradient(90deg, ${colors.blueVibrant} 0%, ${colors.purple300} 100%)` + : `url(${meshSrc}), linear-gradient(90deg, ${darken(0.1, theme.accent1)} 0%, ${lighten(0.25, theme.accent1)} 100%);`}; @media screen and (min-width: ${BREAKPOINTS.lg}px) { height: 140px; diff --git a/src/nft/components/icons.tsx b/src/nft/components/icons.tsx index 96ff2b72815..094647f3104 100644 --- a/src/nft/components/icons.tsx +++ b/src/nft/components/icons.tsx @@ -10,16 +10,14 @@ type SVGProps = React.SVGProps<SVGSVGElement> & { gradientId?: string } -export const UniIcon = (props: SVGProps) => ( - <svg {...props} fill="none" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"> - <path - fillRule="evenodd" - clipRule="evenodd" - d="m509.8 332.5l-69.9-164.3c-14.9-41.2-50.4-71-93-79.2c18-10.6 46.3-35.9 34.2-82.3c-1.3-5-7.1-7.9-12-6.1L166.9 76.3C35.9 123.4 0 238.9 0 398.8V480c0 17.7 14.3 32 32 32h236.2c23.8 0 39.3-25 28.6-46.3L256 384v-.7c-45.6-3.5-84.6-30.7-104.3-69.6c-1.6-3.1-.9-6.9 1.6-9.3l12.1-12.1c3.9-3.9 10.6-2.7 12.9 2.4c14.8 33.7 48.2 57.4 87.4 57.4c17.2 0 33-5.1 46.8-13.2l46 63.9c6 8.4 15.7 13.3 26 13.3h50.3c8.5 0 16.6-3.4 22.6-9.4l45.3-39.8c8.9-9.1 11.7-22.6 7.1-34.4M328 224c-13.3 0-24-10.7-24-24s10.7-24 24-24s24 10.7 24 24s-10.7 24-24 24" - fill="currentColor" - /> - </svg> -) +export const UniIcon = (props: SVGProps) => { + return ( + <svg {...props} viewBox="0 0 215 215" fill="none" xmlns="http://www.w3.org/2000/svg"> + <path fillRule="evenodd" clipRule="evenodd" d="M128.921 202.639C126.319 194.551 121.653 182.432 114.5 172C107.366 161.597 95.1085 150.133 84.9742 140.656L84.974 140.656C78.0609 134.191 72.1361 128.65 69.5002 125C63.0002 116 61.9999 107 64.9999 97C65.9999 107 70.9999 114.5 81.4999 118.5C85.8718 120.166 92.2159 121.219 99.0431 122.353C108.613 123.942 119.132 125.689 126.5 129.5C131.728 132.204 135.767 136.066 139.364 139.506C145.743 145.606 150.733 150.377 158.5 145C162.209 142.432 166.569 140.705 170.094 139.308C172.746 138.257 174.925 137.393 176 136.5C178.929 134.065 177.891 127.151 175.5 119.5C174.305 115.677 172.083 111.854 168.56 105.794L168.56 105.794C165.099 99.8396 160.383 91.7263 154.153 79.3321V101H89V39H130.137C128.595 37.0234 127.183 35.301 125.898 33.7336L125.898 33.7336C124.645 32.2058 123.513 30.8252 122.5 29.5C122.5 29.5 127 24.5 135.5 21C124 17.5 114 19 114 19L118.737 10.6405C115.05 10.2174 111.3 10 107.5 10C53.6523 10 10.0001 53.6522 10.0001 107.5C10.0001 161.348 53.6523 205 107.5 205C114.859 205 122.028 204.185 128.921 202.639ZM142 49H101V90H142V49Z" fill="currentColor" /> + </svg> + ) +} + export const ChevronUpIcon = ({ secondaryColor, diff --git a/src/nft/css/sprinkles.css.ts b/src/nft/css/sprinkles.css.ts index d25a7b67ba1..2a3ba702a84 100644 --- a/src/nft/css/sprinkles.css.ts +++ b/src/nft/css/sprinkles.css.ts @@ -212,8 +212,8 @@ export const vars = createGlobalTheme(':root', { surface3_dark: '#FFFFFF1f', surface4_dark: '#FFFFFF33', surface5_dark: '#00000004', - accent1_dark: '#75ff72', - accent2_dark: '#311C31', + accent1_dark: '#139c3a', + accent2_dark: '#022b24', neutral1_light: '#222222', neutral2_light: '#7D7D7D', neutral3_light: '#CECECE', @@ -222,8 +222,8 @@ export const vars = createGlobalTheme(':root', { surface3_light: '#2222220d', surface4_light: '#ffffffa3', surface5_light: '#0000000a', - accent1_light: '#75ff72', - accent2_light: '#EFEFEF', + accent1_light: '#3dad5d', + accent2_light: '#d0ffdd', success: '#40B66B', critical: '#FF5F52', }, @@ -315,6 +315,7 @@ const breakpoints = { xxxl: 1920, } + const layoutStyles = defineProperties({ conditions: { sm: {}, diff --git a/src/pages/Landing/index.tsx b/src/pages/Landing/index.tsx index 476ee540399..3c3a505f3ad 100644 --- a/src/pages/Landing/index.tsx +++ b/src/pages/Landing/index.tsx @@ -6,7 +6,7 @@ import ProtocolBanner from 'components/About/ProtocolBanner' import { useAccountDrawer } from 'components/AccountDrawer' import { BaseButton } from 'components/Button' import Swap from 'pages/Swap' -import { lighten } from 'polished' +import { adjustHue, lighten } from 'polished' import { parse } from 'qs' import { useEffect, useRef } from 'react' import { ArrowDownCircle } from 'react-feather' @@ -41,12 +41,8 @@ const Gradient = styled.div<{ isDarkMode: boolean }>` min-height: 550px; ${({ isDarkMode }) => isDarkMode - ? css` - background: linear-gradient(rgba(8, 10, 24, 0) 0%, rgb(8 10 24 / 100%) 45%); - ` - : css` - background: linear-gradient(rgba(255, 255, 255, 0) 0%, rgb(255 255 255 /100%) 45%); - `}; + ? css`background: linear-gradient(rgba(8, 10, 24, 0) 0%, rgb(8 10 24 / 100%) 45%);` + : css`background: linear-gradient(rgba(255, 255, 255, 0) 0%, rgb(255 255 255 /100%) 45%);`}; z-index: ${Z_INDEX.under_dropdown}; pointer-events: none; height: ${({ theme }) => `calc(100vh - ${theme.mobileBottomBarHeight}px)`}; @@ -110,12 +106,9 @@ const TitleText = styled.h1<{ isDarkMode: boolean; $visible: boolean }>` margin: 0 0 24px; ${({ isDarkMode }) => isDarkMode - ? css` - background: linear-gradient(20deg, rgba(255, 244, 207, 1) 10%, rgba(51, 255, 102, 1) 100%); - ` - : css` - background: linear-gradient(10deg, rgba(79, 255, 150, 1) 0%, rgba(159, 255, 163, 1) 100%); - `}; + ? css`background: linear-gradient(20deg, ${({ theme }) => lighten(0.5, adjustHue(290, theme.accent1))} 10%, ${({ theme }) => theme.accent1} 100%);` + : css`background: linear-gradient(20deg, ${({ theme }) => theme.accent1} 10%, ${({ theme }) => lighten(0.4, adjustHue(300, theme.accent1))} 100%);` + }; background-clip: text; -webkit-background-clip: text; @@ -170,7 +163,7 @@ const LandingButton = styled(BaseButton)` ` const ButtonCTA = styled(LandingButton)` - background: linear-gradient(93.06deg, ${({ theme }) => theme.accent1} 2.66%, ${({ theme }) => lighten(0.5, theme.accent1)} 98.99%); + background: linear-gradient(93.06deg, ${({ theme }) => theme.accent1} 2.66%, ${({ theme }) => lighten(0.3, theme.accent1)} 98.99%); border: none; color: ${({ theme }) => theme.white}; transition: ${({ theme }) => `all ${theme.transition.duration.medium} ${theme.transition.timing.ease}`}; @@ -254,18 +247,18 @@ const CardGrid = styled.div<{ cols: number }>` @media screen and (min-width: ${BREAKPOINTS.sm}px) { // At this screen size, we show up to 2 columns. grid-template-columns: ${({ cols }) => - Array.from(Array(cols === 2 ? 2 : 1)) - .map(() => '1fr') - .join(' ')}; + Array.from(Array(cols === 2 ? 2 : 1)) + .map(() => '1fr') + .join(' ')}; gap: 32px; } @media screen and (min-width: ${BREAKPOINTS.lg}px) { // at this screen size, always show the max number of columns grid-template-columns: ${({ cols }) => - Array.from(Array(cols)) - .map(() => '1fr') - .join(' ')}; + Array.from(Array(cols)) + .map(() => '1fr') + .join(' ')}; gap: 32px; } ` diff --git a/src/theme/colors.ts b/src/theme/colors.ts index c98db566cc9..8e45b09a8aa 100644 --- a/src/theme/colors.ts +++ b/src/theme/colors.ts @@ -106,8 +106,8 @@ export const colors = { surface3_dark: '#FFFFFF12', surface4_dark: '#FFFFFF20', surface5_dark: '#00000004', - accent1_dark: '#03982d', - accent2_dark: '#02222b', + accent1_dark: '#139c3a', + accent2_dark: '#022b24', neutral1_light: '#222222', neutral2_light: '#7D7D7D', neutral3_light: '#CECECE', @@ -116,8 +116,8 @@ export const colors = { surface3_light: '#22222212', surface4_light: '#FFFFFF64', surface5_light: '#00000004', - accent1_light: '#75ff72', - accent2_light: '#EFEFEF', + accent1_light: '#3dad5d', + accent2_light: '#d0ffdd', success: '#40B66B', critical: '#FF5F52', scrim: 'rgba(0, 0, 0, 0.60)', From 656af99512b0660e6341a0d84519592b25b775df Mon Sep 17 00:00:00 2001 From: KillariDev <killari@gmail.com> Date: Mon, 22 Jan 2024 13:07:13 +0200 Subject: [PATCH 7/8] fix linting and tests --- src/components/About/ProtocolBanner.tsx | 5 +- .../ChainSelectorRow.test.tsx.snap | 2 +- .../__snapshots__/SwapLineItem.test.tsx.snap | 56 +++++++++---------- .../SwapModalFooter.test.tsx.snap | 24 ++++---- .../UnsupportedCurrencyFooter.test.tsx.snap | 4 +- src/nft/components/icons.tsx | 8 ++- .../EmptyWalletContent.test.tsx.snap | 10 ++-- src/nft/css/sprinkles.css.ts | 1 - src/pages/Landing/index.tsx | 49 +++++++++++----- 9 files changed, 94 insertions(+), 65 deletions(-) diff --git a/src/components/About/ProtocolBanner.tsx b/src/components/About/ProtocolBanner.tsx index db2bb3d33c2..60e2b42de46 100644 --- a/src/components/About/ProtocolBanner.tsx +++ b/src/components/About/ProtocolBanner.tsx @@ -25,7 +25,10 @@ const Banner = styled.div<{ isDarkMode: boolean }>` background: ${({ isDarkMode, theme }) => isDarkMode ? `url(${meshSrc}), linear-gradient(90deg, ${colors.blueVibrant} 0%, ${colors.purple300} 100%)` - : `url(${meshSrc}), linear-gradient(90deg, ${darken(0.1, theme.accent1)} 0%, ${lighten(0.25, theme.accent1)} 100%);`}; + : `url(${meshSrc}), linear-gradient(90deg, ${darken(0.1, theme.accent1)} 0%, ${lighten( + 0.25, + theme.accent1 + )} 100%);`}; @media screen and (min-width: ${BREAKPOINTS.lg}px) { height: 140px; diff --git a/src/components/NavBar/__snapshots__/ChainSelectorRow.test.tsx.snap b/src/components/NavBar/__snapshots__/ChainSelectorRow.test.tsx.snap index 1f09ec7047f..71bea191afb 100644 --- a/src/components/NavBar/__snapshots__/ChainSelectorRow.test.tsx.snap +++ b/src/components/NavBar/__snapshots__/ChainSelectorRow.test.tsx.snap @@ -82,7 +82,7 @@ exports[`ChainSelectorRow should match snapshot for chainId 1 1`] = ` class="c3" > <svg - color="#75ff72" + color="#3dad5d" fill="none" height="20" width="20" diff --git a/src/components/swap/__snapshots__/SwapLineItem.test.tsx.snap b/src/components/swap/__snapshots__/SwapLineItem.test.tsx.snap index 2af18f5cb5e..55e079dc000 100644 --- a/src/components/swap/__snapshots__/SwapLineItem.test.tsx.snap +++ b/src/components/swap/__snapshots__/SwapLineItem.test.tsx.snap @@ -64,8 +64,8 @@ exports[`SwapLineItem.tsx exact input 1`] = ` cursor: pointer; -webkit-transition-duration: 125ms; transition-duration: 125ms; - color: #75ff72; - stroke: #75ff72; + color: #3dad5d; + stroke: #3dad5d; font-weight: 500; } @@ -477,8 +477,8 @@ exports[`SwapLineItem.tsx exact input 1`] = ` cursor: pointer; -webkit-transition-duration: 125ms; transition-duration: 125ms; - color: #75ff72; - stroke: #75ff72; + color: #3dad5d; + stroke: #3dad5d; font-weight: 500; } @@ -1494,8 +1494,8 @@ exports[`SwapLineItem.tsx exact input api 1`] = ` cursor: pointer; -webkit-transition-duration: 125ms; transition-duration: 125ms; - color: #75ff72; - stroke: #75ff72; + color: #3dad5d; + stroke: #3dad5d; font-weight: 500; } @@ -1907,8 +1907,8 @@ exports[`SwapLineItem.tsx exact input api 1`] = ` cursor: pointer; -webkit-transition-duration: 125ms; transition-duration: 125ms; - color: #75ff72; - stroke: #75ff72; + color: #3dad5d; + stroke: #3dad5d; font-weight: 500; } @@ -2924,8 +2924,8 @@ exports[`SwapLineItem.tsx exact output 1`] = ` cursor: pointer; -webkit-transition-duration: 125ms; transition-duration: 125ms; - color: #75ff72; - stroke: #75ff72; + color: #3dad5d; + stroke: #3dad5d; font-weight: 500; } @@ -3337,8 +3337,8 @@ exports[`SwapLineItem.tsx exact output 1`] = ` cursor: pointer; -webkit-transition-duration: 125ms; transition-duration: 125ms; - color: #75ff72; - stroke: #75ff72; + color: #3dad5d; + stroke: #3dad5d; font-weight: 500; } @@ -4354,8 +4354,8 @@ exports[`SwapLineItem.tsx fee on buy 1`] = ` cursor: pointer; -webkit-transition-duration: 125ms; transition-duration: 125ms; - color: #75ff72; - stroke: #75ff72; + color: #3dad5d; + stroke: #3dad5d; font-weight: 500; } @@ -4570,8 +4570,8 @@ exports[`SwapLineItem.tsx fee on buy 1`] = ` cursor: pointer; -webkit-transition-duration: 125ms; transition-duration: 125ms; - color: #75ff72; - stroke: #75ff72; + color: #3dad5d; + stroke: #3dad5d; font-weight: 500; } @@ -4973,8 +4973,8 @@ exports[`SwapLineItem.tsx fee on buy 1`] = ` cursor: pointer; -webkit-transition-duration: 125ms; transition-duration: 125ms; - color: #75ff72; - stroke: #75ff72; + color: #3dad5d; + stroke: #3dad5d; font-weight: 500; } @@ -5990,8 +5990,8 @@ exports[`SwapLineItem.tsx fee on sell 1`] = ` cursor: pointer; -webkit-transition-duration: 125ms; transition-duration: 125ms; - color: #75ff72; - stroke: #75ff72; + color: #3dad5d; + stroke: #3dad5d; font-weight: 500; } @@ -6206,8 +6206,8 @@ exports[`SwapLineItem.tsx fee on sell 1`] = ` cursor: pointer; -webkit-transition-duration: 125ms; transition-duration: 125ms; - color: #75ff72; - stroke: #75ff72; + color: #3dad5d; + stroke: #3dad5d; font-weight: 500; } @@ -6609,8 +6609,8 @@ exports[`SwapLineItem.tsx fee on sell 1`] = ` cursor: pointer; -webkit-transition-duration: 125ms; transition-duration: 125ms; - color: #75ff72; - stroke: #75ff72; + color: #3dad5d; + stroke: #3dad5d; font-weight: 500; } @@ -7608,8 +7608,8 @@ exports[`SwapLineItem.tsx preview exact in 1`] = ` cursor: pointer; -webkit-transition-duration: 125ms; transition-duration: 125ms; - color: #75ff72; - stroke: #75ff72; + color: #3dad5d; + stroke: #3dad5d; font-weight: 500; } @@ -8043,8 +8043,8 @@ exports[`SwapLineItem.tsx preview exact in 1`] = ` cursor: pointer; -webkit-transition-duration: 125ms; transition-duration: 125ms; - color: #75ff72; - stroke: #75ff72; + color: #3dad5d; + stroke: #3dad5d; font-weight: 500; } diff --git a/src/components/swap/__snapshots__/SwapModalFooter.test.tsx.snap b/src/components/swap/__snapshots__/SwapModalFooter.test.tsx.snap index 54e1d9c258b..6572754f623 100644 --- a/src/components/swap/__snapshots__/SwapModalFooter.test.tsx.snap +++ b/src/components/swap/__snapshots__/SwapModalFooter.test.tsx.snap @@ -412,7 +412,7 @@ exports[`SwapModalFooter.tsx matches base snapshot, test trade exact input 1`] = } .c5 { - background-color: #75ff72; + background-color: #3dad5d; font-size: 20px; font-weight: 535; padding: 16px; @@ -420,17 +420,17 @@ exports[`SwapModalFooter.tsx matches base snapshot, test trade exact input 1`] = } .c5:focus { - box-shadow: 0 0 0 1pt #5cff58; - background-color: #5cff58; + box-shadow: 0 0 0 1pt #369a53; + background-color: #369a53; } .c5:hover { - background-color: #5cff58; + background-color: #369a53; } .c5:active { - box-shadow: 0 0 0 1pt #43ff3f; - background-color: #43ff3f; + box-shadow: 0 0 0 1pt #308749; + background-color: #308749; } .c5:disabled { @@ -921,7 +921,7 @@ exports[`SwapModalFooter.tsx renders a preview trade while disabling submission } .c5 { - background-color: #75ff72; + background-color: #3dad5d; font-size: 20px; font-weight: 535; padding: 16px; @@ -929,17 +929,17 @@ exports[`SwapModalFooter.tsx renders a preview trade while disabling submission } .c5:focus { - box-shadow: 0 0 0 1pt #5cff58; - background-color: #5cff58; + box-shadow: 0 0 0 1pt #369a53; + background-color: #369a53; } .c5:hover { - background-color: #5cff58; + background-color: #369a53; } .c5:active { - box-shadow: 0 0 0 1pt #43ff3f; - background-color: #43ff3f; + box-shadow: 0 0 0 1pt #308749; + background-color: #308749; } .c5:disabled { diff --git a/src/components/swap/__snapshots__/UnsupportedCurrencyFooter.test.tsx.snap b/src/components/swap/__snapshots__/UnsupportedCurrencyFooter.test.tsx.snap index 16f57646c48..f635c8a7380 100644 --- a/src/components/swap/__snapshots__/UnsupportedCurrencyFooter.test.tsx.snap +++ b/src/components/swap/__snapshots__/UnsupportedCurrencyFooter.test.tsx.snap @@ -27,7 +27,7 @@ exports[`UnsupportedCurrencyFooter.tsx with unsupported tokens renders 1`] = ` } .c5 { - color: #75ff72; + color: #3dad5d; } .c2 { @@ -89,7 +89,7 @@ exports[`UnsupportedCurrencyFooter.tsx with unsupported tokens renders 1`] = ` .c3 { background-color: transparent; - color: #75ff72; + color: #3dad5d; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; diff --git a/src/nft/components/icons.tsx b/src/nft/components/icons.tsx index 094647f3104..944ca5f2e60 100644 --- a/src/nft/components/icons.tsx +++ b/src/nft/components/icons.tsx @@ -13,12 +13,16 @@ type SVGProps = React.SVGProps<SVGSVGElement> & { export const UniIcon = (props: SVGProps) => { return ( <svg {...props} viewBox="0 0 215 215" fill="none" xmlns="http://www.w3.org/2000/svg"> - <path fillRule="evenodd" clipRule="evenodd" d="M128.921 202.639C126.319 194.551 121.653 182.432 114.5 172C107.366 161.597 95.1085 150.133 84.9742 140.656L84.974 140.656C78.0609 134.191 72.1361 128.65 69.5002 125C63.0002 116 61.9999 107 64.9999 97C65.9999 107 70.9999 114.5 81.4999 118.5C85.8718 120.166 92.2159 121.219 99.0431 122.353C108.613 123.942 119.132 125.689 126.5 129.5C131.728 132.204 135.767 136.066 139.364 139.506C145.743 145.606 150.733 150.377 158.5 145C162.209 142.432 166.569 140.705 170.094 139.308C172.746 138.257 174.925 137.393 176 136.5C178.929 134.065 177.891 127.151 175.5 119.5C174.305 115.677 172.083 111.854 168.56 105.794L168.56 105.794C165.099 99.8396 160.383 91.7263 154.153 79.3321V101H89V39H130.137C128.595 37.0234 127.183 35.301 125.898 33.7336L125.898 33.7336C124.645 32.2058 123.513 30.8252 122.5 29.5C122.5 29.5 127 24.5 135.5 21C124 17.5 114 19 114 19L118.737 10.6405C115.05 10.2174 111.3 10 107.5 10C53.6523 10 10.0001 53.6522 10.0001 107.5C10.0001 161.348 53.6523 205 107.5 205C114.859 205 122.028 204.185 128.921 202.639ZM142 49H101V90H142V49Z" fill="currentColor" /> + <path + fillRule="evenodd" + clipRule="evenodd" + d="M128.921 202.639C126.319 194.551 121.653 182.432 114.5 172C107.366 161.597 95.1085 150.133 84.9742 140.656L84.974 140.656C78.0609 134.191 72.1361 128.65 69.5002 125C63.0002 116 61.9999 107 64.9999 97C65.9999 107 70.9999 114.5 81.4999 118.5C85.8718 120.166 92.2159 121.219 99.0431 122.353C108.613 123.942 119.132 125.689 126.5 129.5C131.728 132.204 135.767 136.066 139.364 139.506C145.743 145.606 150.733 150.377 158.5 145C162.209 142.432 166.569 140.705 170.094 139.308C172.746 138.257 174.925 137.393 176 136.5C178.929 134.065 177.891 127.151 175.5 119.5C174.305 115.677 172.083 111.854 168.56 105.794L168.56 105.794C165.099 99.8396 160.383 91.7263 154.153 79.3321V101H89V39H130.137C128.595 37.0234 127.183 35.301 125.898 33.7336L125.898 33.7336C124.645 32.2058 123.513 30.8252 122.5 29.5C122.5 29.5 127 24.5 135.5 21C124 17.5 114 19 114 19L118.737 10.6405C115.05 10.2174 111.3 10 107.5 10C53.6523 10 10.0001 53.6522 10.0001 107.5C10.0001 161.348 53.6523 205 107.5 205C114.859 205 122.028 204.185 128.921 202.639ZM142 49H101V90H142V49Z" + fill="currentColor" + /> </svg> ) } - export const ChevronUpIcon = ({ secondaryColor, secondaryWidth, diff --git a/src/nft/components/profile/view/__snapshots__/EmptyWalletContent.test.tsx.snap b/src/nft/components/profile/view/__snapshots__/EmptyWalletContent.test.tsx.snap index eaa79a897a9..0f3bfb6f8fe 100644 --- a/src/nft/components/profile/view/__snapshots__/EmptyWalletContent.test.tsx.snap +++ b/src/nft/components/profile/view/__snapshots__/EmptyWalletContent.test.tsx.snap @@ -46,7 +46,7 @@ exports[`EmptyWalletContent.tsx matches base snapshot 1`] = ` } .c5 { - background-color: #75ff72; + background-color: #3dad5d; padding: 10px 24px; color: #FFFFFF; width: -webkit-min-content; @@ -88,7 +88,7 @@ exports[`EmptyWalletContent.tsx matches base snapshot 1`] = ` /> </svg> <div - class="c1 c2 common__127l8hd0 sprinkles_fontWeight_medium_sm__rgw6ezd9 sprinkles_fontSize_28_sm__rgw6ezbx sprinkles_lineHeight_36_sm__rgw6ezel css-n8z49y" + class="c1 c2 common__127l8hd0 sprinkles_fontWeight_medium_sm__1jkzbi5d9 sprinkles_fontSize_28_sm__1jkzbi5bx sprinkles_lineHeight_36_sm__1jkzbi5el css-n8z49y" > No NFTs yet </div> @@ -128,7 +128,7 @@ exports[`EmptyWalletContent.tsx matches base snapshot 1`] = ` /> </svg> <div - class="c1 c2 common__127l8hd0 sprinkles_fontWeight_medium_sm__rgw6ezd9 sprinkles_fontSize_28_sm__rgw6ezbx sprinkles_lineHeight_36_sm__rgw6ezel css-n8z49y" + class="c1 c2 common__127l8hd0 sprinkles_fontWeight_medium_sm__1jkzbi5d9 sprinkles_fontSize_28_sm__1jkzbi5bx sprinkles_lineHeight_36_sm__1jkzbi5el css-n8z49y" > No tokens yet </div> @@ -174,7 +174,7 @@ exports[`EmptyWalletContent.tsx matches base snapshot 1`] = ` /> </svg> <div - class="c1 c2 common__127l8hd0 sprinkles_fontWeight_medium_sm__rgw6ezd9 sprinkles_fontSize_28_sm__rgw6ezbx sprinkles_lineHeight_36_sm__rgw6ezel css-n8z49y" + class="c1 c2 common__127l8hd0 sprinkles_fontWeight_medium_sm__1jkzbi5d9 sprinkles_fontSize_28_sm__1jkzbi5bx sprinkles_lineHeight_36_sm__1jkzbi5el css-n8z49y" > No activity yet </div> @@ -209,7 +209,7 @@ exports[`EmptyWalletContent.tsx matches base snapshot 1`] = ` /> </svg> <div - class="c1 c2 common__127l8hd0 sprinkles_fontWeight_medium_sm__rgw6ezd9 sprinkles_fontSize_28_sm__rgw6ezbx sprinkles_lineHeight_36_sm__rgw6ezel css-n8z49y" + class="c1 c2 common__127l8hd0 sprinkles_fontWeight_medium_sm__1jkzbi5d9 sprinkles_fontSize_28_sm__1jkzbi5bx sprinkles_lineHeight_36_sm__1jkzbi5el css-n8z49y" > No pools yet </div> diff --git a/src/nft/css/sprinkles.css.ts b/src/nft/css/sprinkles.css.ts index 2a3ba702a84..eee255ce0ff 100644 --- a/src/nft/css/sprinkles.css.ts +++ b/src/nft/css/sprinkles.css.ts @@ -315,7 +315,6 @@ const breakpoints = { xxxl: 1920, } - const layoutStyles = defineProperties({ conditions: { sm: {}, diff --git a/src/pages/Landing/index.tsx b/src/pages/Landing/index.tsx index 3c3a505f3ad..555d3850846 100644 --- a/src/pages/Landing/index.tsx +++ b/src/pages/Landing/index.tsx @@ -41,8 +41,12 @@ const Gradient = styled.div<{ isDarkMode: boolean }>` min-height: 550px; ${({ isDarkMode }) => isDarkMode - ? css`background: linear-gradient(rgba(8, 10, 24, 0) 0%, rgb(8 10 24 / 100%) 45%);` - : css`background: linear-gradient(rgba(255, 255, 255, 0) 0%, rgb(255 255 255 /100%) 45%);`}; + ? css` + background: linear-gradient(rgba(8, 10, 24, 0) 0%, rgb(8 10 24 / 100%) 45%); + ` + : css` + background: linear-gradient(rgba(255, 255, 255, 0) 0%, rgb(255 255 255 /100%) 45%); + `}; z-index: ${Z_INDEX.under_dropdown}; pointer-events: none; height: ${({ theme }) => `calc(100vh - ${theme.mobileBottomBarHeight}px)`}; @@ -70,7 +74,11 @@ const Glow = styled.div` position: absolute; top: 68px; bottom: 0; - background: radial-gradient(75% 75% at 50% 0%, ${({ theme }) => theme.accent1} 0%, ${({ theme }) => theme.accent2} 100%); + background: radial-gradient( + 75% 75% at 50% 0%, + ${({ theme }) => theme.accent1} 0%, + ${({ theme }) => theme.accent2} 100% + ); filter: blur(72px); border-radius: 24px; max-width: 480px; @@ -106,9 +114,20 @@ const TitleText = styled.h1<{ isDarkMode: boolean; $visible: boolean }>` margin: 0 0 24px; ${({ isDarkMode }) => isDarkMode - ? css`background: linear-gradient(20deg, ${({ theme }) => lighten(0.5, adjustHue(290, theme.accent1))} 10%, ${({ theme }) => theme.accent1} 100%);` - : css`background: linear-gradient(20deg, ${({ theme }) => theme.accent1} 10%, ${({ theme }) => lighten(0.4, adjustHue(300, theme.accent1))} 100%);` - }; + ? css` + background: linear-gradient( + 20deg, + ${({ theme }) => lighten(0.5, adjustHue(290, theme.accent1))} 10%, + ${({ theme }) => theme.accent1} 100% + ); + ` + : css` + background: linear-gradient( + 20deg, + ${({ theme }) => theme.accent1} 10%, + ${({ theme }) => lighten(0.4, adjustHue(300, theme.accent1))} 100% + ); + `}; background-clip: text; -webkit-background-clip: text; @@ -163,7 +182,11 @@ const LandingButton = styled(BaseButton)` ` const ButtonCTA = styled(LandingButton)` - background: linear-gradient(93.06deg, ${({ theme }) => theme.accent1} 2.66%, ${({ theme }) => lighten(0.3, theme.accent1)} 98.99%); + background: linear-gradient( + 93.06deg, + ${({ theme }) => theme.accent1} 2.66%, + ${({ theme }) => lighten(0.3, theme.accent1)} 98.99% + ); border: none; color: ${({ theme }) => theme.white}; transition: ${({ theme }) => `all ${theme.transition.duration.medium} ${theme.transition.timing.ease}`}; @@ -247,18 +270,18 @@ const CardGrid = styled.div<{ cols: number }>` @media screen and (min-width: ${BREAKPOINTS.sm}px) { // At this screen size, we show up to 2 columns. grid-template-columns: ${({ cols }) => - Array.from(Array(cols === 2 ? 2 : 1)) - .map(() => '1fr') - .join(' ')}; + Array.from(Array(cols === 2 ? 2 : 1)) + .map(() => '1fr') + .join(' ')}; gap: 32px; } @media screen and (min-width: ${BREAKPOINTS.lg}px) { // at this screen size, always show the max number of columns grid-template-columns: ${({ cols }) => - Array.from(Array(cols)) - .map(() => '1fr') - .join(' ')}; + Array.from(Array(cols)) + .map(() => '1fr') + .join(' ')}; gap: 32px; } ` From 88724a8a4e4c92a1d8d29f1f9d260daa63822e64 Mon Sep 17 00:00:00 2001 From: KillariDev <killari@gmail.com> Date: Tue, 23 Jan 2024 11:40:07 +0200 Subject: [PATCH 8/8] some renamings, remove token blocking (just warn), fix locale, --- cypress/e2e/wallet-dropdown.test.ts | 6 +++--- cypress/staging/t9n.test.ts | 4 ++-- src/components/SwitchLocaleLink/index.tsx | 2 +- .../TokenSafety/TokenSafetyIcon.tsx | 13 +----------- src/connection/index.ts | 6 +++--- src/constants/tokenSafety.tsx | 20 +------------------ src/constants/tokenSafetyLookup.ts | 1 - src/hooks/useAssetLogoSource.ts | 9 ++------- src/hooks/useTokenWarningColor.test.ts | 10 ---------- src/hooks/useTokenWarningColor.ts | 3 --- src/pages/Landing/index.tsx | 6 ++---- src/pages/WhatIsHorswap/index.tsx | 2 +- src/state/reducerTypeTest.ts | 1 - src/state/user/reducer.ts | 3 --- 14 files changed, 16 insertions(+), 70 deletions(-) diff --git a/cypress/e2e/wallet-dropdown.test.ts b/cypress/e2e/wallet-dropdown.test.ts index 37f12cf39a1..cffae79c532 100644 --- a/cypress/e2e/wallet-dropdown.test.ts +++ b/cypress/e2e/wallet-dropdown.test.ts @@ -23,15 +23,15 @@ describe('Wallet Dropdown', () => { function itChangesLocale() { it('should change locale', () => { - cy.contains('Uniswap available in: English').should('not.exist') + cy.contains('Horswap available in: English').should('not.exist') cy.get(getTestSelector('wallet-language-item')).contains('Afrikaans').click({ force: true }) cy.location('search').should('match', /\?lng=af-ZA$/) - cy.contains('Uniswap available in: English') + cy.contains('Horswap available in: English') cy.get(getTestSelector('wallet-language-item')).contains('English').click({ force: true }) cy.location('search').should('match', /\?lng=en-US$/) - cy.contains('Uniswap available in: English').should('not.exist') + cy.contains('Horswap available in: English').should('not.exist') }) } diff --git a/cypress/staging/t9n.test.ts b/cypress/staging/t9n.test.ts index d59fd7ec7dc..356a37f3a9b 100644 --- a/cypress/staging/t9n.test.ts +++ b/cypress/staging/t9n.test.ts @@ -4,7 +4,7 @@ describe('translations', () => { it('loads locale from the query param', () => { cy.visit('/?lng=fr-FR') cy.contains('Échanger') - cy.contains('Uniswap disponible en : English') + cy.contains('Horswap disponible en : English') }) it('loads locale from menu', () => { @@ -14,6 +14,6 @@ describe('translations', () => { cy.get(getTestSelector('wallet-language-item')).contains('français').click({ force: true }) cy.location('search').should('match', /\?lng=fr-FR$/) cy.contains('Échanger') - cy.contains('Uniswap disponible en : English') + cy.contains('Horswap disponible en : English') }) }) diff --git a/src/components/SwitchLocaleLink/index.tsx b/src/components/SwitchLocaleLink/index.tsx index a8a8e5a8492..36dd615ca50 100644 --- a/src/components/SwitchLocaleLink/index.tsx +++ b/src/components/SwitchLocaleLink/index.tsx @@ -39,7 +39,7 @@ export function SwitchLocaleLink() { return ( <Container> <Trans> - Uniswap available in:{' '} + Horswap available in:{' '} <StyledInternalLink onClick={onClick} to={to}> {LOCALE_LABEL[targetLocale]} </StyledInternalLink> diff --git a/src/components/TokenSafety/TokenSafetyIcon.tsx b/src/components/TokenSafety/TokenSafetyIcon.tsx index 2c50139ac73..81a12fb8942 100644 --- a/src/components/TokenSafety/TokenSafetyIcon.tsx +++ b/src/components/TokenSafety/TokenSafetyIcon.tsx @@ -1,5 +1,5 @@ import { Warning, WARNING_LEVEL } from 'constants/tokenSafety' -import { AlertTriangle, Slash } from 'react-feather' +import { AlertTriangle } from 'react-feather' import styled, { css } from 'styled-components' const WarningContainer = styled.div` @@ -18,19 +18,8 @@ const WarningIcon = styled(AlertTriangle)` color: ${({ theme }) => theme.neutral3}; ` -const BlockedIcon = styled(Slash)` - ${WarningIconStyle} - color: ${({ theme }) => theme.neutral2}; -` - export default function TokenSafetyIcon({ warning }: { warning: Warning | null }) { switch (warning?.level) { - case WARNING_LEVEL.BLOCKED: - return ( - <WarningContainer> - <BlockedIcon data-cy="blocked-icon" strokeWidth={2.5} /> - </WarningContainer> - ) case WARNING_LEVEL.UNKNOWN: return ( <WarningContainer> diff --git a/src/connection/index.ts b/src/connection/index.ts index 827b38df496..8b8cb226f56 100644 --- a/src/connection/index.ts +++ b/src/connection/index.ts @@ -6,7 +6,7 @@ import { MetaMask } from '@web3-react/metamask' import { Network } from '@web3-react/network' import { Connector } from '@web3-react/types' import GNOSIS_ICON from 'assets/images/gnosis.png' -import UNISWAP_LOGO from 'assets/svg/logo.svg' +import HORSWAP_LOGO from 'assets/svg/logo.svg' import COINBASE_ICON from 'assets/wallets/coinbase-icon.svg' import { isMobile } from 'utils/userAgent' @@ -83,8 +83,8 @@ const [web3CoinbaseWallet, web3CoinbaseWalletHooks] = initializeConnector<Coinba actions, options: { url: RPC_URLS[ChainId.MAINNET][0], - appName: 'Uniswap', - appLogoUrl: UNISWAP_LOGO, + appName: 'Horswap', + appLogoUrl: HORSWAP_LOGO, reloadOnDisconnect: false, }, onError, diff --git a/src/constants/tokenSafety.tsx b/src/constants/tokenSafety.tsx index ca19d0e3fb3..0cc1609c6f4 100644 --- a/src/constants/tokenSafety.tsx +++ b/src/constants/tokenSafety.tsx @@ -9,7 +9,6 @@ export const TOKEN_SAFETY_ARTICLE = 'https://support.uniswap.org/hc/en-us/articl export enum WARNING_LEVEL { MEDIUM, UNKNOWN, - BLOCKED, } export function getWarningCopy(warning: Warning | null, plural = false) { @@ -37,15 +36,6 @@ export function getWarningCopy(warning: Warning | null, plural = false) { ) description = <Trans>Always conduct your own research before trading.</Trans> break - case WARNING_LEVEL.BLOCKED: - description = ( - <Plural - value={plural ? 2 : 1} - _1="You can't trade this token using the Uniswap App." - other="You can't trade these tokens using the Uniswap App." - /> - ) - break } } return { heading, description } @@ -70,12 +60,6 @@ const StrongWarning: Warning = { canProceed: true, } -const BlockedWarning: Warning = { - level: WARNING_LEVEL.BLOCKED, - message: <Trans>Not available</Trans>, - canProceed: false, -} - export const NotFoundWarning: Warning = { level: WARNING_LEVEL.UNKNOWN, message: <Trans>Token not found</Trans>, @@ -93,10 +77,8 @@ export function checkWarning(tokenAddress: string, chainId?: number | null) { return MediumWarning case TOKEN_LIST_TYPES.UNKNOWN: return StrongWarning - case TOKEN_LIST_TYPES.BLOCKED: - return BlockedWarning case TOKEN_LIST_TYPES.BROKEN: - return BlockedWarning + return StrongWarning } } diff --git a/src/constants/tokenSafetyLookup.ts b/src/constants/tokenSafetyLookup.ts index ba03e207c53..125780aa00e 100644 --- a/src/constants/tokenSafetyLookup.ts +++ b/src/constants/tokenSafetyLookup.ts @@ -10,7 +10,6 @@ export enum TOKEN_LIST_TYPES { UNI_DEFAULT = 1, UNI_EXTENDED, UNKNOWN, - BLOCKED, BROKEN, } diff --git a/src/hooks/useAssetLogoSource.ts b/src/hooks/useAssetLogoSource.ts index d8772c8e31f..3c95ef12856 100644 --- a/src/hooks/useAssetLogoSource.ts +++ b/src/hooks/useAssetLogoSource.ts @@ -1,6 +1,5 @@ import tokenLogoLookup from 'constants/tokenLogoLookup' import { isCelo, nativeOnChain } from 'constants/tokens' -import { checkWarning, WARNING_LEVEL } from 'constants/tokenSafety' import { chainIdToNetworkName, getNativeLogoURI } from 'lib/hooks/useCurrencyLogoURIs' import uriToHttp from 'lib/utils/uriToHttp' import { useCallback, useEffect, useState } from 'react' @@ -66,17 +65,13 @@ export default function useAssetLogoSource( isNative?: boolean, backupImg?: string | null ): [string | undefined, () => void] { - const hideLogo = Boolean(address && checkWarning(address, chainId)?.level === WARNING_LEVEL.BLOCKED) - const [current, setCurrent] = useState<string | undefined>( - hideLogo ? undefined : getInitialUrl(address, chainId, isNative, backupImg) - ) + const [current, setCurrent] = useState<string | undefined>(getInitialUrl(address, chainId, isNative, backupImg)) const [fallbackSrcs, setFallbackSrcs] = useState<string[] | undefined>(undefined) useEffect(() => { - if (hideLogo) return setCurrent(getInitialUrl(address, chainId, isNative)) setFallbackSrcs(undefined) - }, [address, chainId, hideLogo, isNative]) + }, [address, chainId, isNative]) const nextSrc = useCallback(() => { if (current) { diff --git a/src/hooks/useTokenWarningColor.test.ts b/src/hooks/useTokenWarningColor.test.ts index da031227eed..cb172d55f44 100644 --- a/src/hooks/useTokenWarningColor.test.ts +++ b/src/hooks/useTokenWarningColor.test.ts @@ -16,11 +16,6 @@ describe('Token Warning Colors', () => { const { result } = renderHook(() => useTokenWarningColor(WARNING_LEVEL.UNKNOWN)) expect(result.current).toEqual(lightDeprecatedTheme.deprecated_accentFailureSoft) }) - - it('blocked', () => { - const { result } = renderHook(() => useTokenWarningColor(WARNING_LEVEL.BLOCKED)) - expect(result.current).toEqual(lightTheme.surface3) - }) }) describe('useTokenWarningTextColor', () => { @@ -33,10 +28,5 @@ describe('Token Warning Colors', () => { const { result } = renderHook(() => useTokenWarningTextColor(WARNING_LEVEL.UNKNOWN)) expect(result.current).toEqual(lightTheme.critical) }) - - it('blocked', () => { - const { result } = renderHook(() => useTokenWarningTextColor(WARNING_LEVEL.BLOCKED)) - expect(result.current).toEqual(lightTheme.neutral2) - }) }) }) diff --git a/src/hooks/useTokenWarningColor.ts b/src/hooks/useTokenWarningColor.ts index 6062d4b16bf..f1d4869c7e3 100644 --- a/src/hooks/useTokenWarningColor.ts +++ b/src/hooks/useTokenWarningColor.ts @@ -9,8 +9,6 @@ export const useTokenWarningTextColor = (level: WARNING_LEVEL) => { return theme.deprecated_accentWarning case WARNING_LEVEL.UNKNOWN: return theme.critical - case WARNING_LEVEL.BLOCKED: - return theme.neutral2 } } @@ -19,7 +17,6 @@ export const useTokenWarningColor = (level: WARNING_LEVEL) => { switch (level) { case WARNING_LEVEL.MEDIUM: - case WARNING_LEVEL.BLOCKED: return theme.surface3 case WARNING_LEVEL.UNKNOWN: return theme.deprecated_accentFailureSoft diff --git a/src/pages/Landing/index.tsx b/src/pages/Landing/index.tsx index 555d3850846..324d69bf005 100644 --- a/src/pages/Landing/index.tsx +++ b/src/pages/Landing/index.tsx @@ -13,7 +13,6 @@ import { ArrowDownCircle } from 'react-feather' import { Navigate, useLocation, useNavigate } from 'react-router-dom' import { Link as NativeLink } from 'react-router-dom' import { useAppSelector } from 'state/hooks' -import { AppState } from 'state/reducer' import styled, { css } from 'styled-components' import { BREAKPOINTS } from 'theme' import { useIsDarkMode } from 'theme/components/ThemeToggle' @@ -327,7 +326,6 @@ export default function Landing() { const isDarkMode = useIsDarkMode() const cardsRef = useRef<HTMLDivElement>(null) const selectedWallet = useAppSelector((state) => state.user.selectedWallet) - const originCountry = useAppSelector((state: AppState) => state.user.originCountry) const cards = MAIN_CARDS const extraCards = MORE_CARDS @@ -360,10 +358,10 @@ export default function Landing() { <Glow /> </GlowContainer> <ContentContainer isDarkMode={isDarkMode}> - <TitleText isDarkMode={isDarkMode} $visible={!!originCountry}> + <TitleText isDarkMode={isDarkMode} $visible={true}> <Trans>Trade crypto with confidence</Trans> </TitleText> - <SubTextContainer $visible={!!originCountry}> + <SubTextContainer $visible={true}> <SubText> <Trans>Buy, sell, and explore tokens</Trans> </SubText> diff --git a/src/pages/WhatIsHorswap/index.tsx b/src/pages/WhatIsHorswap/index.tsx index da6cf3f78eb..6f2ffd8d933 100644 --- a/src/pages/WhatIsHorswap/index.tsx +++ b/src/pages/WhatIsHorswap/index.tsx @@ -68,7 +68,7 @@ Here are the significant changes: - Removed claim UNI tokens popup - Added docker building and deployment to IPFS -You can see all the changes by [comparing Horseswap to Uniswap Interface V4.266.2](https://github.com/Uniswap/interface/compare/v4.266.2...DarkFlorist:Horswap:main). You can also find the whole codebase in [GitHub](https://github.com/DarkFlorist/Horswap/). +You can see all the changes by [comparing Horswap to Uniswap Interface V4.266.2](https://github.com/Uniswap/interface/compare/v4.266.2...DarkFlorist:Horswap:main). You can also find the whole codebase in [GitHub](https://github.com/DarkFlorist/Horswap/). `.replace(/[\n\r]/g, '\n')} /> </MarkDownWrapper> diff --git a/src/state/reducerTypeTest.ts b/src/state/reducerTypeTest.ts index e98f43b89fc..8d79c7308ac 100644 --- a/src/state/reducerTypeTest.ts +++ b/src/state/reducerTypeTest.ts @@ -83,7 +83,6 @@ interface ExpectedUserState { timestamp: number hideBaseWalletBanner: boolean showSurveyPopup?: boolean - originCountry?: string } assert<Equals<UserState, ExpectedUserState>>() diff --git a/src/state/user/reducer.ts b/src/state/user/reducer.ts index 5ee8267d187..dbc9cce915c 100644 --- a/src/state/user/reducer.ts +++ b/src/state/user/reducer.ts @@ -46,8 +46,6 @@ export interface UserState { hideBaseWalletBanner: boolean // undefined means has not gone through A/B split yet showSurveyPopup?: boolean - - originCountry?: string } function pairKey(token0Address: string, token1Address: string) { @@ -66,7 +64,6 @@ export const initialState: UserState = { timestamp: currentTimestamp(), hideBaseWalletBanner: false, showSurveyPopup: undefined, - originCountry: undefined, } const userSlice = createSlice({