diff --git a/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewOutputList/TransactionReviewTotalOutput.tsx b/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewOutputList/TransactionReviewTotalOutput.tsx index 66cf5b618f4..c45dc459cfb 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewOutputList/TransactionReviewTotalOutput.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewOutputList/TransactionReviewTotalOutput.tsx @@ -30,12 +30,12 @@ const getLines = ( const isEthereum = networkType === 'ethereum'; const isSolana = networkType === 'solana'; const showAmountWithoutFee = isEthereum || isSolana; - const feeLabel = ((network: NetworkType) => { + const feeLabelId = ((network: NetworkType) => { switch (network) { case 'ethereum': return 'MAX_FEE'; case 'solana': - return 'TR_TX_FEE'; + return 'TR_TX_FEE_INCLUDING_RENT'; default: return 'TR_INCLUDING_FEE'; } @@ -76,7 +76,7 @@ const getLines = ( }, { id: 'fee', - label: , + label: , value: precomposedTx.fee, type: 'amount', }, diff --git a/packages/suite/src/components/wallet/Fees/Fees.tsx b/packages/suite/src/components/wallet/Fees/Fees.tsx index 49bbd80abe2..a84a504d0cf 100644 --- a/packages/suite/src/components/wallet/Fees/Fees.tsx +++ b/packages/suite/src/components/wallet/Fees/Fees.tsx @@ -1,3 +1,4 @@ +import { useMemo } from 'react'; import { Control, FieldErrors, @@ -155,6 +156,29 @@ export const Fees = ({ const supportsCustomFee = networkType !== 'solana'; + const feeLabelId = useMemo(() => { + switch (networkType) { + case 'ethereum': + return 'MAX_FEE'; + case 'solana': + return 'TR_TX_FEE_INCLUDING_RENT'; + default: + return 'FEE'; + } + }, [networkType]); + + const feeTooltipTextId = useMemo(() => { + switch (networkType) { + case 'ethereum': + return 'TR_EVM_MAX_FEE_DESC'; + case 'solana': + // TODO: change to something that makes sense + return 'TR_TX_FEE_INCLUDING_RENT'; + default: + return 'TR_TRANSACTION_FEE_DESC'; + } + }, [networkType]); + return ( @@ -168,21 +192,10 @@ export const Fees = ({ - ) : ( - - ) - } + content={} > - + diff --git a/packages/suite/src/support/messages.ts b/packages/suite/src/support/messages.ts index 6116d280951..956b92a168d 100644 --- a/packages/suite/src/support/messages.ts +++ b/packages/suite/src/support/messages.ts @@ -3232,6 +3232,10 @@ export default defineMessages({ defaultMessage: 'Fee', id: 'TR_TX_FEE', }, + TR_TX_FEE_INCLUDING_RENT: { + defaultMessage: 'Fee (incl. rent)', + id: 'TR_TX_FEE_INCLUDING_RENT', + }, TR_UNCONFIRMED_TX: { defaultMessage: 'Unconfirmed', id: 'TR_UNCONFIRMED_TX', @@ -5511,6 +5515,10 @@ export default defineMessages({ id: 'INCLUDING_FEE', defaultMessage: 'Incl. fee', }, + INCLUDING_FEE_AND_RENT: { + id: 'INCLUDING_FEE_AND_RENT', + defaultMessage: 'Incl. fee and rent', + }, SEND_TRANSACTION: { id: 'SEND_TRANSACTION', description: 'Sign and send button used in Review modal', diff --git a/packages/suite/src/views/wallet/send/TotalSent/TotalSent.tsx b/packages/suite/src/views/wallet/send/TotalSent/TotalSent.tsx index 0d5ee113414..94d34ac8ceb 100644 --- a/packages/suite/src/views/wallet/send/TotalSent/TotalSent.tsx +++ b/packages/suite/src/views/wallet/send/TotalSent/TotalSent.tsx @@ -1,3 +1,5 @@ +import { useMemo } from 'react'; + import styled from 'styled-components'; import { formatAmount, formatNetworkAmount } from '@suite-common/wallet-utils'; @@ -26,6 +28,19 @@ export const TotalSent = () => { const isTokenTransfer = networkType === 'ethereum' && !!getValues('outputs.0.token'); const hasTransactionInfo = transactionInfo !== undefined && transactionInfo.type !== 'error'; const tokenInfo = hasTransactionInfo ? transactionInfo.token : undefined; + const includingRent = networkType === 'solana'; + + const feeLabelId = useMemo(() => { + if (isTokenTransfer) { + return 'FEE'; + } + + if (includingRent) { + return 'INCLUDING_FEE_AND_RENT'; + } + + return 'INCLUDING_FEE'; + }, [isTokenTransfer, includingRent]); return ( @@ -54,10 +69,7 @@ export const TotalSent = () => { )} - } - direction="row" - > + } direction="row"> {hasTransactionInfo && (tokenInfo ? (