Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ import { getMultichainTxFees } from '../../../../hooks/useMultichainTransactionD
import { useMultichainBlockExplorerTxUrl } from '../../hooks/useMultichainBlockExplorerTxUrl';
import { StatusResponse } from '@metamask/bridge-status-controller';
import { toDateFormat } from '../../../../../util/date';
import TagColored, {
TagColor,
} from '../../../../../component-library/components-temp/TagColored';
// import { renderShortAddress } from '../../../../../util/address';

const styles = StyleSheet.create({
Expand Down Expand Up @@ -99,6 +102,24 @@ interface BridgeTransactionDetailsProps {
};
}

const PaidByMetaMask = () => (
<TagColored
color={TagColor.Success}
labelProps={{
variant: TextVariant.BodySM,
style: {
textTransform: 'none',
textAlign: 'center',
bottom: 1,
fontWeight: 'normal',
},
testID: 'paid-by-metamask',
}}
>
{strings('transactions.paid_by_metamask')}
</TagColored>
);
Comment thread
maxime-oe marked this conversation as resolved.

const BridgeStatusToColorMap: Record<StatusTypes, TextColor> = {
[StatusTypes.PENDING]: TextColor.Warning,
[StatusTypes.COMPLETE]: TextColor.Success,
Expand Down Expand Up @@ -371,18 +392,24 @@ export const BridgeTransactionDetails = (
<Text variant={TextVariant.BodyMDMedium}>
{strings('bridge_transaction_details.total_gas_fee')}
</Text>
{/* TODO get solana gas fee from multiChainTx */}
{evmTotalGasFee && (
<Text>
{evmTotalGasFee}{' '}
{getNativeAssetForChainId(quote.srcChainId).symbol}
</Text>
)}
{multiChainTotalGasFee && (
<Text>
{multiChainTotalGasFee}{' '}
{getNativeAssetForChainId(quote.srcChainId).symbol}
</Text>
{evmTxMeta?.isGasFeeSponsored ? (
<PaidByMetaMask />
) : (
<>
{/* TODO get solana gas fee from multiChainTx */}
{evmTotalGasFee && (
<Text>
{evmTotalGasFee}{' '}
{getNativeAssetForChainId(quote.srcChainId).symbol}
</Text>
)}
{multiChainTotalGasFee && (
<Text>
{multiChainTotalGasFee}{' '}
{getNativeAssetForChainId(quote.srcChainId).symbol}
</Text>
)}
</>
)}
</Box>
</Box>
Expand Down
Loading