Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
REACT_APP_INFURA_KEY="4bf032f2d38a4ed6bb975b80d6340847"
REACT_APP_FORTMATIC_KEY="pk_live_357F77728B8EB880"
REACT_APP_LOCALES="locales"
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/*
14
2 changes: 1 addition & 1 deletion babel-plugin-macros.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const isDev = process.env.NODE_ENV !== 'production'
const isDev = process.env.NODE_ENV === 'development'

module.exports = {
styledComponents: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import useScrollPosition from '@react-hook/window-scroll'
import { useWeb3React } from '@web3-react/core'
import { getChainInfoOrDefault } from 'constants/chainInfo'
import { SupportedChainId } from 'constants/chains'
import { Phase0Variant, usePhase0Flag } from 'featureFlag'
import { Phase0Variant, usePhase0Flag } from 'featureFlags/flags/phase0'
import useTheme from 'hooks/useTheme'
import { darken } from 'polished'
import { NavLink, useLocation } from 'react-router-dom'
Expand Down
7 changes: 7 additions & 0 deletions src/featureFlags/flags/phase0.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { BaseVariant, useBaseFlag } from '../index'

export function usePhase0Flag(): BaseVariant {
return useBaseFlag('phase0')
}

export { BaseVariant as Phase0Variant }
27 changes: 5 additions & 22 deletions src/featureFlag/index.tsx → src/featureFlags/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,34 +34,17 @@ export function useFeatureFlagsIsLoaded(): boolean {
return useFeatureFlagsContext().isLoaded
}

// feature flag hooks

export enum Phase0Variant {
Control = 'Control',
Enabled = 'Enabled',
}

export function usePhase0Flag(): Phase0Variant {
switch (useFeatureFlagsContext().flags['phase0']) {
case 'enabled':
return Phase0Variant.Enabled
case 'control':
default:
return Phase0Variant.Control
}
}

enum Phase1Variant {
export enum BaseVariant {
Control = 'Control',
Enabled = 'Enabled',
}

export function usePhase1Flag(): Phase1Variant {
switch (useFeatureFlagsContext().flags['phase1']) {
export function useBaseFlag(flag: string): BaseVariant {
switch (useFeatureFlagsContext().flags[flag]) {
case 'enabled':
return Phase1Variant.Enabled
return BaseVariant.Enabled
case 'control':
default:
return Phase1Variant.Control
return BaseVariant.Control
}
}
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'inter-ui'
import 'polyfills'
import 'components/analytics'

import { FeatureFlagsProvider } from 'featureFlag'
import { FeatureFlagsProvider } from 'featureFlags'
import { BlockNumberProvider } from 'lib/hooks/useBlockNumber'
import { MulticallUpdater } from 'lib/state/multicall'
import { StrictMode } from 'react'
Expand Down
2 changes: 1 addition & 1 deletion src/lib/i18n.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const plurals: LocalePlural = {
export async function dynamicActivate(locale: SupportedLocale) {
i18n.loadLocaleData(locale, { plurals: () => plurals[locale] })
try {
const catalog = await import(`${process.env.REACT_APP_LOCALES}/${locale}.js`)
const catalog = await import(`locales/${locale}.js`)
// Bundlers will either export it as default or as a named export named default.
i18n.load(locale, catalog.messages || catalog.default.messages)
} catch {}
Expand Down
10 changes: 9 additions & 1 deletion src/locales/af-ZA.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: uniswap-interface\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2022-07-21 14:04\n"
"PO-Revision-Date: 2022-07-29 20:04\n"
"Last-Translator: \n"
"Language: af_ZA\n"
"Language-Team: Afrikaans\n"
Expand Down Expand Up @@ -116,6 +116,10 @@ msgstr "<0> 🎉</0> Welkom by die Unicorn span :) <1> 🎉</1>"
msgid "A minimum threshold of 0.25% of the total UNI supply is required to submit proposals"
msgstr "'N Minimum drempel van 0,25% van die totale UNI-aanbod is nodig om voorstelle in te dien"

#: src/components/swap/PriceImpactWarning.tsx
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"
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"

#: src/components/Menu/index.tsx
msgid "About"
msgstr "Oor"
Expand Down Expand Up @@ -1328,6 +1332,10 @@ msgstr "Prysimpak te hoog"
msgid "Price Updated"
msgstr "Prys opgedateer"

#: src/components/swap/PriceImpactWarning.tsx
msgid "Price impact warning"
msgstr "Prys impak waarskuwing"

#: src/pages/Pool/PositionPage.tsx
msgid "Price range"
msgstr "Prysklas"
Expand Down
10 changes: 9 additions & 1 deletion src/locales/ar-SA.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: uniswap-interface\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2022-07-21 14:04\n"
"PO-Revision-Date: 2022-07-29 20:04\n"
"Last-Translator: \n"
"Language: ar_SA\n"
"Language-Team: Arabic\n"
Expand Down Expand Up @@ -116,6 +116,10 @@ msgstr "<0>🎉 </0>مرحبًا بكم في فريق:) <1>🎉</1>"
msgid "A minimum threshold of 0.25% of the total UNI supply is required to submit proposals"
msgstr "مطلوب حد أدنى قدره 0.25٪ من إجمالي إمداد UNI لتقديم العروض"

#: src/components/swap/PriceImpactWarning.tsx
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"
msgstr "قد يكون لمقايضة بهذا الحجم تأثير كبير على السعر ، بالنظر إلى السيولة الحالية في المجمع. قد يكون هناك اختلاف كبير بين مقدار رمز الإدخال الخاص بك وما ستحصل عليه في رمز الإخراج"

#: src/components/Menu/index.tsx
msgid "About"
msgstr "حول"
Expand Down Expand Up @@ -1328,6 +1332,10 @@ msgstr "تأثير السعر مرتفع للغاية"
msgid "Price Updated"
msgstr "تم تحديث السعر"

#: src/components/swap/PriceImpactWarning.tsx
msgid "Price impact warning"
msgstr "تحذير من تأثير السعر"

#: src/pages/Pool/PositionPage.tsx
msgid "Price range"
msgstr "نطاق السعر"
Expand Down
10 changes: 9 additions & 1 deletion src/locales/ca-ES.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: uniswap-interface\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2022-07-21 14:04\n"
"PO-Revision-Date: 2022-07-29 20:04\n"
"Last-Translator: \n"
"Language: ca_ES\n"
"Language-Team: Catalan\n"
Expand Down Expand Up @@ -116,6 +116,10 @@ msgstr "<0>🎉</0> Benvingut a l'equip Unicorn :) <1> 🎉</1>"
msgid "A minimum threshold of 0.25% of the total UNI supply is required to submit proposals"
msgstr "Per presentar les propostes es requereix un llindar mínim del 0,25% del subministrament total d’UNI"

#: src/components/swap/PriceImpactWarning.tsx
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"
msgstr "Un swap d'aquesta mida pot tenir un alt impacte en els preus, donada la liquiditat actual del pool. Pot haver-hi una gran diferència entre la quantitat del testimoni d'entrada i el que rebrà al testimoni de sortida"

#: src/components/Menu/index.tsx
msgid "About"
msgstr "Sobre"
Expand Down Expand Up @@ -1328,6 +1332,10 @@ msgstr "L’impacte en el preu és massa alt"
msgid "Price Updated"
msgstr "Preu actualitzat"

#: src/components/swap/PriceImpactWarning.tsx
msgid "Price impact warning"
msgstr "Avís d'impacte dels preus"

#: src/pages/Pool/PositionPage.tsx
msgid "Price range"
msgstr "Gamma de preus"
Expand Down
10 changes: 9 additions & 1 deletion src/locales/cs-CZ.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: uniswap-interface\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2022-07-21 14:04\n"
"PO-Revision-Date: 2022-07-29 20:04\n"
"Last-Translator: \n"
"Language: cs_CZ\n"
"Language-Team: Czech\n"
Expand Down Expand Up @@ -116,6 +116,10 @@ msgstr "<0>🎉 </0>Vítejte v týmu Unicorn :) <1>🎉</1>"
msgid "A minimum threshold of 0.25% of the total UNI supply is required to submit proposals"
msgstr "K podání návrhů je nutná minimální hranice 0,25% z celkové nabídky UNI"

#: src/components/swap/PriceImpactWarning.tsx
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"
msgstr "Swap této velikosti může mít vysoký dopad na cenu vzhledem k aktuální likviditě v poolu. Mezi množstvím vašeho vstupního tokenu a tím, co obdržíte ve výstupním tokenu, může být velký rozdíl"

#: src/components/Menu/index.tsx
msgid "About"
msgstr "O aplikaci"
Expand Down Expand Up @@ -1328,6 +1332,10 @@ msgstr "Příliš vysoký dopad ceny"
msgid "Price Updated"
msgstr "Cena byla aktualizována"

#: src/components/swap/PriceImpactWarning.tsx
msgid "Price impact warning"
msgstr "Upozornění na cenový dopad"

#: src/pages/Pool/PositionPage.tsx
msgid "Price range"
msgstr "Cenové rozpětí"
Expand Down
10 changes: 9 additions & 1 deletion src/locales/da-DK.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: uniswap-interface\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2022-07-21 14:04\n"
"PO-Revision-Date: 2022-07-29 20:04\n"
"Last-Translator: \n"
"Language: da_DK\n"
"Language-Team: Danish\n"
Expand Down Expand Up @@ -116,6 +116,10 @@ msgstr "<0>🎉 </0>Velkommen til team Unicorn :) <1>🎉</1>"
msgid "A minimum threshold of 0.25% of the total UNI supply is required to submit proposals"
msgstr "En minimumstærskel på 0,25% af den samlede UNI-forsyning kræves for at indsende forslag"

#: src/components/swap/PriceImpactWarning.tsx
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"
msgstr "En swap af denne størrelse kan have en høj prispåvirkning, givet den nuværende likviditet i puljen. Der kan være stor forskel på mængden af dit input-token, og hvad du vil modtage i output-tokenet"

#: src/components/Menu/index.tsx
msgid "About"
msgstr "Om"
Expand Down Expand Up @@ -1328,6 +1332,10 @@ msgstr "Prispåvirkning for høj"
msgid "Price Updated"
msgstr "Pris opdateret"

#: src/components/swap/PriceImpactWarning.tsx
msgid "Price impact warning"
msgstr "Advarsel om prispåvirkning"

#: src/pages/Pool/PositionPage.tsx
msgid "Price range"
msgstr "Prisinterval"
Expand Down
10 changes: 9 additions & 1 deletion src/locales/de-DE.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: uniswap-interface\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2022-07-21 14:04\n"
"PO-Revision-Date: 2022-07-29 20:04\n"
"Last-Translator: \n"
"Language: de_DE\n"
"Language-Team: German\n"
Expand Down Expand Up @@ -116,6 +116,10 @@ msgstr "<0>🎉 </0>Willkommen im Team Unicorn :) <1>🎉</1>"
msgid "A minimum threshold of 0.25% of the total UNI supply is required to submit proposals"
msgstr "Für das Einreichen von Anträgen ist eine Mindestschwelle von 0,25% des gesamten UNI-Angebots erforderlich"

#: src/components/swap/PriceImpactWarning.tsx
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"
msgstr "Ein Swap dieser Größe kann angesichts der aktuellen Liquidität im Pool einen hohen Preiseffekt haben. Es kann einen großen Unterschied zwischen der Menge Ihres Eingabe-Tokens und dem geben, was Sie als Ausgabe-Token erhalten"

#: src/components/Menu/index.tsx
msgid "About"
msgstr "Über"
Expand Down Expand Up @@ -1328,6 +1332,10 @@ msgstr "Preiseinfluss zu hoch"
msgid "Price Updated"
msgstr "Preis aktualisiert"

#: src/components/swap/PriceImpactWarning.tsx
msgid "Price impact warning"
msgstr "Preisauswirkungswarnung"

#: src/pages/Pool/PositionPage.tsx
msgid "Price range"
msgstr "Preisbereich"
Expand Down
10 changes: 9 additions & 1 deletion src/locales/el-GR.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: uniswap-interface\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2022-07-21 14:04\n"
"PO-Revision-Date: 2022-07-29 20:04\n"
"Last-Translator: \n"
"Language: el_GR\n"
"Language-Team: Greek\n"
Expand Down Expand Up @@ -116,6 +116,10 @@ msgstr "<0>🎉 </0>Καλώς ήρθατε στην ομάδα Unicorn :) <1>
msgid "A minimum threshold of 0.25% of the total UNI supply is required to submit proposals"
msgstr "Απαιτείται ελάχιστο όριο 0,25% της συνολικής προσφοράς UNI για την υποβολή προτάσεων"

#: src/components/swap/PriceImpactWarning.tsx
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"
msgstr "Μια ανταλλαγή αυτού του μεγέθους μπορεί να έχει υψηλό αντίκτυπο στην τιμή, δεδομένης της τρέχουσας ρευστότητας στη συγκέντρωση. Μπορεί να υπάρχει μεγάλη διαφορά μεταξύ της ποσότητας του διακριτικού εισόδου και αυτού που θα λάβετε στο διακριτικό εξόδου"

#: src/components/Menu/index.tsx
msgid "About"
msgstr "Σχετικά με εμάς"
Expand Down Expand Up @@ -1328,6 +1332,10 @@ msgstr "Πολύ υψηλή επίδραση σε τιμή"
msgid "Price Updated"
msgstr "Η Τιμή Ενημερώθηκε"

#: src/components/swap/PriceImpactWarning.tsx
msgid "Price impact warning"
msgstr "Προειδοποίηση επίπτωσης στην τιμή"

#: src/pages/Pool/PositionPage.tsx
msgid "Price range"
msgstr "Εύρος τιμών"
Expand Down
10 changes: 9 additions & 1 deletion src/locales/es-ES.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: uniswap-interface\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2022-07-21 14:04\n"
"PO-Revision-Date: 2022-07-29 20:04\n"
"Last-Translator: \n"
"Language: es_ES\n"
"Language-Team: Spanish\n"
Expand Down Expand Up @@ -116,6 +116,10 @@ msgstr "<0>🎉 </0>Bienvenido al equipo Unicorn :) <1>🎉</1>"
msgid "A minimum threshold of 0.25% of the total UNI supply is required to submit proposals"
msgstr "Se requiere un umbral mínimo del 0,25% del suministro total de UNI para presentar propuestas."

#: src/components/swap/PriceImpactWarning.tsx
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"
msgstr "Un swap de este tamaño puede tener un alto impacto en el precio, dada la liquidez actual en el grupo. Puede haber una gran diferencia entre la cantidad de su token de entrada y lo que recibirá en el token de salida"

#: src/components/Menu/index.tsx
msgid "About"
msgstr "Acerca de"
Expand Down Expand Up @@ -1328,6 +1332,10 @@ msgstr "El Impacto de precios es demasiado alto"
msgid "Price Updated"
msgstr "Precio actualizado"

#: src/components/swap/PriceImpactWarning.tsx
msgid "Price impact warning"
msgstr "Advertencia de impacto de precio"

#: src/pages/Pool/PositionPage.tsx
msgid "Price range"
msgstr "Rango de precios"
Expand Down
10 changes: 9 additions & 1 deletion src/locales/fi-FI.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: uniswap-interface\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2022-07-21 14:05\n"
"PO-Revision-Date: 2022-07-29 20:04\n"
"Last-Translator: \n"
"Language: fi_FI\n"
"Language-Team: Finnish\n"
Expand Down Expand Up @@ -116,6 +116,10 @@ msgstr "<0>🎉 </0>Tervetuloa Team Unicorniin :) <1>🎉</1>"
msgid "A minimum threshold of 0.25% of the total UNI supply is required to submit proposals"
msgstr "Ehdotusten jättämiseen vaaditaan vähintään 0,25 prosentin kynnysarvo UNI: n kokonaismäärästä"

#: src/components/swap/PriceImpactWarning.tsx
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"
msgstr "Tämän kokoisella swapilla voi olla suuri hintavaikutus, kun otetaan huomioon poolin nykyinen likviditeetti. Saattaa olla suuri ero syöttötunnuksesi määrän ja sen välillä, mitä saat ulostulotunnuksessa"

#: src/components/Menu/index.tsx
msgid "About"
msgstr "Tietoa"
Expand Down Expand Up @@ -1328,6 +1332,10 @@ msgstr "Liian suuri hintavaikutus"
msgid "Price Updated"
msgstr "Hinta päivitetty"

#: src/components/swap/PriceImpactWarning.tsx
msgid "Price impact warning"
msgstr "Varoitus hintavaikutuksista"

#: src/pages/Pool/PositionPage.tsx
msgid "Price range"
msgstr "Hintaluokka"
Expand Down
10 changes: 9 additions & 1 deletion src/locales/fr-FR.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: uniswap-interface\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2022-07-21 14:04\n"
"PO-Revision-Date: 2022-07-29 20:04\n"
"Last-Translator: \n"
"Language: fr_FR\n"
"Language-Team: French\n"
Expand Down Expand Up @@ -116,6 +116,10 @@ msgstr "<0>🎉 </0>Bienvenue dans l'équipe des Licornes :) <1>🎉</1>"
msgid "A minimum threshold of 0.25% of the total UNI supply is required to submit proposals"
msgstr "Un seuil minimum de 0,25% de l'offre totale d'UNI est requis pour soumettre des propositions"

#: src/components/swap/PriceImpactWarning.tsx
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"
msgstr "Un swap de cette taille peut avoir un impact élevé sur les prix, compte tenu de la liquidité actuelle du pool. Il peut y avoir une grande différence entre le montant de votre jeton d'entrée et ce que vous recevrez dans le jeton de sortie"

#: src/components/Menu/index.tsx
msgid "About"
msgstr "À propos"
Expand Down Expand Up @@ -1328,6 +1332,10 @@ msgstr "Impact trop élevé sur les prix"
msgid "Price Updated"
msgstr "Prix mis à jour"

#: src/components/swap/PriceImpactWarning.tsx
msgid "Price impact warning"
msgstr "Avertissement d'impact sur les prix"

#: src/pages/Pool/PositionPage.tsx
msgid "Price range"
msgstr "Fourchette de prix"
Expand Down
Loading