Address Labels -> Claim Address
This commit is contained in:
+22
-5
@@ -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 [{
|
||||
|
||||
Reference in New Issue
Block a user