From 2a058cb4b0d7cff8378790e0692eaa8492b6c1cd Mon Sep 17 00:00:00 2001 From: RadoslavDimchev Date: Fri, 19 Apr 2024 17:47:26 +0300 Subject: [PATCH] feat(currency-dropdown): calculate total price --- src/components/General/CurrencyDropdown.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/General/CurrencyDropdown.tsx b/src/components/General/CurrencyDropdown.tsx index 55e3b986..b4ac290e 100644 --- a/src/components/General/CurrencyDropdown.tsx +++ b/src/components/General/CurrencyDropdown.tsx @@ -16,9 +16,9 @@ const CurrencyDropdown = ({ depositAmount }: CurrencyDropdownProps) => { const [supportedCurrencies, setSupportedCurrencies] = useState([]) const [currentCurrencyAmount, setCurrentCurrencyAmount] = useState(0) const currency = useSelector((state: RootState) => state.currency) - const totalPrice = price * CURRENCIES[currency as keyof typeof CURRENCIES] const dispatch = useDispatch() + const totalPrice = depositAmount * currentCurrencyAmount useEffect(() => { fetchCurrencyPrice() }, [currency])