Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Commit

Permalink
ops(cicd): fix gh-action cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricpoon committed Oct 24, 2024
1 parent c922dcc commit 418f369
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 14 deletions.
2 changes: 1 addition & 1 deletion src/components/ExchangeRates.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {
Expand Down
11 changes: 0 additions & 11 deletions src/pages/Balance.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 0 additions & 2 deletions src/pages/Transactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 418f369

Please sign in to comment.