Merge pull request #23 from exstake/fix/cents-convertion-on-exchange-panel

fix cents convertion on exchange panel
This commit is contained in:
João Geonizeli
2021-08-15 23:42:02 -03:00
committed by GitHub

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,
}); });
} }