1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 18:00:18 +01:00

Styling fix and content update for Swaps (#19284)

This commit is contained in:
Daniel 2023-05-25 18:48:11 +02:00 committed by GitHub
parent f0be1c3dba
commit af018efcb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 7 additions and 83 deletions

View File

@ -3573,10 +3573,6 @@
"message": "Sie benötigen $1 mehr $2, um diesen Swap abzuschließen", "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." "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": { "swapBuildQuotePlaceHolderText": {
"message": "Keine Token verfügbar mit $1", "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" "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"

View File

@ -3570,10 +3570,6 @@
"message": "Χρειάζεστε $1 περισσότερα $2 για να ολοκληρώσετε αυτήν την ανταλλαγή", "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." "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": { "swapBuildQuotePlaceHolderText": {
"message": "Δεν υπάρχουν διαθέσιμα tokens που να ταιριάζουν σε $1", "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" "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"

View File

@ -4117,10 +4117,6 @@
"message": "You need $1 more $2 to complete this swap", "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." "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": { "swapBuildQuotePlaceHolderText": {
"message": "No tokens available matching $1", "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" "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"

View File

@ -3573,10 +3573,6 @@
"message": "Necesita $1 más $2 para completar este canje", "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." "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": { "swapBuildQuotePlaceHolderText": {
"message": "No hay tokens disponibles que coincidan con $1", "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" "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"

View File

@ -2238,10 +2238,6 @@
"message": "Necesita $1 más $2 para realizar este canje", "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." "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": { "swapBuildQuotePlaceHolderText": {
"message": "No hay tokens disponibles que coincidan con $1", "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" "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"

View File

@ -3573,10 +3573,6 @@
"message": "Vous avez besoin de $1 $2 de plus pour effectuer ce swap", "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." "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": { "swapBuildQuotePlaceHolderText": {
"message": "Aucun jeton disponible correspondant à $1", "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" "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"

View File

@ -3573,10 +3573,6 @@
"message": "इस स्वैप को पूरा करने के लिए आपको अधिक $1 और $2 की आवश्यकता होगी", "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." "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": { "swapBuildQuotePlaceHolderText": {
"message": "$1 के मिलान वाले कोई भी टोकन उपलब्ध नहीं हैं", "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" "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"

View File

@ -3573,10 +3573,6 @@
"message": "Anda memerlukan $1 $2 lagi untuk menyelesaikan swap", "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." "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": { "swapBuildQuotePlaceHolderText": {
"message": "Tidak ada token yang cocok yang tersedia $1", "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" "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"

View File

@ -3573,10 +3573,6 @@
"message": "このスワップを完了させるには、さらに$1の$2が必要です。", "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." "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": { "swapBuildQuotePlaceHolderText": {
"message": "$1と一致するトークンがありません", "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" "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"

View File

@ -3573,10 +3573,6 @@
"message": "이 스왑을 완료하려면 $1개의 추가 $2이(가) 필요합니다.", "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." "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": { "swapBuildQuotePlaceHolderText": {
"message": "$1와(과) 일치하는 토큰이 없습니다.", "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" "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"

View File

@ -3573,10 +3573,6 @@
"message": "Você precisa de mais $1 $2 para concluir essa troca", "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." "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": { "swapBuildQuotePlaceHolderText": {
"message": "Nenhum token disponível correspondente a $1", "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" "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"

View File

@ -2238,10 +2238,6 @@
"message": "Você precisa de mais $1 $2 para concluir essa troca", "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." "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": { "swapBuildQuotePlaceHolderText": {
"message": "Nenhum token disponível correspondente a $1", "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" "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"

View File

@ -3573,10 +3573,6 @@
"message": "Вам нужно еще $1 $2 для завершения этого обмена", "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." "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": { "swapBuildQuotePlaceHolderText": {
"message": "Нет доступных токенов, соответствующих $1", "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" "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"

View File

@ -3573,10 +3573,6 @@
"message": "Kailangan mo ng $1 pa $2 para makumpleto ang pag-swap na ito", "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." "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": { "swapBuildQuotePlaceHolderText": {
"message": "Walang available na token na tumutugma sa $1", "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" "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"

View File

@ -3573,10 +3573,6 @@
"message": "Bu takası tamamlamak için $1 tane daha $2 gerekli", "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." "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": { "swapBuildQuotePlaceHolderText": {
"message": "$1 ile eşleşen token yok", "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" "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"

View File

@ -3573,10 +3573,6 @@
"message": "Bạn cần $1 $2 nữa để hoàn tất giao dịch hoán đổi này", "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." "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": { "swapBuildQuotePlaceHolderText": {
"message": "Không có token nào khớp với $1", "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" "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"

View File

@ -3573,10 +3573,6 @@
"message": "您还需要 $1 的 $2 来完成这笔交换", "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." "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": { "swapBuildQuotePlaceHolderText": {
"message": "没有与 $1 匹配的代币", "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" "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"

View File

@ -102,7 +102,7 @@ export default function AwaitingSignatures() {
</Text> </Text>
{needsTwoConfirmations && ( {needsTwoConfirmations && (
<> <>
<Text variant={TextVariant.bodyMdBold} boxProps={{ marginTop: 2 }}> <Text variant={TextVariant.bodyMdBold} marginTop={2}>
{t('swapToConfirmWithHwWallet')} {t('swapToConfirmWithHwWallet')}
</Text> </Text>
<ul className="awaiting-signatures__steps"> <ul className="awaiting-signatures__steps">

View File

@ -29,7 +29,6 @@ export default function FeeCard({
numberOfQuotes, numberOfQuotes,
onQuotesClick, onQuotesClick,
chainId, chainId,
isBestQuote,
}) { }) {
const t = useContext(I18nContext); const t = useContext(I18nContext);
const useCurrencyRateCheck = useSelector(getUseCurrencyRateCheck); const useCurrencyRateCheck = useSelector(getUseCurrencyRateCheck);
@ -167,9 +166,7 @@ export default function FeeCard({
onClick={onQuotesClick} onClick={onQuotesClick}
className="fee-card__quote-link-text" className="fee-card__quote-link-text"
> >
{isBestQuote {t('swapNQuotesWithDot', [numberOfQuotes])}
? t('swapBestOfNQuotes', [numberOfQuotes])
: t('swapNQuotesWithDot', [numberOfQuotes])}
</span> </span>
)} )}
{t('swapIncludesMMFee', [metaMaskFee])} {t('swapIncludesMMFee', [metaMaskFee])}
@ -202,5 +199,4 @@ FeeCard.propTypes = {
onQuotesClick: PropTypes.func.isRequired, onQuotesClick: PropTypes.func.isRequired,
numberOfQuotes: PropTypes.number.isRequired, numberOfQuotes: PropTypes.number.isRequired,
chainId: PropTypes.string.isRequired, chainId: PropTypes.string.isRequired,
isBestQuote: PropTypes.bool,
}; };

View File

@ -91,7 +91,6 @@ export default {
metaMaskFee: '0.875', metaMaskFee: '0.875',
numberOfQuotes: 6, numberOfQuotes: 6,
chainId: CHAIN_IDS.MAINNET, chainId: CHAIN_IDS.MAINNET,
isBestQuote: true,
}, },
}; };

View File

@ -95,7 +95,7 @@ describe('FeeCard', () => {
useSelector.mockImplementation(generateUseSelectorRouter()); useSelector.mockImplementation(generateUseSelectorRouter());
const props = createProps(); const props = createProps();
const { getByText } = renderWithProvider(<FeeCard {...props} />); 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('Estimated gas fee')).toBeInTheDocument();
expect(getByText('Max fee')).toBeInTheDocument(); expect(getByText('Max fee')).toBeInTheDocument();
expect(getByText(props.primaryFee.fee)).toBeInTheDocument(); expect(getByText(props.primaryFee.fee)).toBeInTheDocument();
@ -116,7 +116,7 @@ describe('FeeCard', () => {
maxFeePerGasDecGWEI: '4', maxFeePerGasDecGWEI: '4',
}); });
const { getByText } = renderWithProvider(<FeeCard {...props} />); 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('Estimated gas fee')).toBeInTheDocument();
expect(getByText('Max fee')).toBeInTheDocument(); expect(getByText('Max fee')).toBeInTheDocument();
expect(getByText(props.primaryFee.fee)).toBeInTheDocument(); expect(getByText(props.primaryFee.fee)).toBeInTheDocument();
@ -138,7 +138,7 @@ describe('FeeCard', () => {
const { getByText, queryByTestId } = renderWithProvider( const { getByText, queryByTestId } = renderWithProvider(
<FeeCard {...props} />, <FeeCard {...props} />,
); );
expect(getByText('Best of 6 quotes.')).toBeInTheDocument(); expect(getByText('6 quotes.')).toBeInTheDocument();
expect(getByText('Estimated gas fee')).toBeInTheDocument(); expect(getByText('Estimated gas fee')).toBeInTheDocument();
expect(getByText(props.primaryFee.fee)).toBeInTheDocument(); expect(getByText(props.primaryFee.fee)).toBeInTheDocument();
expect(getByText(props.secondaryFee.fee)).toBeInTheDocument(); expect(getByText(props.secondaryFee.fee)).toBeInTheDocument();

View File

@ -210,7 +210,7 @@ export default function SlippageButtons({
<Text <Text
variant={TextVariant.bodySm} variant={TextVariant.bodySm}
as="h6" as="h6"
boxProps={{ paddingRight: 2 }} paddingRight={2}
fontWeight={FontWeight.Bold} fontWeight={FontWeight.Bold}
> >
{t('smartTransaction')} {t('smartTransaction')}

View File

@ -211,8 +211,6 @@ export default function ViewQuote() {
}); });
} }
const { isBestQuote } = usedQuote;
const fetchParamsSourceToken = fetchParams?.sourceToken; const fetchParamsSourceToken = fetchParams?.sourceToken;
const additionalTrackingParams = { const additionalTrackingParams = {
@ -1036,7 +1034,6 @@ export default function ViewQuote() {
} }
} }
chainId={chainId} chainId={chainId}
isBestQuote={isBestQuote}
maxPriorityFeePerGasDecGWEI={hexWEIToDecGWEI( maxPriorityFeePerGasDecGWEI={hexWEIToDecGWEI(
maxPriorityFeePerGas, maxPriorityFeePerGas,
)} )}