diff --git a/js/TxUtils.js b/js/TxUtils.js index 4a4b01c4..cdb7e719 100644 --- a/js/TxUtils.js +++ b/js/TxUtils.js @@ -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) { diff --git a/pages/Receive.qml b/pages/Receive.qml index 28cedd91..b89c636c 100644 --- a/pages/Receive.qml +++ b/pages/Receive.qml @@ -275,7 +275,13 @@ Rectangle { anchors.leftMargin: 6 fontSize: 14 * scaleRatio fontBold: true - text: TxUtils.addressTruncate(address) + text: { + if(isMobile){ + TxUtils.addressTruncate(address, 6); + } else { + return TxUtils.addressTruncate(address, 10); + } + } } MouseArea{