Address Labels -> Claim Address

This commit is contained in:
joeuhren
2020-11-22 14:39:10 -07:00
parent a22ea7c484
commit a66f9cb7e4
9 changed files with 202 additions and 28 deletions
+22 -5
View File
@@ -29,12 +29,14 @@ module.exports = function(){
var command = [];
if (method == 'sendmany' ||
method == 'getmasternodecountonline' ||
method == 'getmasternodecount' ||
method == 'getmasternodelist' ||
if (method == 'sendmany' ||
method == 'getmasternodecountonline' ||
method == 'getmasternodecount' ||
method == 'getmasternodelist' ||
method == 'getvotelist') {
command = specialApiCase(method);
} else if (method == 'verifymessage') {
command = specialApiCase(method, query_parameters);
} else {
command = [{
method: method,
@@ -74,7 +76,7 @@ module.exports = function(){
}
}
function specialApiCase(method_name){
function specialApiCase(method_name, query_parameters){
var params = [];
switch(method_name) {
@@ -128,6 +130,21 @@ module.exports = function(){
params.push(sSplit[i]);
}
break;
case 'verifymessage':
for (var parameter in query_parameters) {
if (query_parameters.hasOwnProperty(parameter)) {
if (parameter == 'address' || parameter == 'message')
params.push(query_parameters[parameter]);
if (parameter == 'signature') {
var param = decodeURIComponent(query_parameters[parameter]);
while (param.indexOf(" ") > -1) {
param = param.replace(" ", "+");
}
params.push(param);
}
}
}
break;
}
return [{