From 5e620d89833453ca8633d5e318a081bea7599391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Geonizeli?= Date: Sun, 15 Aug 2021 23:40:09 -0300 Subject: [PATCH] fix cents convertion on exchange panel --- .../src/pages/Orders/Exchange/ExchangePanel/ExchangePanel.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/javascript/src/pages/Orders/Exchange/ExchangePanel/ExchangePanel.tsx b/app/javascript/src/pages/Orders/Exchange/ExchangePanel/ExchangePanel.tsx index 4972a9a..658bb30 100644 --- a/app/javascript/src/pages/Orders/Exchange/ExchangePanel/ExchangePanel.tsx +++ b/app/javascript/src/pages/Orders/Exchange/ExchangePanel/ExchangePanel.tsx @@ -128,10 +128,8 @@ export const ExchangePanel: FC = ({ } if (exchangeOption === "BUY") { - const [amountCents] = fiatDock.split("."); - commitCreateBuyCryptoOrderMutation(environment, { - amountCents: parseInt(amountCents, 10), + amountCents: parseFloat(fiatDock) * 100, currencyId: crypto.node.currency.id, }); }