Bladeren bron

05/25/2021 01:53:26 PM MST

master
coldstar 3 jaren geleden
bovenliggende
commit
56861c66cb
3 gewijzigde bestanden met toevoegingen van 5 en 4 verwijderingen
  1. +3
    -3
      app/rpcApi.js
  2. +1
    -0
      package-lock.json
  3. +1
    -1
      routes/baseActionsRouter.js

+ 3
- 3
app/rpcApi.js Bestand weergeven

@@ -426,10 +426,10 @@ function getBlockData(rpcClient, blockHash, txLimit, txOffset) {
});
}

function getBalanceFromAddress(rpcClient, address) {
function getBalance(rpcClient, address) {
console.log("getBalanceFromAddress: " + address);

console.log("getaddressbalance \'{\"addresses\": [\"" + address + "\"]}\'");
console.log("getbalance", " \'{\"addresses\": [\"" + address + "\"]}\'");

return new Promise(function(resolve, reject) {
client.cmd("getaddressbalance \'{\"addresses\": [\"" + address + "\"]}\'", function(err, result, resHeaders) {
@@ -463,7 +463,7 @@ module.exports = {
getBlockByHeight: getBlockByHeight,
getBlocksByHeight: getBlocksByHeight,
getBlockByHash: getBlockByHash,
getBalanceFromAddress: getBalanceFromAddress,
getBalance: getBalance,
getTransactionInputs: getTransactionInputs,
getBlockData: getBlockData,
getRawTransaction: getRawTransaction,


+ 1
- 0
package-lock.json Bestand weergeven

@@ -5,6 +5,7 @@
"requires": true,
"packages": {
"": {
"name": "rpc-explorer",
"version": "1.0.0",
"license": "MIT",
"dependencies": {


+ 1
- 1
routes/baseActionsRouter.js Bestand weergeven

@@ -310,7 +310,7 @@ router.get("/address/:address", function(req, res) {
res.locals.result = {};

// TODO handle RPC error
rpcApi.getBalanceFromAddress(client, address).then(function(result) {
rpcApi.getBalance(client, address).then(function(result) {
res.locals.result.address = result.address;

res.render("address");


Laden…
Annuleren
Opslaan