Variable address truncation (for mobile)

This commit is contained in:
Sander Ferdinand
2018-04-28 00:50:33 +02:00
parent 0e49e4ad37
commit 5487383068
2 changed files with 10 additions and 3 deletions

View File

@@ -11,8 +11,9 @@ function destinationsToAddress(destinations){
return address;
}
function addressTruncate(address){
return address.substring(0, 6) + "..." + address.substring(address.length-6);
function addressTruncate(address, range){
if(typeof(range) === "undefined") range = 8;
return address.substring(0, range) + "..." + address.substring(address.length-range);
}
function check256(str, length) {