mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-27 08:55:39 +00:00
validate empty input in send command
Former-commit-id: 29968b2ff3fa93c7cde46d0ac0664843b1691317
This commit is contained in:
parent
f5854fb43c
commit
38505bd2cc
@ -262,6 +262,17 @@ status.command({
|
|||||||
});
|
});
|
||||||
|
|
||||||
function validateBalance(params) {
|
function validateBalance(params) {
|
||||||
|
if(!params.value){
|
||||||
|
return {
|
||||||
|
errors: [
|
||||||
|
status.components.validationMessage(
|
||||||
|
"Amount",
|
||||||
|
"Amount must be specified"
|
||||||
|
)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var val = web3.toWei(params.value, "ether");
|
var val = web3.toWei(params.value, "ether");
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user