How can I return value from promise. I want compare value of promise with my limit balance. But I can't return my result in my condition.
if (getBalanceByAddress(....) > 228) {
console.log('ALL ok')
} else {
console.log('insufficient funds')
}
getBalanceByAddress(addressFrom) {
var _this = this;
return _this.web3.eth.getBalance(addressFrom).then(function(result) {
return result;
});
}