Account/Receive: update design

This commit is contained in:
selsta
2019-04-16 11:09:46 +02:00
parent 9ce7c86558
commit 74dbe8bfcb
4 changed files with 78 additions and 60 deletions

View File

@@ -20,6 +20,7 @@ function addressTruncate(address, range){
function addressTruncatePretty(address, blocks){
if(typeof(address) === "undefined") return;
if(typeof(blocks) === "undefined") blocks = 2;
blocks = blocks <= 1 ? 1 : blocks >= 23 ? 23 : blocks;
var ret = "";
return address.substring(0, 4 * blocks).match(/.{1,4}/g).join(' ') + " .. " + address.substring(address.length - 4 * blocks).match(/.{1,4}/g).join(' ');
}