|
|
|
@ -431,6 +431,7 @@ function updatePoolInformation() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function updateBlockHeader() {
|
|
|
|
|
// Todo: Implement within the coins/<coin>.js file.
|
|
|
|
|
global.support.rpcDaemon('getlastblockheader', [], function (body) {
|
|
|
|
|
if (typeof body.error !== 'undefined'){
|
|
|
|
|
return console.error(`Issue getting last block header: ${JSON.stringify(body)}`);
|
|
|
|
@ -455,6 +456,7 @@ function updateBlockHeader() {
|
|
|
|
|
function updateWalletStats() {
|
|
|
|
|
async.waterfall([
|
|
|
|
|
function (callback) {
|
|
|
|
|
// Todo: Implement within the coins/<coin>.js file.
|
|
|
|
|
global.support.rpcWallet('getbalance', [], function (body) {
|
|
|
|
|
if (body.result) {
|
|
|
|
|
return callback(null, {
|
|
|
|
@ -468,10 +470,14 @@ function updateWalletStats() {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
function (state, callback) {
|
|
|
|
|
// Todo: Implement within the coins/<coin>.js file.
|
|
|
|
|
global.support.rpcWallet('getheight', [], function (body) {
|
|
|
|
|
if (body.result) {
|
|
|
|
|
state.height = body.result.height;
|
|
|
|
|
return callback(null, state);
|
|
|
|
|
} else if (typeof body.error !== 'undefined' && body.error.message === 'Method not found') {
|
|
|
|
|
state.height = 0;
|
|
|
|
|
return callback(null, state);
|
|
|
|
|
} else {
|
|
|
|
|
return callback(true, "Unable to get current wallet height");
|
|
|
|
|
}
|
|
|
|
|