mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-22 17:33:23 +01:00
Styling fix and content update for Swaps (#19284)
This commit is contained in:
parent
c42d3920f8
commit
a62de72aaa
4
app/_locales/de/messages.json
generated
4
app/_locales/de/messages.json
generated
@ -3585,10 +3585,6 @@
|
||||
"message": "Sie benötigen $1 mehr $2, um diesen Swap abzuschließen",
|
||||
"description": "Tells the user how many more of a given token they need for a specific swap. $1 is an amount of tokens and $2 is the token symbol."
|
||||
},
|
||||
"swapBestOfNQuotes": {
|
||||
"message": "Die besten $1 Kurse.",
|
||||
"description": "$1 is the number of quotes that the user can select from when opening the list of quotes on the 'view quote' screen"
|
||||
},
|
||||
"swapBuildQuotePlaceHolderText": {
|
||||
"message": "Keine Token verfügbar mit $1",
|
||||
"description": "Tells the user that a given search string does not match any tokens in our token lists. $1 can be any string of text"
|
||||
|
4
app/_locales/el/messages.json
generated
4
app/_locales/el/messages.json
generated
@ -3585,10 +3585,6 @@
|
||||
"message": "Χρειάζεστε $1 περισσότερα $2 για να ολοκληρώσετε αυτήν την ανταλλαγή",
|
||||
"description": "Tells the user how many more of a given token they need for a specific swap. $1 is an amount of tokens and $2 is the token symbol."
|
||||
},
|
||||
"swapBestOfNQuotes": {
|
||||
"message": "Το καλύτερο από $1 προσφορές.",
|
||||
"description": "$1 is the number of quotes that the user can select from when opening the list of quotes on the 'view quote' screen"
|
||||
},
|
||||
"swapBuildQuotePlaceHolderText": {
|
||||
"message": "Δεν υπάρχουν διαθέσιμα tokens που να ταιριάζουν σε $1",
|
||||
"description": "Tells the user that a given search string does not match any tokens in our token lists. $1 can be any string of text"
|
||||
|
4
app/_locales/en/messages.json
generated
4
app/_locales/en/messages.json
generated
@ -4086,10 +4086,6 @@
|
||||
"message": "You need $1 more $2 to complete this swap",
|
||||
"description": "Tells the user how many more of a given token they need for a specific swap. $1 is an amount of tokens and $2 is the token symbol."
|
||||
},
|
||||
"swapBestOfNQuotes": {
|
||||
"message": "Best of $1 quotes.",
|
||||
"description": "$1 is the number of quotes that the user can select from when opening the list of quotes on the 'view quote' screen"
|
||||
},
|
||||
"swapBuildQuotePlaceHolderText": {
|
||||
"message": "No tokens available matching $1",
|
||||
"description": "Tells the user that a given search string does not match any tokens in our token lists. $1 can be any string of text"
|
||||
|
4
app/_locales/es/messages.json
generated
4
app/_locales/es/messages.json
generated
@ -3585,10 +3585,6 @@
|
||||
"message": "Necesita $1 más $2 para completar este canje",
|
||||
"description": "Tells the user how many more of a given token they need for a specific swap. $1 is an amount of tokens and $2 is the token symbol."
|
||||
},
|
||||
"swapBestOfNQuotes": {
|
||||
"message": "Mejor cotización de $1.",
|
||||
"description": "$1 is the number of quotes that the user can select from when opening the list of quotes on the 'view quote' screen"
|
||||
},
|
||||
"swapBuildQuotePlaceHolderText": {
|
||||
"message": "No hay tokens disponibles que coincidan con $1",
|
||||
"description": "Tells the user that a given search string does not match any tokens in our token lists. $1 can be any string of text"
|
||||
|
4
app/_locales/es_419/messages.json
generated
4
app/_locales/es_419/messages.json
generated
@ -2241,10 +2241,6 @@
|
||||
"message": "Necesita $1 más $2 para realizar este canje",
|
||||
"description": "Tells the user how many more of a given token they need for a specific swap. $1 is an amount of tokens and $2 is the token symbol."
|
||||
},
|
||||
"swapBestOfNQuotes": {
|
||||
"message": "Mejor cotización de $1.",
|
||||
"description": "$1 is the number of quotes that the user can select from when opening the list of quotes on the 'view quote' screen"
|
||||
},
|
||||
"swapBuildQuotePlaceHolderText": {
|
||||
"message": "No hay tokens disponibles que coincidan con $1",
|
||||
"description": "Tells the user that a given search string does not match any tokens in our token lists. $1 can be any string of text"
|
||||
|
4
app/_locales/fr/messages.json
generated
4
app/_locales/fr/messages.json
generated
@ -3585,10 +3585,6 @@
|
||||
"message": "Vous avez besoin de $1 $2 de plus pour effectuer ce swap",
|
||||
"description": "Tells the user how many more of a given token they need for a specific swap. $1 is an amount of tokens and $2 is the token symbol."
|
||||
},
|
||||
"swapBestOfNQuotes": {
|
||||
"message": "Meilleures cotations de $1.",
|
||||
"description": "$1 is the number of quotes that the user can select from when opening the list of quotes on the 'view quote' screen"
|
||||
},
|
||||
"swapBuildQuotePlaceHolderText": {
|
||||
"message": "Aucun jeton disponible correspondant à $1",
|
||||
"description": "Tells the user that a given search string does not match any tokens in our token lists. $1 can be any string of text"
|
||||
|
4
app/_locales/hi/messages.json
generated
4
app/_locales/hi/messages.json
generated
@ -3585,10 +3585,6 @@
|
||||
"message": "इस स्वैप को पूरा करने के लिए आपको अधिक $1 और $2 की आवश्यकता होगी",
|
||||
"description": "Tells the user how many more of a given token they need for a specific swap. $1 is an amount of tokens and $2 is the token symbol."
|
||||
},
|
||||
"swapBestOfNQuotes": {
|
||||
"message": "$1 उद्धरणों में से सर्वश्रेष्ठ।",
|
||||
"description": "$1 is the number of quotes that the user can select from when opening the list of quotes on the 'view quote' screen"
|
||||
},
|
||||
"swapBuildQuotePlaceHolderText": {
|
||||
"message": "$1 के मिलान वाले कोई भी टोकन उपलब्ध नहीं हैं",
|
||||
"description": "Tells the user that a given search string does not match any tokens in our token lists. $1 can be any string of text"
|
||||
|
4
app/_locales/id/messages.json
generated
4
app/_locales/id/messages.json
generated
@ -3585,10 +3585,6 @@
|
||||
"message": "Anda memerlukan $1 $2 lagi untuk menyelesaikan swap",
|
||||
"description": "Tells the user how many more of a given token they need for a specific swap. $1 is an amount of tokens and $2 is the token symbol."
|
||||
},
|
||||
"swapBestOfNQuotes": {
|
||||
"message": "Kuotasi terbaik dari $1.",
|
||||
"description": "$1 is the number of quotes that the user can select from when opening the list of quotes on the 'view quote' screen"
|
||||
},
|
||||
"swapBuildQuotePlaceHolderText": {
|
||||
"message": "Tidak ada token yang cocok yang tersedia $1",
|
||||
"description": "Tells the user that a given search string does not match any tokens in our token lists. $1 can be any string of text"
|
||||
|
4
app/_locales/ja/messages.json
generated
4
app/_locales/ja/messages.json
generated
@ -3585,10 +3585,6 @@
|
||||
"message": "このスワップを完了させるには、さらに$1の$2が必要です。",
|
||||
"description": "Tells the user how many more of a given token they need for a specific swap. $1 is an amount of tokens and $2 is the token symbol."
|
||||
},
|
||||
"swapBestOfNQuotes": {
|
||||
"message": "最善の$1の見積もり。",
|
||||
"description": "$1 is the number of quotes that the user can select from when opening the list of quotes on the 'view quote' screen"
|
||||
},
|
||||
"swapBuildQuotePlaceHolderText": {
|
||||
"message": "$1と一致するトークンがありません",
|
||||
"description": "Tells the user that a given search string does not match any tokens in our token lists. $1 can be any string of text"
|
||||
|
4
app/_locales/ko/messages.json
generated
4
app/_locales/ko/messages.json
generated
@ -3585,10 +3585,6 @@
|
||||
"message": "이 스왑을 완료하려면 $1개의 추가 $2이(가) 필요합니다.",
|
||||
"description": "Tells the user how many more of a given token they need for a specific swap. $1 is an amount of tokens and $2 is the token symbol."
|
||||
},
|
||||
"swapBestOfNQuotes": {
|
||||
"message": "$1의 최고 견적",
|
||||
"description": "$1 is the number of quotes that the user can select from when opening the list of quotes on the 'view quote' screen"
|
||||
},
|
||||
"swapBuildQuotePlaceHolderText": {
|
||||
"message": "$1와(과) 일치하는 토큰이 없습니다.",
|
||||
"description": "Tells the user that a given search string does not match any tokens in our token lists. $1 can be any string of text"
|
||||
|
4
app/_locales/pt/messages.json
generated
4
app/_locales/pt/messages.json
generated
@ -3585,10 +3585,6 @@
|
||||
"message": "Você precisa de mais $1 $2 para concluir essa troca",
|
||||
"description": "Tells the user how many more of a given token they need for a specific swap. $1 is an amount of tokens and $2 is the token symbol."
|
||||
},
|
||||
"swapBestOfNQuotes": {
|
||||
"message": "Melhores cotações de $1.",
|
||||
"description": "$1 is the number of quotes that the user can select from when opening the list of quotes on the 'view quote' screen"
|
||||
},
|
||||
"swapBuildQuotePlaceHolderText": {
|
||||
"message": "Nenhum token disponível correspondente a $1",
|
||||
"description": "Tells the user that a given search string does not match any tokens in our token lists. $1 can be any string of text"
|
||||
|
4
app/_locales/pt_BR/messages.json
generated
4
app/_locales/pt_BR/messages.json
generated
@ -2241,10 +2241,6 @@
|
||||
"message": "Você precisa de mais $1 $2 para concluir essa troca",
|
||||
"description": "Tells the user how many more of a given token they need for a specific swap. $1 is an amount of tokens and $2 is the token symbol."
|
||||
},
|
||||
"swapBestOfNQuotes": {
|
||||
"message": "Melhores cotações de $1.",
|
||||
"description": "$1 is the number of quotes that the user can select from when opening the list of quotes on the 'view quote' screen"
|
||||
},
|
||||
"swapBuildQuotePlaceHolderText": {
|
||||
"message": "Nenhum token disponível correspondente a $1",
|
||||
"description": "Tells the user that a given search string does not match any tokens in our token lists. $1 can be any string of text"
|
||||
|
4
app/_locales/ru/messages.json
generated
4
app/_locales/ru/messages.json
generated
@ -3585,10 +3585,6 @@
|
||||
"message": "Вам нужно еще $1 $2 для завершения этого обмена",
|
||||
"description": "Tells the user how many more of a given token they need for a specific swap. $1 is an amount of tokens and $2 is the token symbol."
|
||||
},
|
||||
"swapBestOfNQuotes": {
|
||||
"message": "Лучшие котировки $1.",
|
||||
"description": "$1 is the number of quotes that the user can select from when opening the list of quotes on the 'view quote' screen"
|
||||
},
|
||||
"swapBuildQuotePlaceHolderText": {
|
||||
"message": "Нет доступных токенов, соответствующих $1",
|
||||
"description": "Tells the user that a given search string does not match any tokens in our token lists. $1 can be any string of text"
|
||||
|
4
app/_locales/tl/messages.json
generated
4
app/_locales/tl/messages.json
generated
@ -3585,10 +3585,6 @@
|
||||
"message": "Kailangan mo ng $1 pa $2 para makumpleto ang pag-swap na ito",
|
||||
"description": "Tells the user how many more of a given token they need for a specific swap. $1 is an amount of tokens and $2 is the token symbol."
|
||||
},
|
||||
"swapBestOfNQuotes": {
|
||||
"message": "Pinakamaganda ng $1 na quote.",
|
||||
"description": "$1 is the number of quotes that the user can select from when opening the list of quotes on the 'view quote' screen"
|
||||
},
|
||||
"swapBuildQuotePlaceHolderText": {
|
||||
"message": "Walang available na token na tumutugma sa $1",
|
||||
"description": "Tells the user that a given search string does not match any tokens in our token lists. $1 can be any string of text"
|
||||
|
4
app/_locales/tr/messages.json
generated
4
app/_locales/tr/messages.json
generated
@ -3585,10 +3585,6 @@
|
||||
"message": "Bu takası tamamlamak için $1 tane daha $2 gerekli",
|
||||
"description": "Tells the user how many more of a given token they need for a specific swap. $1 is an amount of tokens and $2 is the token symbol."
|
||||
},
|
||||
"swapBestOfNQuotes": {
|
||||
"message": "En iyi $1 teklifleri.",
|
||||
"description": "$1 is the number of quotes that the user can select from when opening the list of quotes on the 'view quote' screen"
|
||||
},
|
||||
"swapBuildQuotePlaceHolderText": {
|
||||
"message": "$1 ile eşleşen token yok",
|
||||
"description": "Tells the user that a given search string does not match any tokens in our token lists. $1 can be any string of text"
|
||||
|
4
app/_locales/vi/messages.json
generated
4
app/_locales/vi/messages.json
generated
@ -3585,10 +3585,6 @@
|
||||
"message": "Bạn cần $1 $2 nữa để hoàn tất giao dịch hoán đổi này",
|
||||
"description": "Tells the user how many more of a given token they need for a specific swap. $1 is an amount of tokens and $2 is the token symbol."
|
||||
},
|
||||
"swapBestOfNQuotes": {
|
||||
"message": "Tốt nhất trong $1 báo giá.",
|
||||
"description": "$1 is the number of quotes that the user can select from when opening the list of quotes on the 'view quote' screen"
|
||||
},
|
||||
"swapBuildQuotePlaceHolderText": {
|
||||
"message": "Không có token nào khớp với $1",
|
||||
"description": "Tells the user that a given search string does not match any tokens in our token lists. $1 can be any string of text"
|
||||
|
4
app/_locales/zh_CN/messages.json
generated
4
app/_locales/zh_CN/messages.json
generated
@ -3585,10 +3585,6 @@
|
||||
"message": "您还需要 $1 的 $2 来完成这笔交换",
|
||||
"description": "Tells the user how many more of a given token they need for a specific swap. $1 is an amount of tokens and $2 is the token symbol."
|
||||
},
|
||||
"swapBestOfNQuotes": {
|
||||
"message": "$1 报价中最棒的。",
|
||||
"description": "$1 is the number of quotes that the user can select from when opening the list of quotes on the 'view quote' screen"
|
||||
},
|
||||
"swapBuildQuotePlaceHolderText": {
|
||||
"message": "没有与 $1 匹配的代币",
|
||||
"description": "Tells the user that a given search string does not match any tokens in our token lists. $1 can be any string of text"
|
||||
|
@ -102,7 +102,7 @@ export default function AwaitingSignatures() {
|
||||
</Text>
|
||||
{needsTwoConfirmations && (
|
||||
<>
|
||||
<Text variant={TextVariant.bodyMdBold} boxProps={{ marginTop: 2 }}>
|
||||
<Text variant={TextVariant.bodyMdBold} marginTop={2}>
|
||||
{t('swapToConfirmWithHwWallet')}
|
||||
</Text>
|
||||
<ul className="awaiting-signatures__steps">
|
||||
|
@ -29,7 +29,6 @@ export default function FeeCard({
|
||||
numberOfQuotes,
|
||||
onQuotesClick,
|
||||
chainId,
|
||||
isBestQuote,
|
||||
}) {
|
||||
const t = useContext(I18nContext);
|
||||
const useCurrencyRateCheck = useSelector(getUseCurrencyRateCheck);
|
||||
@ -167,9 +166,7 @@ export default function FeeCard({
|
||||
onClick={onQuotesClick}
|
||||
className="fee-card__quote-link-text"
|
||||
>
|
||||
{isBestQuote
|
||||
? t('swapBestOfNQuotes', [numberOfQuotes])
|
||||
: t('swapNQuotesWithDot', [numberOfQuotes])}
|
||||
{t('swapNQuotesWithDot', [numberOfQuotes])}
|
||||
</span>
|
||||
)}
|
||||
{t('swapIncludesMMFee', [metaMaskFee])}
|
||||
@ -202,5 +199,4 @@ FeeCard.propTypes = {
|
||||
onQuotesClick: PropTypes.func.isRequired,
|
||||
numberOfQuotes: PropTypes.number.isRequired,
|
||||
chainId: PropTypes.string.isRequired,
|
||||
isBestQuote: PropTypes.bool,
|
||||
};
|
||||
|
@ -91,7 +91,6 @@ export default {
|
||||
metaMaskFee: '0.875',
|
||||
numberOfQuotes: 6,
|
||||
chainId: CHAIN_IDS.MAINNET,
|
||||
isBestQuote: true,
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -95,7 +95,7 @@ describe('FeeCard', () => {
|
||||
useSelector.mockImplementation(generateUseSelectorRouter());
|
||||
const props = createProps();
|
||||
const { getByText } = renderWithProvider(<FeeCard {...props} />);
|
||||
expect(getByText('Best of 6 quotes.')).toBeInTheDocument();
|
||||
expect(getByText('6 quotes.')).toBeInTheDocument();
|
||||
expect(getByText('Estimated gas fee')).toBeInTheDocument();
|
||||
expect(getByText('Max fee')).toBeInTheDocument();
|
||||
expect(getByText(props.primaryFee.fee)).toBeInTheDocument();
|
||||
@ -116,7 +116,7 @@ describe('FeeCard', () => {
|
||||
maxFeePerGasDecGWEI: '4',
|
||||
});
|
||||
const { getByText } = renderWithProvider(<FeeCard {...props} />);
|
||||
expect(getByText('Best of 6 quotes.')).toBeInTheDocument();
|
||||
expect(getByText('6 quotes.')).toBeInTheDocument();
|
||||
expect(getByText('Estimated gas fee')).toBeInTheDocument();
|
||||
expect(getByText('Max fee')).toBeInTheDocument();
|
||||
expect(getByText(props.primaryFee.fee)).toBeInTheDocument();
|
||||
@ -138,7 +138,7 @@ describe('FeeCard', () => {
|
||||
const { getByText, queryByTestId } = renderWithProvider(
|
||||
<FeeCard {...props} />,
|
||||
);
|
||||
expect(getByText('Best of 6 quotes.')).toBeInTheDocument();
|
||||
expect(getByText('6 quotes.')).toBeInTheDocument();
|
||||
expect(getByText('Estimated gas fee')).toBeInTheDocument();
|
||||
expect(getByText(props.primaryFee.fee)).toBeInTheDocument();
|
||||
expect(getByText(props.secondaryFee.fee)).toBeInTheDocument();
|
||||
|
@ -210,7 +210,7 @@ export default function SlippageButtons({
|
||||
<Text
|
||||
variant={TextVariant.bodySm}
|
||||
as="h6"
|
||||
boxProps={{ paddingRight: 2 }}
|
||||
paddingRight={2}
|
||||
fontWeight={FontWeight.Bold}
|
||||
>
|
||||
{t('smartTransaction')}
|
||||
|
@ -213,8 +213,6 @@ export default function ViewQuote() {
|
||||
});
|
||||
}
|
||||
|
||||
const { isBestQuote } = usedQuote;
|
||||
|
||||
const fetchParamsSourceToken = fetchParams?.sourceToken;
|
||||
|
||||
const additionalTrackingParams = {
|
||||
@ -1034,7 +1032,6 @@ export default function ViewQuote() {
|
||||
}
|
||||
}
|
||||
chainId={chainId}
|
||||
isBestQuote={isBestQuote}
|
||||
maxPriorityFeePerGasDecGWEI={hexWEIToDecGWEI(
|
||||
maxPriorityFeePerGas,
|
||||
)}
|
||||
|
Loading…
Reference in New Issue
Block a user