|
@@ -433,16 +433,24 @@ function getBalanceFromAddress(rpcClient, address) { |
|
|
|
|
|
|
|
|
return new Promise(function(resolve, reject) { |
|
|
return new Promise(function(resolve, reject) { |
|
|
client.cmd("getaddressbalance \'{\"addresses\": [\"" + address + "\"]}\'", function(err, result, resHeaders) { |
|
|
client.cmd("getaddressbalance \'{\"addresses\": [\"" + address + "\"]}\'", function(err, result, resHeaders) { |
|
|
if (err) { |
|
|
|
|
|
console.log("Error 3017hfwe0f: " + err); |
|
|
|
|
|
|
|
|
|
|
|
reject(err); |
|
|
|
|
|
|
|
|
console.log(result); |
|
|
|
|
|
console.log(err); |
|
|
|
|
|
console.log(resHeaders); |
|
|
|
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
res.send(JSON.stringify(result, null, 4)); |
|
|
|
|
|
|
|
|
resolve(result); |
|
|
|
|
|
|
|
|
/* |
|
|
|
|
|
if (err) { |
|
|
|
|
|
console.log("Error : " + err); |
|
|
|
|
|
|
|
|
|
|
|
reject(err); |
|
|
|
|
|
|
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
resolve(result); |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
}); |
|
|
}); |
|
|