Skip to content

Commit 6f5d2d1

Browse files
Add Fiat tooltip for channels and channel details card
Fixes #138
1 parent 62e50fd commit 6f5d2d1

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

apps/frontend/src/components/cln/ChannelDetails/ChannelDetails.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { CLNService } from '../../../services/http.service';
1616
import { setShowToast } from '../../../store/rootSlice';
1717
import { useDispatch, useSelector } from 'react-redux';
1818
import { selectNodeInfo, selectShowToast, selectUIConfigUnit } from '../../../store/rootSelectors';
19+
import CurrencyBox from '../../shared/CurrencyBox/CurrencyBox';
1920

2021
const ChannelDetails = (props) => {
2122
const dispatch = useDispatch();
@@ -128,10 +129,10 @@ const ChannelDetails = (props) => {
128129
</ProgressBar>
129130
<Row className='text-light d-flex align-items-end justify-content-between'>
130131
<Col xs={6} className='fs-7 fw-bold d-flex justify-content-start text-primary'>
131-
{formatCurrency(props.selChannel.to_us_sat, Units.SATS, uiConfigUnit, false, 5, 'string')} {uiConfigUnit}
132+
<CurrencyBox value={props.selChannel.to_us_sat} shorten={false} rootClasses='d-inline-flex flex-row' currencyClasses='fs-7' unitClasses='ms-1 fs-7'></CurrencyBox>
132133
</Col>
133134
<Col xs={6} className='fs-7 fw-bold d-flex justify-content-end'>
134-
{formatCurrency(props.selChannel.to_them_sat, Units.SATS, uiConfigUnit, false, 5, 'string')} {uiConfigUnit}
135+
<CurrencyBox value={props.selChannel.to_them_sat} shorten={false} rootClasses='d-inline-flex flex-row' currencyClasses='fs-7' unitClasses='ms-1 fs-7'></CurrencyBox>
135136
</Col>
136137
</Row>
137138
</Col>

apps/frontend/src/components/cln/Channels/Channels.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ import { motion } from 'framer-motion';
33
import PerfectScrollbar from 'react-perfect-scrollbar';
44
import { Spinner, Card, Row, Col, ListGroup, Alert, ProgressBar, OverlayTrigger, Tooltip } from 'react-bootstrap';
55

6-
import { formatCurrency, titleCase } from '../../../utilities/data-formatters';
6+
import { titleCase } from '../../../utilities/data-formatters';
77
import { ActionSVG } from '../../../svgs/Action';
8-
import { STAGERRED_SPRING_VARIANTS_3, Units } from '../../../utilities/constants';
8+
import { STAGERRED_SPRING_VARIANTS_3 } from '../../../utilities/constants';
99
import { NoChannelLightSVG } from '../../../svgs/NoChannelLight';
1010
import { NoChannelDarkSVG } from '../../../svgs/NoChannelDark';
1111
import { useSelector } from 'react-redux';
12-
import { selectIsAuthenticated, selectIsDarkMode, selectListChannels, selectUIConfigUnit } from '../../../store/rootSelectors';
12+
import { selectIsAuthenticated, selectIsDarkMode, selectListChannels } from '../../../store/rootSelectors';
13+
import CurrencyBox from '../../shared/CurrencyBox/CurrencyBox';
1314

1415
const Channels = (props) => {
1516
const isDarkMode = useSelector(selectIsDarkMode);
1617
const isAuthenticated = useSelector(selectIsAuthenticated);
17-
const uiConfigUnit = useSelector(selectUIConfigUnit);
1818
const listChannels = useSelector(selectListChannels);
1919

2020
return (
@@ -59,10 +59,10 @@ const Channels = (props) => {
5959
</ProgressBar>
6060
<Row className='text-light d-flex align-items-end justify-content-between'>
6161
<Col xs={6} className='fs-7 fw-bold d-flex justify-content-start text-primary'>
62-
{formatCurrency(channel.to_us_sat, Units.SATS, uiConfigUnit, false, 5, 'string')} {uiConfigUnit}
62+
<CurrencyBox value={channel.to_us_sat} shorten={false} rootClasses='d-inline-flex flex-row' currencyClasses='fs-7' unitClasses='ms-1 fs-7'></CurrencyBox>
6363
</Col>
6464
<Col xs={6} className='fs-7 fw-bold d-flex justify-content-end'>
65-
{formatCurrency(channel.to_them_sat, Units.SATS, uiConfigUnit, false, 5, 'string')} {uiConfigUnit}
65+
<CurrencyBox value={channel.to_them_sat} shorten={false} rootClasses='d-inline-flex flex-row' currencyClasses='fs-7' unitClasses='ms-1 fs-7'></CurrencyBox>
6666
</Col>
6767
</Row>
6868
</>

0 commit comments

Comments
 (0)