feat(currency-dropdown): calculate total price

This commit is contained in:
RadoslavDimchev 2024-04-19 17:47:26 +03:00 committed by Emil Ivanichkov
parent 73ee7a75d7
commit 2a058cb4b0
1 changed files with 1 additions and 1 deletions

View File

@ -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])