Browse Source

Argument type fix

Fixes sendtoaddress RCP call
fix-133-memory-crash
Dmitry Brigadirov 7 years ago
committed by GitHub
parent
commit
681ea892cf
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      routes/baseActionsRouter.js

9
routes/baseActionsRouter.js

@ -569,7 +569,7 @@ router.get("/rpc-browser", function(req, res) {
var argProperties = argDetails[i].properties;
for (var j = 0; j < argProperties.length; j++) {
if (argProperties[j] == "numeric") {
if (argProperties[j] === "numeric") {
if (req.query.args[i] == null || req.query.args[i] == "") {
argValues.push(null);
@ -579,20 +579,23 @@ router.get("/rpc-browser", function(req, res) {
break;
} else if (argProperties[j] == "boolean") {
} else if (argProperties[j] === "boolean") {
if (req.query.args[i]) {
argValues.push(req.query.args[i] == "true");
}
break;
} else if (argProperties[j] == "string") {
} else if (argProperties[j] === "string" || argProperties[j] === "numeric or string") {
if (req.query.args[i]) {
argValues.push(req.query.args[i]);
}
break;
}
else {
console.log(`Unknown argument property: ${argProperties[j]}`);
}
}
}
}

Loading…
Cancel
Save