@@ -170,37 +240,86 @@ export const ChannelCard = ({
);
};
+ const renderBars = () => {
+ switch (channelBarType) {
+ case 'partner':
+ return (
+ <>
+
+
+
+
+ >
+ );
+ default:
+ return (
+ <>
+
+
+
+
+ >
+ );
+ }
+ };
+
+ const renderBarsInfo = () => {
+ switch (channelBarType) {
+ case 'partner':
+ return (
+ <>
+ {`Partner Capacity: ${nodeCapacity}`}
+ {`Partner Channels: ${channel_count}`}
+ {`Partner Base Fee: ${base_fee} mSats`}
+ {`Partner Fee Rate: ${fee_rate} sats/MSats`}
+ >
+ );
+ default:
+ return (
+ <>
+ {`Local Balance: ${formatLocal}`}
+ {`Remote Balance: ${formatRemote}`}
+ {`Received: ${formatReceived}`}
+ {`Sent: ${formatSent}`}
+ >
+ );
+ }
+ };
+
return (
-
- handleClick()}>
-
- {getStatusDot(is_active, 'active')}
- {getStatusDot(is_opening, 'opening')}
- {getStatusDot(is_closing, 'closing')}
-
-
-
+
+
+ {getStatusDot(is_active, 'active')}
+ {getStatusDot(is_opening, 'opening')}
+ {getStatusDot(is_closing, 'closing')}
+
+
+
+ handleClick()}>
{alias || partner_public_key?.substring(0, 6)}
-
-
- {formatBalance}
-
- {getPrivate(is_private)}
- {getSymbol(is_partner_initiated)}
-
-
-
-
-
-
-
-
+ {formatBalance}
+
+
+
+
+ {renderBars()}
+
+
+
+ {getPrivate(is_private)}
+ {getSymbol(is_partner_initiated)}
+
+