From 418f36978169b51b0ad6608fe0378ec4d2aeca7e Mon Sep 17 00:00:00 2001 From: Cedric Poon Date: Thu, 24 Oct 2024 11:20:37 +0800 Subject: [PATCH] ops(cicd): fix gh-action cicd --- src/components/ExchangeRates.js | 2 +- src/pages/Balance.js | 11 ----------- src/pages/Transactions.js | 2 -- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/components/ExchangeRates.js b/src/components/ExchangeRates.js index 3d5b248..7bc6fa9 100644 --- a/src/components/ExchangeRates.js +++ b/src/components/ExchangeRates.js @@ -8,7 +8,7 @@ import useOnlineStatus from '../hooks/useOnlineStatus'; function ExchangeRates() { const dispatch = useDispatch(); - const { exchangeRates, availableCurrencies, selectedCurrency, lastUpdated, status } = useSelector((state) => state.currency); + const { exchangeRates, availableCurrencies, selectedCurrency, lastUpdated } = useSelector((state) => state.currency); const isOnline = useOnlineStatus(); const handleRefresh = () => { diff --git a/src/pages/Balance.js b/src/pages/Balance.js index 19ea4cd..dba1580 100644 --- a/src/pages/Balance.js +++ b/src/pages/Balance.js @@ -68,17 +68,6 @@ function Balance() { return settlements; }; - // Function to convert amount based on selected currency - const convertAmount = (amountInUSD) => { - if (selectedCurrency === 'USD') return amountInUSD.toFixed(2); - const rate = exchangeRates[selectedCurrency]; - if (rate) { - return (amountInUSD * rate).toFixed(2); - } - console.warn(`Exchange rate for ${selectedCurrency} not found. Falling back to USD.`); - return amountInUSD.toFixed(2); // Fallback to USD if rate not available - }; - // Only perform calculations if exchange rates are loaded if (status === 'loading') { return ( diff --git a/src/pages/Transactions.js b/src/pages/Transactions.js index e949591..92edbba 100644 --- a/src/pages/Transactions.js +++ b/src/pages/Transactions.js @@ -23,8 +23,6 @@ import { DialogActions, } from '@mui/material'; import { Edit as EditIcon, Delete as DeleteIcon } from '@mui/icons-material'; -import currencyService from '../services/currencyService'; // Ensure this service is available -import { v4 as uuidv4 } from 'uuid'; // Install uuid package if not already function Transactions() { const participants = useSelector((state) => state.transactions.participants);