fix cents convertion on exchange panel

This commit is contained in:
João Geonizeli
2021-08-15 23:40:09 -03:00
parent b376567abd
commit 5e620d8983

View File

@@ -128,10 +128,8 @@ export const ExchangePanel: FC<Props> = ({
} }
if (exchangeOption === "BUY") { if (exchangeOption === "BUY") {
const [amountCents] = fiatDock.split(".");
commitCreateBuyCryptoOrderMutation(environment, { commitCreateBuyCryptoOrderMutation(environment, {
amountCents: parseInt(amountCents, 10), amountCents: parseFloat(fiatDock) * 100,
currencyId: crypto.node.currency.id, currencyId: crypto.node.currency.id,
}); });
} }