Alternate Currency Formats breaks ability to send ETH (#665)
This commit is contained in:
parent
2765ca3eca
commit
a4526f7e3f
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue