mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-06 17:27:59 +00:00
Update bin/validate_address
This commit is contained in:
@@ -17,10 +17,10 @@ function readInput(callback) {
|
|||||||
result += data;
|
result += data;
|
||||||
});
|
});
|
||||||
process.stdin.on('end', function() {
|
process.stdin.on('end', function() {
|
||||||
callback(result.trim());
|
callback(result);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
function validateAddress(address) {
|
function validateAddress(address) {
|
||||||
process.stdout.write((UInt160.is_valid(address) ? '0' : '1') + '\r\n');
|
process.stdout.write((UInt160.is_valid(address.trim()) ? '0' : '1') + '\r\n');
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user