Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dded1197a6 | ||
|
|
c0d387d9f0 | ||
|
|
b40e0250fd | ||
|
|
d90e1ecf17 |
1
CODEOWNERS
Normal file
1
CODEOWNERS
Normal file
@ -0,0 +1 @@
|
|||||||
|
@uniswap/web-admins
|
||||||
File diff suppressed because it is too large
Load Diff
@ -351,7 +351,7 @@ function parseRemoteActivity(assetActivity: AssetActivityPartsFragment): Activit
|
|||||||
return parseUniswapXOrder(assetActivity as OrderActivity)
|
return parseUniswapXOrder(assetActivity as OrderActivity)
|
||||||
}
|
}
|
||||||
|
|
||||||
const changes = assetActivity.assetChanges.reduce(
|
const changes = assetActivity.details.assetChanges.reduce(
|
||||||
(acc: TransactionChanges, assetChange) => {
|
(acc: TransactionChanges, assetChange) => {
|
||||||
if (assetChange.__typename === 'NftApproval') acc.NftApproval.push(assetChange)
|
if (assetChange.__typename === 'NftApproval') acc.NftApproval.push(assetChange)
|
||||||
else if (assetChange.__typename === 'NftApproveForAll') acc.NftApproveForAll.push(assetChange)
|
else if (assetChange.__typename === 'NftApproveForAll') acc.NftApproveForAll.push(assetChange)
|
||||||
@ -377,13 +377,16 @@ function parseRemoteActivity(assetActivity: AssetActivityPartsFragment): Activit
|
|||||||
status: assetActivity.details.status,
|
status: assetActivity.details.status,
|
||||||
timestamp: assetActivity.timestamp,
|
timestamp: assetActivity.timestamp,
|
||||||
logos: getLogoSrcs(changes),
|
logos: getLogoSrcs(changes),
|
||||||
title: assetActivity.type,
|
title: assetActivity.details.type,
|
||||||
descriptor: assetActivity.details.to,
|
descriptor: assetActivity.details.to,
|
||||||
from: assetActivity.details.from,
|
from: assetActivity.details.from,
|
||||||
nonce: assetActivity.details.nonce,
|
nonce: assetActivity.details.nonce,
|
||||||
}
|
}
|
||||||
|
|
||||||
const parsedFields = ActivityParserByType[assetActivity.type]?.(changes, assetActivity as TransactionActivity)
|
const parsedFields = ActivityParserByType[assetActivity.details.type]?.(
|
||||||
|
changes,
|
||||||
|
assetActivity as TransactionActivity
|
||||||
|
)
|
||||||
return { ...defaultFields, ...parsedFields }
|
return { ...defaultFields, ...parsedFields }
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('Failed to parse activity', e, assetActivity)
|
console.error('Failed to parse activity', e, assetActivity)
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import { ClassicTrade, InterfaceTrade } from 'state/routing/types'
|
|||||||
import { getTransactionCount, isClassicTrade } from 'state/routing/utils'
|
import { getTransactionCount, isClassicTrade } from 'state/routing/utils'
|
||||||
import { formatCurrencyAmount, formatNumber, formatPriceImpact, NumberType } from 'utils/formatNumbers'
|
import { formatCurrencyAmount, formatNumber, formatPriceImpact, NumberType } from 'utils/formatNumbers'
|
||||||
|
|
||||||
import { Separator, ThemedText } from '../../theme'
|
import { ExternalLink, Separator, ThemedText } from '../../theme'
|
||||||
import Column from '../Column'
|
import Column from '../Column'
|
||||||
import RouterLabel from '../RouterLabel'
|
import RouterLabel from '../RouterLabel'
|
||||||
import { RowBetween, RowFixed } from '../Row'
|
import { RowBetween, RowFixed } from '../Row'
|
||||||
@ -192,10 +192,15 @@ function TokenTaxLineItem({ trade, type }: { trade: ClassicTrade; type: 'input'
|
|||||||
<RowBetween>
|
<RowBetween>
|
||||||
<MouseoverTooltip
|
<MouseoverTooltip
|
||||||
text={
|
text={
|
||||||
|
<>
|
||||||
<Trans>
|
<Trans>
|
||||||
Some tokens take a fee when they are bought or sold, which is set by the token issuer. Uniswap does not
|
Some tokens take a fee when they are bought or sold, which is set by the token issuer. Uniswap does not
|
||||||
receive any of these fees.
|
receive any of these fees.
|
||||||
</Trans>
|
</Trans>{' '}
|
||||||
|
<ExternalLink href="https://support.uniswap.org/hc/en-us/articles/18673568523789-What-is-a-token-fee-">
|
||||||
|
Learn more
|
||||||
|
</ExternalLink>
|
||||||
|
</>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<ThemedText.BodySmall color="textSecondary">{`${currency.symbol} fee`}</ThemedText.BodySmall>
|
<ThemedText.BodySmall color="textSecondary">{`${currency.symbol} fee`}</ThemedText.BodySmall>
|
||||||
|
|||||||
@ -15,7 +15,7 @@ import { ClassicTrade, InterfaceTrade, RouterPreference } from 'state/routing/ty
|
|||||||
import { getTransactionCount, isClassicTrade } from 'state/routing/utils'
|
import { getTransactionCount, isClassicTrade } from 'state/routing/utils'
|
||||||
import { useRouterPreference, useUserSlippageTolerance } from 'state/user/hooks'
|
import { useRouterPreference, useUserSlippageTolerance } from 'state/user/hooks'
|
||||||
import styled, { DefaultTheme, useTheme } from 'styled-components'
|
import styled, { DefaultTheme, useTheme } from 'styled-components'
|
||||||
import { ThemedText } from 'theme'
|
import { ExternalLink, ThemedText } from 'theme'
|
||||||
import { formatNumber, formatPriceImpact, NumberType } from 'utils/formatNumbers'
|
import { formatNumber, formatPriceImpact, NumberType } from 'utils/formatNumbers'
|
||||||
import { formatTransactionAmount, priceToPreciseFloat } from 'utils/formatNumbers'
|
import { formatTransactionAmount, priceToPreciseFloat } from 'utils/formatNumbers'
|
||||||
import getRoutingDiagramEntries from 'utils/getRoutingDiagramEntries'
|
import getRoutingDiagramEntries from 'utils/getRoutingDiagramEntries'
|
||||||
@ -227,10 +227,15 @@ function TokenTaxLineItem({ trade, type }: { trade: ClassicTrade; type: 'input'
|
|||||||
<Row align="flex-start" justify="space-between" gap="sm">
|
<Row align="flex-start" justify="space-between" gap="sm">
|
||||||
<MouseoverTooltip
|
<MouseoverTooltip
|
||||||
text={
|
text={
|
||||||
|
<>
|
||||||
<Trans>
|
<Trans>
|
||||||
Some tokens take a fee when they are bought or sold, which is set by the token issuer. Uniswap does not
|
Some tokens take a fee when they are bought or sold, which is set by the token issuer. Uniswap does not
|
||||||
receive any of these fees.
|
receive any of these fees.
|
||||||
</Trans>
|
</Trans>{' '}
|
||||||
|
<ExternalLink href="https://support.uniswap.org/hc/en-us/articles/18673568523789-What-is-a-token-fee-">
|
||||||
|
Learn more
|
||||||
|
</ExternalLink>
|
||||||
|
</>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Label cursor="help">{t`${currency.symbol} fee`}</Label>
|
<Label cursor="help">{t`${currency.symbol} fee`}</Label>
|
||||||
|
|||||||
@ -110,37 +110,6 @@ fragment TransactionDetailsParts on TransactionDetails {
|
|||||||
hash
|
hash
|
||||||
nonce
|
nonce
|
||||||
status
|
status
|
||||||
}
|
|
||||||
|
|
||||||
fragment SwapOrderDetailsParts on SwapOrderDetails {
|
|
||||||
id
|
|
||||||
offerer
|
|
||||||
hash
|
|
||||||
orderStatus: status
|
|
||||||
inputToken {
|
|
||||||
...TokenAssetParts
|
|
||||||
}
|
|
||||||
inputTokenQuantity
|
|
||||||
outputToken {
|
|
||||||
...TokenAssetParts
|
|
||||||
}
|
|
||||||
outputTokenQuantity
|
|
||||||
}
|
|
||||||
|
|
||||||
fragment AssetActivityParts on AssetActivity {
|
|
||||||
id
|
|
||||||
timestamp
|
|
||||||
type
|
|
||||||
chain
|
|
||||||
details {
|
|
||||||
__typename
|
|
||||||
... on TransactionDetails {
|
|
||||||
...TransactionDetailsParts
|
|
||||||
}
|
|
||||||
... on SwapOrderDetails {
|
|
||||||
...SwapOrderDetailsParts
|
|
||||||
}
|
|
||||||
}
|
|
||||||
assetChanges {
|
assetChanges {
|
||||||
__typename
|
__typename
|
||||||
... on TokenTransfer {
|
... on TokenTransfer {
|
||||||
@ -161,6 +130,36 @@ fragment AssetActivityParts on AssetActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fragment SwapOrderDetailsParts on SwapOrderDetails {
|
||||||
|
id
|
||||||
|
offerer
|
||||||
|
hash
|
||||||
|
orderStatus: status
|
||||||
|
inputToken {
|
||||||
|
...TokenAssetParts
|
||||||
|
}
|
||||||
|
inputTokenQuantity
|
||||||
|
outputToken {
|
||||||
|
...TokenAssetParts
|
||||||
|
}
|
||||||
|
outputTokenQuantity
|
||||||
|
}
|
||||||
|
|
||||||
|
fragment AssetActivityParts on AssetActivity {
|
||||||
|
id
|
||||||
|
timestamp
|
||||||
|
chain
|
||||||
|
details {
|
||||||
|
__typename
|
||||||
|
... on TransactionDetails {
|
||||||
|
...TransactionDetailsParts
|
||||||
|
}
|
||||||
|
... on SwapOrderDetails {
|
||||||
|
...SwapOrderDetailsParts
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# TODO(UniswapX): return to a pagesize of 50 pre-launch
|
# TODO(UniswapX): return to a pagesize of 50 pre-launch
|
||||||
query Activity($account: String!) {
|
query Activity($account: String!) {
|
||||||
portfolios(ownerAddresses: [$account]) {
|
portfolios(ownerAddresses: [$account]) {
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import { SkipToken, skipToken } from '@reduxjs/toolkit/query/react'
|
import { SkipToken, skipToken } from '@reduxjs/toolkit/query/react'
|
||||||
import { Currency, CurrencyAmount, Percent, TradeType } from '@uniswap/sdk-core'
|
import { Currency, CurrencyAmount, Percent, TradeType } from '@uniswap/sdk-core'
|
||||||
import { useFotAdjustmentsEnabled } from 'featureFlags/flags/fotAdjustments'
|
|
||||||
import { useUniswapXEthOutputEnabled } from 'featureFlags/flags/uniswapXEthOutput'
|
import { useUniswapXEthOutputEnabled } from 'featureFlags/flags/uniswapXEthOutput'
|
||||||
import { useUniswapXExactOutputEnabled } from 'featureFlags/flags/uniswapXExactOutput'
|
import { useUniswapXExactOutputEnabled } from 'featureFlags/flags/uniswapXExactOutput'
|
||||||
import { useUniswapXSyntheticQuoteEnabled } from 'featureFlags/flags/uniswapXUseSyntheticQuote'
|
import { useUniswapXSyntheticQuoteEnabled } from 'featureFlags/flags/uniswapXUseSyntheticQuote'
|
||||||
@ -37,7 +36,6 @@ export function useRoutingAPIArguments({
|
|||||||
const userDisabledUniswapX = useUserDisabledUniswapX()
|
const userDisabledUniswapX = useUserDisabledUniswapX()
|
||||||
const uniswapXEthOutputEnabled = useUniswapXEthOutputEnabled()
|
const uniswapXEthOutputEnabled = useUniswapXEthOutputEnabled()
|
||||||
const uniswapXExactOutputEnabled = useUniswapXExactOutputEnabled()
|
const uniswapXExactOutputEnabled = useUniswapXExactOutputEnabled()
|
||||||
const fotAdjustmentsEnabled = useFotAdjustmentsEnabled()
|
|
||||||
|
|
||||||
return useMemo(
|
return useMemo(
|
||||||
() =>
|
() =>
|
||||||
@ -61,7 +59,6 @@ export function useRoutingAPIArguments({
|
|||||||
userDisabledUniswapX,
|
userDisabledUniswapX,
|
||||||
uniswapXEthOutputEnabled,
|
uniswapXEthOutputEnabled,
|
||||||
uniswapXExactOutputEnabled,
|
uniswapXExactOutputEnabled,
|
||||||
fotAdjustmentsEnabled,
|
|
||||||
inputTax,
|
inputTax,
|
||||||
outputTax,
|
outputTax,
|
||||||
},
|
},
|
||||||
@ -76,7 +73,6 @@ export function useRoutingAPIArguments({
|
|||||||
uniswapXForceSyntheticQuotes,
|
uniswapXForceSyntheticQuotes,
|
||||||
userDisabledUniswapX,
|
userDisabledUniswapX,
|
||||||
uniswapXEthOutputEnabled,
|
uniswapXEthOutputEnabled,
|
||||||
fotAdjustmentsEnabled,
|
|
||||||
inputTax,
|
inputTax,
|
||||||
outputTax,
|
outputTax,
|
||||||
]
|
]
|
||||||
|
|||||||
3636
src/locales/af-ZA.po
Normal file
3636
src/locales/af-ZA.po
Normal file
File diff suppressed because it is too large
Load Diff
3636
src/locales/ar-SA.po
Normal file
3636
src/locales/ar-SA.po
Normal file
File diff suppressed because it is too large
Load Diff
3636
src/locales/ca-ES.po
Normal file
3636
src/locales/ca-ES.po
Normal file
File diff suppressed because it is too large
Load Diff
3636
src/locales/cs-CZ.po
Normal file
3636
src/locales/cs-CZ.po
Normal file
File diff suppressed because it is too large
Load Diff
3636
src/locales/da-DK.po
Normal file
3636
src/locales/da-DK.po
Normal file
File diff suppressed because it is too large
Load Diff
3636
src/locales/de-DE.po
Normal file
3636
src/locales/de-DE.po
Normal file
File diff suppressed because it is too large
Load Diff
3636
src/locales/el-GR.po
Normal file
3636
src/locales/el-GR.po
Normal file
File diff suppressed because it is too large
Load Diff
3636
src/locales/es-ES.po
Normal file
3636
src/locales/es-ES.po
Normal file
File diff suppressed because it is too large
Load Diff
3636
src/locales/fi-FI.po
Normal file
3636
src/locales/fi-FI.po
Normal file
File diff suppressed because it is too large
Load Diff
3636
src/locales/fr-FR.po
Normal file
3636
src/locales/fr-FR.po
Normal file
File diff suppressed because it is too large
Load Diff
3636
src/locales/he-IL.po
Normal file
3636
src/locales/he-IL.po
Normal file
File diff suppressed because it is too large
Load Diff
3637
src/locales/hu-HU.po
Normal file
3637
src/locales/hu-HU.po
Normal file
File diff suppressed because it is too large
Load Diff
3636
src/locales/id-ID.po
Normal file
3636
src/locales/id-ID.po
Normal file
File diff suppressed because it is too large
Load Diff
3636
src/locales/it-IT.po
Normal file
3636
src/locales/it-IT.po
Normal file
File diff suppressed because it is too large
Load Diff
3636
src/locales/ja-JP.po
Normal file
3636
src/locales/ja-JP.po
Normal file
File diff suppressed because it is too large
Load Diff
3636
src/locales/ko-KR.po
Normal file
3636
src/locales/ko-KR.po
Normal file
File diff suppressed because it is too large
Load Diff
3636
src/locales/nl-NL.po
Normal file
3636
src/locales/nl-NL.po
Normal file
File diff suppressed because it is too large
Load Diff
3636
src/locales/no-NO.po
Normal file
3636
src/locales/no-NO.po
Normal file
File diff suppressed because it is too large
Load Diff
3636
src/locales/pl-PL.po
Normal file
3636
src/locales/pl-PL.po
Normal file
File diff suppressed because it is too large
Load Diff
3636
src/locales/pt-BR.po
Normal file
3636
src/locales/pt-BR.po
Normal file
File diff suppressed because it is too large
Load Diff
3636
src/locales/pt-PT.po
Normal file
3636
src/locales/pt-PT.po
Normal file
File diff suppressed because it is too large
Load Diff
3636
src/locales/ro-RO.po
Normal file
3636
src/locales/ro-RO.po
Normal file
File diff suppressed because it is too large
Load Diff
3636
src/locales/ru-RU.po
Normal file
3636
src/locales/ru-RU.po
Normal file
File diff suppressed because it is too large
Load Diff
3636
src/locales/sl-SI.po
Normal file
3636
src/locales/sl-SI.po
Normal file
File diff suppressed because it is too large
Load Diff
3636
src/locales/sr-SP.po
Normal file
3636
src/locales/sr-SP.po
Normal file
File diff suppressed because it is too large
Load Diff
3636
src/locales/sv-SE.po
Normal file
3636
src/locales/sv-SE.po
Normal file
File diff suppressed because it is too large
Load Diff
3636
src/locales/sw-TZ.po
Normal file
3636
src/locales/sw-TZ.po
Normal file
File diff suppressed because it is too large
Load Diff
3636
src/locales/th-TH.po
Normal file
3636
src/locales/th-TH.po
Normal file
File diff suppressed because it is too large
Load Diff
3636
src/locales/tr-TR.po
Normal file
3636
src/locales/tr-TR.po
Normal file
File diff suppressed because it is too large
Load Diff
3636
src/locales/uk-UA.po
Normal file
3636
src/locales/uk-UA.po
Normal file
File diff suppressed because it is too large
Load Diff
3636
src/locales/vi-VN.po
Normal file
3636
src/locales/vi-VN.po
Normal file
File diff suppressed because it is too large
Load Diff
3636
src/locales/zh-CN.po
Normal file
3636
src/locales/zh-CN.po
Normal file
File diff suppressed because it is too large
Load Diff
3636
src/locales/zh-TW.po
Normal file
3636
src/locales/zh-TW.po
Normal file
File diff suppressed because it is too large
Load Diff
@ -46,7 +46,6 @@ export interface GetQuoteArgs {
|
|||||||
uniswapXEthOutputEnabled: boolean
|
uniswapXEthOutputEnabled: boolean
|
||||||
uniswapXExactOutputEnabled: boolean
|
uniswapXExactOutputEnabled: boolean
|
||||||
userDisabledUniswapX: boolean
|
userDisabledUniswapX: boolean
|
||||||
fotAdjustmentsEnabled: boolean
|
|
||||||
inputTax: Percent
|
inputTax: Percent
|
||||||
outputTax: Percent
|
outputTax: Percent
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import { Trans } from '@lingui/macro'
|
import { Trans } from '@lingui/macro'
|
||||||
import { ChainId, Currency, CurrencyAmount, Percent, TradeType } from '@uniswap/sdk-core'
|
import { ChainId, Currency, CurrencyAmount, Percent, TradeType } from '@uniswap/sdk-core'
|
||||||
import { useWeb3React } from '@web3-react/core'
|
import { useWeb3React } from '@web3-react/core'
|
||||||
|
import { useFotAdjustmentsEnabled } from 'featureFlags/flags/fotAdjustments'
|
||||||
import useAutoSlippageTolerance from 'hooks/useAutoSlippageTolerance'
|
import useAutoSlippageTolerance from 'hooks/useAutoSlippageTolerance'
|
||||||
import { useDebouncedTrade } from 'hooks/useDebouncedTrade'
|
import { useDebouncedTrade } from 'hooks/useDebouncedTrade'
|
||||||
import { useSwapTaxes } from 'hooks/useSwapTaxes'
|
import { useSwapTaxes } from 'hooks/useSwapTaxes'
|
||||||
@ -108,9 +109,10 @@ export function useDerivedSwapInfo(state: SwapState, chainId: ChainId | undefine
|
|||||||
const inputCurrency = useCurrency(inputCurrencyId, chainId)
|
const inputCurrency = useCurrency(inputCurrencyId, chainId)
|
||||||
const outputCurrency = useCurrency(outputCurrencyId, chainId)
|
const outputCurrency = useCurrency(outputCurrencyId, chainId)
|
||||||
|
|
||||||
|
const fotAdjustmentsEnabled = useFotAdjustmentsEnabled()
|
||||||
const { inputTax, outputTax } = useSwapTaxes(
|
const { inputTax, outputTax } = useSwapTaxes(
|
||||||
inputCurrency?.isToken ? inputCurrency.address : undefined,
|
inputCurrency?.isToken && fotAdjustmentsEnabled ? inputCurrency.address : undefined,
|
||||||
outputCurrency?.isToken ? outputCurrency.address : undefined
|
outputCurrency?.isToken && fotAdjustmentsEnabled ? outputCurrency.address : undefined
|
||||||
)
|
)
|
||||||
|
|
||||||
const recipientLookup = useENS(recipient ?? undefined)
|
const recipientLookup = useENS(recipient ?? undefined)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user