diff --git a/suite-native/module-send/src/components/ReviewOutputItem.tsx b/suite-native/module-send/src/components/ReviewOutputItem.tsx index 24ba5e51b3d..a128e5f42e7 100644 --- a/suite-native/module-send/src/components/ReviewOutputItem.tsx +++ b/suite-native/module-send/src/components/ReviewOutputItem.tsx @@ -13,28 +13,33 @@ type ReviewOutputItemProps = { reviewOutput: StatefulReviewOutput; onLayout: (event: LayoutChangeEvent) => void; }; -type SupportedOutputType = Extract; const outputLabelTranslationMap = { address: 'moduleSend.review.outputs.addressLabel', + regular_legacy: 'moduleSend.review.outputs.addressLabel', amount: 'moduleSend.review.outputs.amountLabel', -} as const satisfies Record; +} as const satisfies Partial>; + +const isTranslationDefined = ( + type: ReviewOutputType, +): type is keyof typeof outputLabelTranslationMap => { + return type in outputLabelTranslationMap; +}; export const ReviewOutputItem = ({ reviewOutput, networkSymbol, onLayout, }: ReviewOutputItemProps) => { + const { state, type, value } = reviewOutput; const { translate } = useTranslate(); - const { state, type, value } = reviewOutput; + const titleTxKey = isTranslationDefined(type) ? outputLabelTranslationMap[type] : null; + const title = titleTxKey ? translate(titleTxKey) : type; return ( - + {chunkedAddress}; diff --git a/suite-native/module-send/src/selectors.ts b/suite-native/module-send/src/selectors.ts index e5578426cd0..f8fce3af59d 100644 --- a/suite-native/module-send/src/selectors.ts +++ b/suite-native/module-send/src/selectors.ts @@ -13,6 +13,7 @@ import { } from '@suite-common/wallet-core'; import { constructTransactionReviewOutputs, + getIsUpdatedSendFlow, getTransactionReviewOutputState, isRbfTransaction, } from '@suite-common/wallet-utils'; @@ -50,7 +51,11 @@ export const selectTransactionReviewOutputs = ( precomposedTx, }); - return outputs?.map( + const newFlowOutputs = getIsUpdatedSendFlow(device) + ? outputs + : outputs?.filter(output => output.type !== 'fee'); // The `fee` output is already included in the final transaction summary output. + + return newFlowOutputs.map( (output, outputIndex) => ({ ...output,