Skip to content

Commit f3a4764

Browse files
authored
chore: merge main into explore (#4281)
merge main into explore
1 parent 61865c6 commit f3a4764

Some content is hidden

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

44 files changed

+318
-64
lines changed

.env

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
REACT_APP_INFURA_KEY="4bf032f2d38a4ed6bb975b80d6340847"
22
REACT_APP_FORTMATIC_KEY="pk_live_357F77728B8EB880"
3-
REACT_APP_LOCALES="locales"

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
lts/*
1+
14

babel-plugin-macros.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const isDev = process.env.NODE_ENV !== 'production'
1+
const isDev = process.env.NODE_ENV === 'development'
22

33
module.exports = {
44
styledComponents: {

src/components/Header/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import useScrollPosition from '@react-hook/window-scroll'
33
import { useWeb3React } from '@web3-react/core'
44
import { getChainInfoOrDefault } from 'constants/chainInfo'
55
import { SupportedChainId } from 'constants/chains'
6-
import { Phase0Variant, usePhase0Flag } from 'featureFlag'
6+
import { Phase0Variant, usePhase0Flag } from 'featureFlags/flags/phase0'
77
import useTheme from 'hooks/useTheme'
88
import { darken } from 'polished'
99
import { NavLink, useLocation } from 'react-router-dom'

src/featureFlags/flags/phase0.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { BaseVariant, useBaseFlag } from '../index'
2+
3+
export function usePhase0Flag(): BaseVariant {
4+
return useBaseFlag('phase0')
5+
}
6+
7+
export { BaseVariant as Phase0Variant }

src/featureFlag/index.tsx renamed to src/featureFlags/index.tsx

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -34,34 +34,17 @@ export function useFeatureFlagsIsLoaded(): boolean {
3434
return useFeatureFlagsContext().isLoaded
3535
}
3636

37-
// feature flag hooks
38-
39-
export enum Phase0Variant {
40-
Control = 'Control',
41-
Enabled = 'Enabled',
42-
}
43-
44-
export function usePhase0Flag(): Phase0Variant {
45-
switch (useFeatureFlagsContext().flags['phase0']) {
46-
case 'enabled':
47-
return Phase0Variant.Enabled
48-
case 'control':
49-
default:
50-
return Phase0Variant.Control
51-
}
52-
}
53-
54-
enum Phase1Variant {
37+
export enum BaseVariant {
5538
Control = 'Control',
5639
Enabled = 'Enabled',
5740
}
5841

59-
export function usePhase1Flag(): Phase1Variant {
60-
switch (useFeatureFlagsContext().flags['phase1']) {
42+
export function useBaseFlag(flag: string): BaseVariant {
43+
switch (useFeatureFlagsContext().flags[flag]) {
6144
case 'enabled':
62-
return Phase1Variant.Enabled
45+
return BaseVariant.Enabled
6346
case 'control':
6447
default:
65-
return Phase1Variant.Control
48+
return BaseVariant.Control
6649
}
6750
}

src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import 'inter-ui'
33
import 'polyfills'
44
import 'components/analytics'
55

6-
import { FeatureFlagsProvider } from 'featureFlag'
6+
import { FeatureFlagsProvider } from 'featureFlags'
77
import { BlockNumberProvider } from 'lib/hooks/useBlockNumber'
88
import { MulticallUpdater } from 'lib/state/multicall'
99
import { StrictMode } from 'react'

src/lib/i18n.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const plurals: LocalePlural = {
7979
export async function dynamicActivate(locale: SupportedLocale) {
8080
i18n.loadLocaleData(locale, { plurals: () => plurals[locale] })
8181
try {
82-
const catalog = await import(`${process.env.REACT_APP_LOCALES}/${locale}.js`)
82+
const catalog = await import(`locales/${locale}.js`)
8383
// Bundlers will either export it as default or as a named export named default.
8484
i18n.load(locale, catalog.messages || catalog.default.messages)
8585
} catch {}

src/locales/af-ZA.po

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ msgstr ""
33
"Project-Id-Version: uniswap-interface\n"
44
"Report-Msgid-Bugs-To: \n"
55
"POT-Creation-Date: \n"
6-
"PO-Revision-Date: 2022-07-21 14:04\n"
6+
"PO-Revision-Date: 2022-07-29 20:04\n"
77
"Last-Translator: \n"
88
"Language: af_ZA\n"
99
"Language-Team: Afrikaans\n"
@@ -116,6 +116,10 @@ msgstr "<0> 🎉</0> Welkom by die Unicorn span :) <1> 🎉</1>"
116116
msgid "A minimum threshold of 0.25% of the total UNI supply is required to submit proposals"
117117
msgstr "'N Minimum drempel van 0,25% van die totale UNI-aanbod is nodig om voorstelle in te dien"
118118

119+
#: src/components/swap/PriceImpactWarning.tsx
120+
msgid "A swap of this size may have a high price impact, given the current liquidity in the pool. There may be a large difference between the amount of your input token and what you will receive in the output token"
121+
msgstr "'n Ruil van hierdie grootte kan 'n hoë prysimpak hê, gegewe die huidige likiditeit in die swembad. Daar kan 'n groot verskil wees tussen die hoeveelheid van jou invoertoken en wat jy in die uitvoertoken sal ontvang"
122+
119123
#: src/components/Menu/index.tsx
120124
msgid "About"
121125
msgstr "Oor"
@@ -1328,6 +1332,10 @@ msgstr "Prysimpak te hoog"
13281332
msgid "Price Updated"
13291333
msgstr "Prys opgedateer"
13301334

1335+
#: src/components/swap/PriceImpactWarning.tsx
1336+
msgid "Price impact warning"
1337+
msgstr "Prys impak waarskuwing"
1338+
13311339
#: src/pages/Pool/PositionPage.tsx
13321340
msgid "Price range"
13331341
msgstr "Prysklas"

src/locales/ar-SA.po

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ msgstr ""
33
"Project-Id-Version: uniswap-interface\n"
44
"Report-Msgid-Bugs-To: \n"
55
"POT-Creation-Date: \n"
6-
"PO-Revision-Date: 2022-07-21 14:04\n"
6+
"PO-Revision-Date: 2022-07-29 20:04\n"
77
"Last-Translator: \n"
88
"Language: ar_SA\n"
99
"Language-Team: Arabic\n"
@@ -116,6 +116,10 @@ msgstr "<0>🎉 </0>مرحبًا بكم في فريق:) <1>🎉</1>"
116116
msgid "A minimum threshold of 0.25% of the total UNI supply is required to submit proposals"
117117
msgstr "مطلوب حد أدنى قدره 0.25٪ من إجمالي إمداد UNI لتقديم العروض"
118118

119+
#: src/components/swap/PriceImpactWarning.tsx
120+
msgid "A swap of this size may have a high price impact, given the current liquidity in the pool. There may be a large difference between the amount of your input token and what you will receive in the output token"
121+
msgstr "قد يكون لمقايضة بهذا الحجم تأثير كبير على السعر ، بالنظر إلى السيولة الحالية في المجمع. قد يكون هناك اختلاف كبير بين مقدار رمز الإدخال الخاص بك وما ستحصل عليه في رمز الإخراج"
122+
119123
#: src/components/Menu/index.tsx
120124
msgid "About"
121125
msgstr "حول"
@@ -1328,6 +1332,10 @@ msgstr "تأثير السعر مرتفع للغاية"
13281332
msgid "Price Updated"
13291333
msgstr "تم تحديث السعر"
13301334

1335+
#: src/components/swap/PriceImpactWarning.tsx
1336+
msgid "Price impact warning"
1337+
msgstr "تحذير من تأثير السعر"
1338+
13311339
#: src/pages/Pool/PositionPage.tsx
13321340
msgid "Price range"
13331341
msgstr "نطاق السعر"

0 commit comments

Comments
 (0)