Commit 3c8e8604 authored by Noah Zinsmeister's avatar Noah Zinsmeister

Merge remote-tracking branch 'refs/remotes/origin/main'

parents b7636597 1ac25814
......@@ -2,7 +2,7 @@ import React from 'react'
import styled from 'styled-components/macro'
import { darken } from 'polished'
import { Trans } from '@lingui/macro'
import { NavLink, Link as HistoryLink } from 'react-router-dom'
import { NavLink, Link as HistoryLink, useLocation } from 'react-router-dom'
import { Percent } from '@uniswap/sdk-core'
import { ArrowLeft } from 'react-feather'
......@@ -90,24 +90,29 @@ export function FindPoolTabs({ origin }: { origin: string }) {
export function AddRemoveTabs({
adding,
creating,
positionID,
defaultSlippage,
positionID,
}: {
adding: boolean
creating: boolean
positionID?: string | undefined
defaultSlippage: Percent
positionID?: string | undefined
}) {
const theme = useTheme()
// reset states on back
const dispatch = useAppDispatch()
const location = useLocation()
// detect if back should redirect to v3 or v2 pool page
const poolLink = location.pathname.includes('add/v2')
? '/pool/v2'
: '/pool' + (!!positionID ? `/${positionID.toString()}` : '')
return (
<Tabs>
<RowBetween style={{ padding: '1rem 1rem 0 1rem' }}>
<HistoryLink
to={'/pool' + (!!positionID ? `/${positionID.toString()}` : '')}
to={poolLink}
onClick={() => {
if (adding) {
// not 100% sure both of these are needed
......
......@@ -179,7 +179,8 @@ export function useCurrency(currencyId: string | undefined): Currency | null | u
const { chainId } = useActiveWeb3React()
const isETH = currencyId?.toUpperCase() === 'ETH'
const token = useToken(isETH ? undefined : currencyId)
const extendedEther = useMemo(() => (chainId ? ExtendedEther.onChain(chainId) : undefined), [chainId])
const weth = chainId ? WETH9_EXTENDED[chainId] : undefined
if (weth?.address?.toLowerCase() === currencyId?.toLowerCase()) return weth
return isETH ? (chainId ? ExtendedEther.onChain(chainId) : undefined) : token
return isETH ? extendedEther : token
}
......@@ -14,7 +14,7 @@ msgstr ""
"X-Crowdin-File-ID: 4\n"
"Project-Id-Version: uniswap-interface\n"
"Language-Team: Afrikaans\n"
"PO-Revision-Date: 2021-06-16 03:05\n"
"PO-Revision-Date: 2021-06-16 15:05\n"
#: src/pages/Pool/PositionPage.tsx
#: src/pages/Pool/PositionPage.tsx
......@@ -92,12 +92,12 @@ msgstr "75%"
#: src/pages/Vote/VotePage.tsx
msgid "<0/> All Proposals"
msgstr "<0 /> Alle voorstelle"
msgstr "<0/> Alle voorstelle"
#: src/pages/Vote/index.tsx
#: src/pages/Vote/index.tsx
msgid "<0/> Votes"
msgstr "<0 /> Stemme"
msgstr "<0/> Stemme"
#: src/pages/Pool/v2.tsx
msgid "<0>Account analytics and accrued fees</0><1> ↗ </1>"
......@@ -171,7 +171,7 @@ msgstr "Voeg likiditeit by."
#: src/components/TransactionConfirmationModal/index.tsx
msgid "Add {0} to Metamask <0/>"
msgstr "Voeg {0} by Metamask <0 />"
msgstr "Voeg {0} by Metamask <0/>"
#: src/pages/AddLiquidityV2/index.tsx
#: src/pages/AddLiquidityV2/index.tsx
......@@ -264,7 +264,7 @@ msgstr "Is jy seker?"
#: src/components/claim/ClaimModal.tsx
msgid "As a member of the Uniswap community you may claim UNI to be used for voting and governance.<0/><1/><2>Read more about UNI</2>"
msgstr "As lid van die Uniswap-gemeenskap kan u daarop aanspraak maak dat UNI gebruik word vir stemming en beheer. <0 /> <1 /> <2> Lees meer oor UNI</2>"
msgstr "As lid van die Uniswap-gemeenskap kan u daarop aanspraak maak dat UNI gebruik word vir stemming en beheer. <0/> <1/> <2> Lees meer oor UNI</2>"
#: src/pages/MigrateV2/MigrateV2Pair.tsx
msgid "At least {0} {1} and {2} {3} will be refunded to your wallet due to selected price range."
......@@ -1336,7 +1336,7 @@ msgstr "Ruil {0} {1} vir {2} {3}"
#: src/components/Popups/ClaimPopup.tsx
msgid "Thanks for being part of the Uniswap community <0/>"
msgstr "Dankie dat u deel is van die Uniswap-gemeenskap <0 />"
msgstr "Dankie dat u deel is van die Uniswap-gemeenskap <0/>"
#: src/hooks/useSwapCallback.ts
msgid "The Uniswap invariant x*y=k was not satisfied by the swap. This usually means one of the tokens you are swapping incorporates custom behavior on transfer."
......@@ -1872,7 +1872,7 @@ msgstr "{0} %"
#: src/components/PositionListItem/index.tsx
#: src/components/PositionListItem/index.tsx
msgid "{0} <0/> per <1/>"
msgstr "{0} <0 /> per <1 />"
msgstr "{0} <0/> per <1/>"
#: src/components/SearchModal/ManageTokens.tsx
msgid "{0} Custom Tokens"
......@@ -1999,7 +1999,7 @@ msgstr "{tokenB} per {tokenA}"
#: src/components/CurrencyInputPanel/FiatValue.tsx
msgid "~$ <0/>"
msgstr "~ $ <0 />"
msgstr "~ $ <0/>"
#: src/pages/Pool/PositionPage.tsx
msgid "← Back to Pools Overview"
......
......@@ -14,7 +14,7 @@ msgstr ""
"X-Crowdin-File-ID: 4\n"
"Project-Id-Version: uniswap-interface\n"
"Language-Team: Czech\n"
"PO-Revision-Date: 2021-06-16 03:05\n"
"PO-Revision-Date: 2021-06-16 16:05\n"
#: src/pages/Pool/PositionPage.tsx
#: src/pages/Pool/PositionPage.tsx
......@@ -1336,7 +1336,7 @@ msgstr "Výměna {0} {1} za {2} {3}"
#: src/components/Popups/ClaimPopup.tsx
msgid "Thanks for being part of the Uniswap community <0/>"
msgstr "Děkujeme, že jste součástí komunity Uniswap <0 />"
msgstr "Děkujeme, že jste součástí komunity Uniswap <0/>"
#: src/hooks/useSwapCallback.ts
msgid "The Uniswap invariant x*y=k was not satisfied by the swap. This usually means one of the tokens you are swapping incorporates custom behavior on transfer."
......@@ -1356,7 +1356,7 @@ msgstr "Výstupní žeton nelze přenést. Možná je s výstupním žetonem ně
#: src/hooks/useSwapCallback.ts
msgid "The output token cannot be transferred. There may be an issue with the output token. Note: fee on transfer and rebase tokens are incompatible with Uniswap V3."
msgstr "Výstupní token nelze přenést. Může dojít k problému s výstupním tokenem. Poznámka: Poplatky za tokeny za převody a rebase nejsou kompatibilní s Uniswap V3."
msgstr "Výstupní žeton nelze přenést. Může dojít k problému s výstupním žetonem. Poznámka: Poplatky za žetony za převody a rebase nejsou kompatibilní s Uniswap V3."
#: src/components/Badge/RangeBadge.tsx
msgid "The price of this pool is outside of your selected range. Your position is not currently earning fees."
......@@ -1388,7 +1388,7 @@ msgstr "Tento nástroj bezpečně migruje vaši {0} likviditu do V3. Proces je z
#: src/hooks/useSwapCallback.ts
msgid "This transaction will not succeed due to price movement. Try increasing your slippage tolerance. Note: fee on transfer and rebase tokens are incompatible with Uniswap V3."
msgstr "Tato transakce nebude úspěšná z důvodu cenového pohybu. Zkuste zvýšit toleranci skluzu. Poznámka: Poplatky za tokeny za převody a rebase nejsou kompatibilní s Uniswap V3."
msgstr "Tato transakce nebude úspěšná z důvodu cenového pohybu. Zkuste zvýšit toleranci skluzu. Poznámka: Poplatky za žetony za převody a rebase nejsou kompatibilní s Uniswap V3."
#: src/hooks/useSwapCallback.ts
msgid "This transaction will not succeed either due to price movement or fee on transfer. Try increasing your slippage tolerance."
......@@ -1527,7 +1527,7 @@ msgstr "Neznámý zdroj"
#: src/hooks/useSwapCallback.ts
msgid "Unknown error{0}. Try increasing your slippage tolerance. Note: fee on transfer and rebase tokens are incompatible with Uniswap V3."
msgstr "Neznámá chyba{0}. Zkuste zvýšit toleranci skluzu. Poznámka: Poplatky za tokeny za převody a rebase nejsou kompatibilní s Uniswap V3."
msgstr "Neznámá chyba{0}. Zkuste zvýšit toleranci skluzu. Poznámka: Poplatky za žetony za převody a rebase nejsou kompatibilní s Uniswap V3."
#: src/pages/Vote/VotePage.tsx
#: src/pages/Vote/index.tsx
......
......@@ -14,7 +14,7 @@ msgstr ""
"X-Crowdin-File-ID: 4\n"
"Project-Id-Version: uniswap-interface\n"
"Language-Team: Danish\n"
"PO-Revision-Date: 2021-06-16 03:05\n"
"PO-Revision-Date: 2021-06-16 16:05\n"
#: src/pages/Pool/PositionPage.tsx
#: src/pages/Pool/PositionPage.tsx
......@@ -1336,7 +1336,7 @@ msgstr "Byt {0} {1} til {2} {3}"
#: src/components/Popups/ClaimPopup.tsx
msgid "Thanks for being part of the Uniswap community <0/>"
msgstr "Tak, fordi du er en del af Uniswap-gruppen <0 />"
msgstr "Tak, fordi du er en del af Uniswap-gruppen <0/>"
#: src/hooks/useSwapCallback.ts
msgid "The Uniswap invariant x*y=k was not satisfied by the swap. This usually means one of the tokens you are swapping incorporates custom behavior on transfer."
......
......@@ -14,7 +14,7 @@ msgstr ""
"X-Crowdin-File-ID: 4\n"
"Project-Id-Version: uniswap-interface\n"
"Language-Team: Greek\n"
"PO-Revision-Date: 2021-06-16 03:05\n"
"PO-Revision-Date: 2021-06-16 17:15\n"
#: src/pages/Pool/PositionPage.tsx
#: src/pages/Pool/PositionPage.tsx
......@@ -1688,7 +1688,7 @@ msgstr "Πραγματοποιήθηκε ανάληψη UNI-V2!"
#: src/pages/Swap/index.tsx
msgid "Wrap"
msgstr "Σύνοψη"
msgstr "Αναδίπλωση"
#: src/components/WalletModal/index.tsx
#: src/components/Web3Status/index.tsx
......
......@@ -14,7 +14,7 @@ msgstr ""
"X-Crowdin-File-ID: 4\n"
"Project-Id-Version: uniswap-interface\n"
"Language-Team: Spanish\n"
"PO-Revision-Date: 2021-06-16 03:05\n"
"PO-Revision-Date: 2021-06-16 19:06\n"
#: src/pages/Pool/PositionPage.tsx
#: src/pages/Pool/PositionPage.tsx
......
......@@ -14,12 +14,12 @@ msgstr ""
"X-Crowdin-File-ID: 4\n"
"Project-Id-Version: uniswap-interface\n"
"Language-Team: Hebrew\n"
"PO-Revision-Date: 2021-06-16 12:05\n"
"PO-Revision-Date: 2021-06-16 17:15\n"
#: src/pages/Pool/PositionPage.tsx
#: src/pages/Pool/PositionPage.tsx
msgid "$-"
msgstr "$ -"
msgstr "$-"
#: src/components/earn/PoolCard.tsx
#: src/pages/Pool/PositionPage.tsx
......@@ -92,12 +92,12 @@ msgstr "75%"
#: src/pages/Vote/VotePage.tsx
msgid "<0/> All Proposals"
msgstr "<0 /> כל ההצעות"
msgstr "<0/> כל ההצעות"
#: src/pages/Vote/index.tsx
#: src/pages/Vote/index.tsx
msgid "<0/> Votes"
msgstr "<0 /> הצבעות"
msgstr "<0/> הצבעות"
#: src/pages/Pool/v2.tsx
msgid "<0>Account analytics and accrued fees</0><1> ↗ </1>"
......@@ -137,7 +137,7 @@ msgstr "אודות"
#: src/components/swap/SwapModalHeader.tsx
msgid "Accept"
msgstr "קבלה"
msgstr "לְקַבֵּל"
#: src/components/AccountDetails/index.tsx
msgid "Account"
......@@ -171,7 +171,7 @@ msgstr "הוסף נזילות."
#: src/components/TransactionConfirmationModal/index.tsx
msgid "Add {0} to Metamask <0/>"
msgstr "הוסף {0} למטא-מסכה <0 />"
msgstr "הוסף {0} למטא-מסכה <0/>"
#: src/pages/AddLiquidityV2/index.tsx
#: src/pages/AddLiquidityV2/index.tsx
......@@ -264,7 +264,7 @@ msgstr "האם אתה בטוח?"
#: src/components/claim/ClaimModal.tsx
msgid "As a member of the Uniswap community you may claim UNI to be used for voting and governance.<0/><1/><2>Read more about UNI</2>"
msgstr "כחבר בקהילת Uniswap אתה יכול לטעון ש- UNI משמשת להצבעה ולממשל. <0 /> <1 /> <2> קרא עוד על UNI</2>"
msgstr "כחבר בקהילת Uniswap אתה יכול לטעון ש- UNI משמשת להצבעה ולממשל. <0/> <1/> <2> קרא עוד על UNI</2>"
#: src/pages/MigrateV2/MigrateV2Pair.tsx
msgid "At least {0} {1} and {2} {3} will be refunded to your wallet due to selected price range."
......@@ -522,7 +522,7 @@ msgstr "צור זוג"
#: src/pages/Pool/index.tsx
msgid "Create a pool"
msgstr "צור בריכה"
msgstr "צור מאגר"
#: src/components/ErrorBoundary/index.tsx
msgid "Create an issue on GitHub"
......@@ -1729,7 +1729,7 @@ msgstr "עליך לתת לחוזים החכמים של Uniswap להשתמש ב-
#: src/pages/MigrateV2/MigrateV2Pair.tsx
msgid "You should only deposit liquidity into Uniswap V3 at a price you believe is correct. <0/>If the price seems incorrect, you can either make a swap to move the price or wait for someone else to do so."
msgstr "עליכם להפקיד נזילות רק ב- Uniswap V3 במחיר שלדעתכם נכון. <0 /> אם נראה שהמחיר שגוי, באפשרותך להחליף כדי להזיז את המחיר או לחכות שמישהו אחר יעשה זאת."
msgstr "עליכם להפקיד נזילות רק ב- Uniswap V3 במחיר שלדעתכם נכון. <0/> אם נראה שהמחיר שגוי, באפשרותך להחליף כדי להזיז את המחיר או לחכות שמישהו אחר יעשה זאת."
#: src/pages/RemoveLiquidity/V3.tsx
msgid "You will also collect fees earned from this position."
......@@ -1872,7 +1872,7 @@ msgstr "{0} %"
#: src/components/PositionListItem/index.tsx
#: src/components/PositionListItem/index.tsx
msgid "{0} <0/> per <1/>"
msgstr "{0} <0 /> לכל <1 />"
msgstr "{0} <0 /> לכל <1/>"
#: src/components/SearchModal/ManageTokens.tsx
msgid "{0} Custom Tokens"
......@@ -1999,7 +1999,7 @@ msgstr "{tokenB} לכל {tokenA}"
#: src/components/CurrencyInputPanel/FiatValue.tsx
msgid "~$ <0/>"
msgstr "~ $ <0 />"
msgstr "~ $ <0/>"
#: src/pages/Pool/PositionPage.tsx
msgid "← Back to Pools Overview"
......
......@@ -14,7 +14,7 @@ msgstr ""
"X-Crowdin-File-ID: 4\n"
"Project-Id-Version: uniswap-interface\n"
"Language-Team: Hungarian\n"
"PO-Revision-Date: 2021-06-16 03:05\n"
"PO-Revision-Date: 2021-06-16 17:15\n"
#: src/pages/Pool/PositionPage.tsx
#: src/pages/Pool/PositionPage.tsx
......@@ -171,7 +171,7 @@ msgstr "Adja hozzá a likviditást."
#: src/components/TransactionConfirmationModal/index.tsx
msgid "Add {0} to Metamask <0/>"
msgstr "{0} hozzáadása a Metamask <0 /> elemhez"
msgstr "{0} hozzáadása a Metamask <0/> elemhez"
#: src/pages/AddLiquidityV2/index.tsx
#: src/pages/AddLiquidityV2/index.tsx
......@@ -1337,7 +1337,7 @@ msgstr "{0} {1} cseréje a következőre {2} {3}"
#: src/components/Popups/ClaimPopup.tsx
msgid "Thanks for being part of the Uniswap community <0/>"
msgstr "Köszönjük, hogy az Uniswap közösség tagja <0 />"
msgstr "Köszönjük, hogy az Uniswap közösség tagja <0/>"
#: src/hooks/useSwapCallback.ts
msgid "The Uniswap invariant x*y=k was not satisfied by the swap. This usually means one of the tokens you are swapping incorporates custom behavior on transfer."
......@@ -1873,7 +1873,7 @@ msgstr "{0} %"
#: src/components/PositionListItem/index.tsx
#: src/components/PositionListItem/index.tsx
msgid "{0} <0/> per <1/>"
msgstr "{0} <0 /> per <1 />"
msgstr "{0} <0/> per <1/>"
#: src/components/SearchModal/ManageTokens.tsx
msgid "{0} Custom Tokens"
......@@ -2001,7 +2001,7 @@ msgstr "{tokenB} per {tokenA}"
#: src/components/CurrencyInputPanel/FiatValue.tsx
msgid "~$ <0/>"
msgstr "~ $ <0 />"
msgstr "~ $ <0/>"
#: src/pages/Pool/PositionPage.tsx
msgid "← Back to Pools Overview"
......
......@@ -14,7 +14,7 @@ msgstr ""
"X-Crowdin-File-ID: 4\n"
"Project-Id-Version: uniswap-interface\n"
"Language-Team: Indonesian\n"
"PO-Revision-Date: 2021-06-16 03:05\n"
"PO-Revision-Date: 2021-06-16 17:15\n"
#: src/pages/Pool/PositionPage.tsx
#: src/pages/Pool/PositionPage.tsx
......@@ -1336,7 +1336,7 @@ msgstr "Menukar {0} {1} untuk {2} {3}"
#: src/components/Popups/ClaimPopup.tsx
msgid "Thanks for being part of the Uniswap community <0/>"
msgstr "Terima kasih telah menjadi bagian dari komunitas Uniswap </>"
msgstr "Terima kasih telah menjadi bagian dari komunitas Uniswap <0/>"
#: src/hooks/useSwapCallback.ts
msgid "The Uniswap invariant x*y=k was not satisfied by the swap. This usually means one of the tokens you are swapping incorporates custom behavior on transfer."
......
This diff is collapsed.
......@@ -14,7 +14,7 @@ msgstr ""
"X-Crowdin-File-ID: 4\n"
"Project-Id-Version: uniswap-interface\n"
"Language-Team: Korean\n"
"PO-Revision-Date: 2021-06-16 03:05\n"
"PO-Revision-Date: 2021-06-16 19:06\n"
#: src/pages/Pool/PositionPage.tsx
#: src/pages/Pool/PositionPage.tsx
......@@ -1336,7 +1336,7 @@ msgstr "{0} {1} 을 {2} {3}(으)로 스왑"
#: src/components/Popups/ClaimPopup.tsx
msgid "Thanks for being part of the Uniswap community <0/>"
msgstr "Uniswap 커뮤니티에 참여해 주셔서 감사합니다. <0 />"
msgstr "Uniswap 커뮤니티에 참여해 주셔서 감사합니다. <0/>"
#: src/hooks/useSwapCallback.ts
msgid "The Uniswap invariant x*y=k was not satisfied by the swap. This usually means one of the tokens you are swapping incorporates custom behavior on transfer."
......
......@@ -14,7 +14,7 @@ msgstr ""
"X-Crowdin-File-ID: 4\n"
"Project-Id-Version: uniswap-interface\n"
"Language-Team: Norwegian\n"
"PO-Revision-Date: 2021-06-16 03:05\n"
"PO-Revision-Date: 2021-06-16 19:06\n"
#: src/pages/Pool/PositionPage.tsx
#: src/pages/Pool/PositionPage.tsx
......@@ -1336,7 +1336,7 @@ msgstr "Bytte {0} {1} mot {2} {3}"
#: src/components/Popups/ClaimPopup.tsx
msgid "Thanks for being part of the Uniswap community <0/>"
msgstr "Takk for at du er en del av Uniswap-fellesskapet <0 />"
msgstr "Takk for at du er en del av Uniswap-fellesskapet <0/>"
#: src/hooks/useSwapCallback.ts
msgid "The Uniswap invariant x*y=k was not satisfied by the swap. This usually means one of the tokens you are swapping incorporates custom behavior on transfer."
......
......@@ -14,7 +14,7 @@ msgstr ""
"X-Crowdin-File-ID: 4\n"
"Project-Id-Version: uniswap-interface\n"
"Language-Team: Russian\n"
"PO-Revision-Date: 2021-06-16 08:05\n"
"PO-Revision-Date: 2021-06-16 19:06\n"
#: src/pages/Pool/PositionPage.tsx
#: src/pages/Pool/PositionPage.tsx
......@@ -1336,7 +1336,7 @@ msgstr "Идет обмен {0} {1} на {2} {3}"
#: src/components/Popups/ClaimPopup.tsx
msgid "Thanks for being part of the Uniswap community <0/>"
msgstr "Спасибо, что присоединились к сообществу Uniswap <0 />"
msgstr "Спасибо, что присоединились к сообществу Uniswap <0/>"
#: src/hooks/useSwapCallback.ts
msgid "The Uniswap invariant x*y=k was not satisfied by the swap. This usually means one of the tokens you are swapping incorporates custom behavior on transfer."
......
......@@ -14,7 +14,7 @@ msgstr ""
"X-Crowdin-File-ID: 4\n"
"Project-Id-Version: uniswap-interface\n"
"Language-Team: Swedish\n"
"PO-Revision-Date: 2021-06-16 03:05\n"
"PO-Revision-Date: 2021-06-16 19:06\n"
#: src/pages/Pool/PositionPage.tsx
#: src/pages/Pool/PositionPage.tsx
......@@ -1336,7 +1336,7 @@ msgstr "Byter ut {0} {1} mot {2} {3}"
#: src/components/Popups/ClaimPopup.tsx
msgid "Thanks for being part of the Uniswap community <0/>"
msgstr "Tack för att du deltar i Uniswap-gemenskapen<0 />"
msgstr "Tack för att du deltar i Uniswap-gemenskapen<0/>"
#: src/hooks/useSwapCallback.ts
msgid "The Uniswap invariant x*y=k was not satisfied by the swap. This usually means one of the tokens you are swapping incorporates custom behavior on transfer."
......
......@@ -14,7 +14,7 @@ msgstr ""
"X-Crowdin-File-ID: 4\n"
"Project-Id-Version: uniswap-interface\n"
"Language-Team: Ukrainian\n"
"PO-Revision-Date: 2021-06-16 03:05\n"
"PO-Revision-Date: 2021-06-16 19:06\n"
#: src/pages/Pool/PositionPage.tsx
#: src/pages/Pool/PositionPage.tsx
......@@ -1729,7 +1729,7 @@ msgstr "Ви маєте дати дозвіл розумних контракт
#: src/pages/MigrateV2/MigrateV2Pair.tsx
msgid "You should only deposit liquidity into Uniswap V3 at a price you believe is correct. <0/>If the price seems incorrect, you can either make a swap to move the price or wait for someone else to do so."
msgstr "Ви маєте вносити ліквідність у Uniswap V3 лише за ціною, яку ви вважаєте правильною. <0 /> Якщо ціна здається неправильною, ви можете здійснити обмін, аби перемістити ціну, або дочекатися, поки цього зробить хтось інший."
msgstr "Ви маєте вносити ліквідність у Uniswap V3 лише за ціною, яку ви вважаєте правильною. <0/> Якщо ціна здається неправильною, ви можете здійснити обмін, аби перемістити ціну, або дочекатися, поки цього зробить хтось інший."
#: src/pages/RemoveLiquidity/V3.tsx
msgid "You will also collect fees earned from this position."
......
......@@ -14,7 +14,7 @@ msgstr ""
"X-Crowdin-File-ID: 4\n"
"Project-Id-Version: uniswap-interface\n"
"Language-Team: Vietnamese\n"
"PO-Revision-Date: 2021-06-16 03:05\n"
"PO-Revision-Date: 2021-06-16 20:04\n"
#: src/pages/Pool/PositionPage.tsx
#: src/pages/Pool/PositionPage.tsx
......@@ -1336,7 +1336,7 @@ msgstr "Đổi {0} {1} lấy {2} {3}"
#: src/components/Popups/ClaimPopup.tsx
msgid "Thanks for being part of the Uniswap community <0/>"
msgstr "Cảm ơn bạn đã tham gia cộng đồng Uniswap <0 />"
msgstr "Cảm ơn bạn đã tham gia cộng đồng Uniswap <0/>"
#: src/hooks/useSwapCallback.ts
msgid "The Uniswap invariant x*y=k was not satisfied by the swap. This usually means one of the tokens you are swapping incorporates custom behavior on transfer."
......
This diff is collapsed.
......@@ -42,6 +42,7 @@ import { ConfirmAddModalBottom } from './ConfirmAddModalBottom'
import { currencyId } from '../../utils/currencyId'
import { PoolPriceBar } from './PoolPriceBar'
import UnsupportedCurrencyFooter from 'components/swap/UnsupportedCurrencyFooter'
import { SwitchLocaleLink } from 'components/SwitchLocaleLink'
import { t, Trans } from '@lingui/macro'
const DEFAULT_ADD_V2_SLIPPAGE_TOLERANCE = new Percent(50, 10_000)
......@@ -485,6 +486,8 @@ export default function AddLiquidity({
</AutoColumn>
</Wrapper>
</AppBody>
<SwitchLocaleLink />
{!addIsUnsupported ? (
pair && !noLiquidity && pairState !== PairState.INVALID ? (
<AutoColumn style={{ minWidth: '20rem', width: '100%', maxWidth: '400px', marginTop: '1rem' }}>
......
......@@ -16,6 +16,7 @@ import { Dots } from '../../components/swap/styleds'
import { toV2LiquidityToken, useTrackedTokenPairs } from '../../state/user/hooks'
import MigrateV2PositionCard from 'components/PositionCard/V2'
import MigrateSushiPositionCard from 'components/PositionCard/Sushi'
import { SwitchLocaleLink } from 'components/SwitchLocaleLink'
import { PairState, useV2Pairs } from 'hooks/useV2Pairs'
import { getCreate2Address } from '@ethersproject/address'
import { pack, keccak256 } from '@ethersproject/solidity'
......@@ -110,73 +111,76 @@ export default function MigrateV2() {
const v2IsLoading = fetchingPairBalances || v2Pairs.some(([pairState]) => pairState === PairState.LOADING)
return (
<BodyWrapper style={{ padding: 24 }}>
<AutoColumn gap="16px">
<AutoRow style={{ alignItems: 'center', justifyContent: 'space-between' }} gap="8px">
<BackArrow to="/pool/v2" />
<TYPE.mediumHeader>
<Trans>Migrate V2 Liquidity</Trans>
</TYPE.mediumHeader>
<div>
<QuestionHelper text={<Trans>Migrate your liquidity tokens from Uniswap V2 to Uniswap V3.</Trans>} />
</div>
</AutoRow>
<TYPE.body style={{ marginBottom: 8, fontWeight: 400 }}>
<Trans>
For each pool shown below, click migrate to remove your liquidity from Uniswap V2 and deposit it into
Uniswap V3.
</Trans>
</TYPE.body>
{!account ? (
<LightCard padding="40px">
<TYPE.body color={theme.text3} textAlign="center">
<Trans>Connect to a wallet to view your V2 liquidity.</Trans>
</TYPE.body>
</LightCard>
) : v2IsLoading ? (
<LightCard padding="40px">
<TYPE.body color={theme.text3} textAlign="center">
<Dots>
<Trans>Loading</Trans>
</Dots>
</TYPE.body>
</LightCard>
) : v2Pairs.filter(([, pair]) => !!pair).length > 0 ? (
<>
{v2Pairs
.filter(([, pair]) => !!pair)
.map(([, pair]) => (
<MigrateV2PositionCard key={(pair as Pair).liquidityToken.address} pair={pair as Pair} />
))}
{tokenPairsWithSushiBalance.map(({ sushiLiquidityToken, tokens }) => {
return (
<MigrateSushiPositionCard
key={(sushiLiquidityToken as Token).address}
tokenA={tokens[0]}
tokenB={tokens[1]}
liquidityToken={sushiLiquidityToken as Token}
/>
)
})}
</>
) : (
<EmptyState message={<Trans>No V2 Liquidity found.</Trans>} />
)}
<AutoColumn justify={'center'} gap="md">
<Text textAlign="center" fontSize={14} style={{ padding: '.5rem 0 .5rem 0' }}>
<>
<BodyWrapper style={{ padding: 24 }}>
<AutoColumn gap="16px">
<AutoRow style={{ alignItems: 'center', justifyContent: 'space-between' }} gap="8px">
<BackArrow to="/pool/v2" />
<TYPE.mediumHeader>
<Trans>Migrate V2 Liquidity</Trans>
</TYPE.mediumHeader>
<div>
<QuestionHelper text={<Trans>Migrate your liquidity tokens from Uniswap V2 to Uniswap V3.</Trans>} />
</div>
</AutoRow>
<TYPE.body style={{ marginBottom: 8, fontWeight: 400 }}>
<Trans>
Don’t see one of your v2 positions?{' '}
<StyledInternalLink id="import-pool-link" to={'/find?origin=/migrate/v2'}>
Import it.
</StyledInternalLink>
For each pool shown below, click migrate to remove your liquidity from Uniswap V2 and deposit it into
Uniswap V3.
</Trans>
</Text>
</TYPE.body>
{!account ? (
<LightCard padding="40px">
<TYPE.body color={theme.text3} textAlign="center">
<Trans>Connect to a wallet to view your V2 liquidity.</Trans>
</TYPE.body>
</LightCard>
) : v2IsLoading ? (
<LightCard padding="40px">
<TYPE.body color={theme.text3} textAlign="center">
<Dots>
<Trans>Loading</Trans>
</Dots>
</TYPE.body>
</LightCard>
) : v2Pairs.filter(([, pair]) => !!pair).length > 0 ? (
<>
{v2Pairs
.filter(([, pair]) => !!pair)
.map(([, pair]) => (
<MigrateV2PositionCard key={(pair as Pair).liquidityToken.address} pair={pair as Pair} />
))}
{tokenPairsWithSushiBalance.map(({ sushiLiquidityToken, tokens }) => {
return (
<MigrateSushiPositionCard
key={(sushiLiquidityToken as Token).address}
tokenA={tokens[0]}
tokenB={tokens[1]}
liquidityToken={sushiLiquidityToken as Token}
/>
)
})}
</>
) : (
<EmptyState message={<Trans>No V2 Liquidity found.</Trans>} />
)}
<AutoColumn justify={'center'} gap="md">
<Text textAlign="center" fontSize={14} style={{ padding: '.5rem 0 .5rem 0' }}>
<Trans>
Don’t see one of your v2 positions?{' '}
<StyledInternalLink id="import-pool-link" to={'/find?origin=/migrate/v2'}>
Import it.
</StyledInternalLink>
</Trans>
</Text>
</AutoColumn>
</AutoColumn>
</AutoColumn>
</BodyWrapper>
</BodyWrapper>
<SwitchLocaleLink />
</>
)
}
This diff is collapsed.
......@@ -19,6 +19,7 @@ import { useV2Pairs } from '../../hooks/useV2Pairs'
import { toV2LiquidityToken, useTrackedTokenPairs } from '../../state/user/hooks'
import { Dots } from '../../components/swap/styleds'
import { CardSection, DataCard, CardNoise, CardBGImage } from '../../components/earn/styled'
import { SwitchLocaleLink } from '../../components/SwitchLocaleLink'
import { useStakingInfo } from '../../state/stake/hooks'
import { BIG_INT_ZERO } from '../../constants/misc'
import { Pair } from '@uniswap/v2-sdk'
......@@ -256,6 +257,7 @@ export default function Pool() {
</AutoColumn>
</AutoColumn>
</PageWrapper>
<SwitchLocaleLink />
</>
)
}
......@@ -11,6 +11,7 @@ import { FindPoolTabs } from '../../components/NavigationTabs'
import { MinimalPositionCard } from '../../components/PositionCard'
import Row from '../../components/Row'
import CurrencySearchModal from '../../components/SearchModal/CurrencySearchModal'
import { SwitchLocaleLink } from '../../components/SwitchLocaleLink'
import { ExtendedEther } from '../../constants/tokens'
import { PairState, useV2Pair } from '../../hooks/useV2Pairs'
import { useActiveWeb3React } from '../../hooks/web3'
......@@ -93,136 +94,139 @@ export default function PoolFinder() {
)
return (
<AppBody>
<FindPoolTabs origin={query.get('origin') ?? '/pool/v2'} />
<AutoColumn style={{ padding: '1rem' }} gap="md">
<BlueCard>
<AutoColumn gap="10px">
<TYPE.link fontWeight={400} color={'primaryText1'}>
<Trans>
<b>Tip:</b> Use this tool to find v2 pools that don&apos;t automatically appear in the interface.
</Trans>
</TYPE.link>
</AutoColumn>
</BlueCard>
<ButtonDropdownLight
onClick={() => {
setShowSearch(true)
setActiveField(Fields.TOKEN0)
}}
>
{currency0 ? (
<Row>
<CurrencyLogo currency={currency0} />
<Text fontWeight={500} fontSize={20} marginLeft={'12px'}>
{currency0.symbol}
</Text>
</Row>
) : (
<Text fontWeight={500} fontSize={20} marginLeft={'12px'}>
<Trans>Select a token</Trans>
</Text>
)}
</ButtonDropdownLight>
<ColumnCenter>
<Plus size="16" color="#888D9B" />
</ColumnCenter>
<ButtonDropdownLight
onClick={() => {
setShowSearch(true)
setActiveField(Fields.TOKEN1)
}}
>
{currency1 ? (
<Row>
<CurrencyLogo currency={currency1} />
<>
<AppBody>
<FindPoolTabs origin={query.get('origin') ?? '/pool/v2'} />
<AutoColumn style={{ padding: '1rem' }} gap="md">
<BlueCard>
<AutoColumn gap="10px">
<TYPE.link fontWeight={400} color={'primaryText1'}>
<Trans>
<b>Tip:</b> Use this tool to find v2 pools that don&apos;t automatically appear in the interface.
</Trans>
</TYPE.link>
</AutoColumn>
</BlueCard>
<ButtonDropdownLight
onClick={() => {
setShowSearch(true)
setActiveField(Fields.TOKEN0)
}}
>
{currency0 ? (
<Row>
<CurrencyLogo currency={currency0} />
<Text fontWeight={500} fontSize={20} marginLeft={'12px'}>
{currency0.symbol}
</Text>
</Row>
) : (
<Text fontWeight={500} fontSize={20} marginLeft={'12px'}>
{currency1.symbol}
<Trans>Select a token</Trans>
</Text>
</Row>
) : (
<Text fontWeight={500} fontSize={20} marginLeft={'12px'}>
<Trans>Select a token</Trans>
</Text>
)}
</ButtonDropdownLight>
)}
</ButtonDropdownLight>
{hasPosition && (
<ColumnCenter
style={{ justifyItems: 'center', backgroundColor: '', padding: '12px 0px', borderRadius: '12px' }}
>
<Text textAlign="center" fontWeight={500}>
<Trans>Pool Found!</Trans>
</Text>
<StyledInternalLink to={`/pool/v2`}>
<Text textAlign="center">
<Trans>Manage this pool.</Trans>
</Text>
</StyledInternalLink>
<ColumnCenter>
<Plus size="16" color="#888D9B" />
</ColumnCenter>
)}
{currency0 && currency1 ? (
pairState === PairState.EXISTS ? (
hasPosition && pair ? (
<MinimalPositionCard pair={pair} border="1px solid #CED0D9" />
<ButtonDropdownLight
onClick={() => {
setShowSearch(true)
setActiveField(Fields.TOKEN1)
}}
>
{currency1 ? (
<Row>
<CurrencyLogo currency={currency1} />
<Text fontWeight={500} fontSize={20} marginLeft={'12px'}>
{currency1.symbol}
</Text>
</Row>
) : (
<Text fontWeight={500} fontSize={20} marginLeft={'12px'}>
<Trans>Select a token</Trans>
</Text>
)}
</ButtonDropdownLight>
{hasPosition && (
<ColumnCenter
style={{ justifyItems: 'center', backgroundColor: '', padding: '12px 0px', borderRadius: '12px' }}
>
<Text textAlign="center" fontWeight={500}>
<Trans>Pool Found!</Trans>
</Text>
<StyledInternalLink to={`/pool/v2`}>
<Text textAlign="center">
<Trans>Manage this pool.</Trans>
</Text>
</StyledInternalLink>
</ColumnCenter>
)}
{currency0 && currency1 ? (
pairState === PairState.EXISTS ? (
hasPosition && pair ? (
<MinimalPositionCard pair={pair} border="1px solid #CED0D9" />
) : (
<LightCard padding="45px 10px">
<AutoColumn gap="sm" justify="center">
<Text textAlign="center">
<Trans>You don’t have liquidity in this pool yet.</Trans>
</Text>
<StyledInternalLink to={`/add/${currencyId(currency0)}/${currencyId(currency1)}`}>
<Text textAlign="center">
<Trans>Add liquidity.</Trans>
</Text>
</StyledInternalLink>
</AutoColumn>
</LightCard>
)
) : validPairNoLiquidity ? (
<LightCard padding="45px 10px">
<AutoColumn gap="sm" justify="center">
<Text textAlign="center">
<Trans>You don’t have liquidity in this pool yet.</Trans>
<Trans>No pool found.</Trans>
</Text>
<StyledInternalLink to={`/add/${currencyId(currency0)}/${currencyId(currency1)}`}>
<Text textAlign="center">
<Trans>Add liquidity.</Trans>
</Text>
<Trans>Create pool.</Trans>
</StyledInternalLink>
</AutoColumn>
</LightCard>
)
) : validPairNoLiquidity ? (
<LightCard padding="45px 10px">
<AutoColumn gap="sm" justify="center">
<Text textAlign="center">
<Trans>No pool found.</Trans>
</Text>
<StyledInternalLink to={`/add/${currencyId(currency0)}/${currencyId(currency1)}`}>
<Trans>Create pool.</Trans>
</StyledInternalLink>
</AutoColumn>
</LightCard>
) : pairState === PairState.INVALID ? (
<LightCard padding="45px 10px">
<AutoColumn gap="sm" justify="center">
<Text textAlign="center" fontWeight={500}>
<Trans>Invalid pair.</Trans>
</Text>
</AutoColumn>
</LightCard>
) : pairState === PairState.LOADING ? (
<LightCard padding="45px 10px">
<AutoColumn gap="sm" justify="center">
<Text textAlign="center">
<Trans>Loading</Trans>
<Dots />
</Text>
</AutoColumn>
</LightCard>
) : null
) : (
prerequisiteMessage
)}
</AutoColumn>
<CurrencySearchModal
isOpen={showSearch}
onCurrencySelect={handleCurrencySelect}
onDismiss={handleSearchDismiss}
showCommonBases
selectedCurrency={(activeField === Fields.TOKEN0 ? currency1 : currency0) ?? undefined}
/>
</AppBody>
) : pairState === PairState.INVALID ? (
<LightCard padding="45px 10px">
<AutoColumn gap="sm" justify="center">
<Text textAlign="center" fontWeight={500}>
<Trans>Invalid pair.</Trans>
</Text>
</AutoColumn>
</LightCard>
) : pairState === PairState.LOADING ? (
<LightCard padding="45px 10px">
<AutoColumn gap="sm" justify="center">
<Text textAlign="center">
<Trans>Loading</Trans>
<Dots />
</Text>
</AutoColumn>
</LightCard>
) : null
) : (
prerequisiteMessage
)}
</AutoColumn>
<CurrencySearchModal
isOpen={showSearch}
onCurrencySelect={handleCurrencySelect}
onDismiss={handleSearchDismiss}
showCommonBases
selectedCurrency={(activeField === Fields.TOKEN0 ? currency1 : currency0) ?? undefined}
/>
</AppBody>
<SwitchLocaleLink />
</>
)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment