Alternate Currency Formats breaks ability to send ETH (#665)

This commit is contained in:
alwx 2017-01-19 18:22:06 +03:00 committed by Roman Volosovskyi
parent 2765ca3eca
commit a4526f7e3f
1 changed files with 2 additions and 2 deletions

View File

@ -751,7 +751,7 @@ function validateSend(params, context) {
} }
try { try {
var val = web3.toWei(params.amount, "ether"); var val = web3.toWei(params.amount.replace(",", "."), "ether");
if (val <= 0) { throw new Error(); } if (val <= 0) { throw new Error(); }
} catch (err) { } catch (err) {
return { return {
@ -788,7 +788,7 @@ function sendTransaction(params, context) {
var data = { var data = {
from: context.from, from: context.from,
to: context.to, to: context.to,
value: web3.toWei(params.amount, "ether") value: web3.toWei(params.amount.replace(",", "."), "ether")
}; };
try { try {