import React from "react"; import { Text, VStack } from "native-base"; import type { BridgeProvider } from "./types"; import { getCurrentBridgeFee } from "./utils"; export interface FeeInformationProps { sourceChain: string; targetChain: string; bridgeProvider: BridgeProvider; protocolFeePercent?: number; bridgeFees?: any; feesLoading?: boolean; } export const FeeInformation: React.FC = ({ sourceChain, targetChain, bridgeProvider, protocolFeePercent, bridgeFees, feesLoading = false }) => { const bridgeFeeDisplay = getCurrentBridgeFee( sourceChain, targetChain, bridgeProvider, bridgeFees ?? null, feesLoading ); return ( {typeof protocolFeePercent === "number" && ( Protocol Fee: {(protocolFeePercent * 100).toFixed(2)}% of bridged G$ amount )} Provider: {bridgeProvider.charAt(0).toUpperCase() + bridgeProvider.slice(1)} Bridge fee (pre-execution): {bridgeFeeDisplay} ); };