Skip to content

Commit

Permalink
Update walletjs.html
Browse files Browse the repository at this point in the history
1.Adjust the number of characters in each QR code from 400 to 250.
2.There is an error in the calculation of the miner fee per byte, which has been corrected.
  • Loading branch information
happybole authored Aug 2, 2024
1 parent 9f6f061 commit e19bdb2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions walletjs.html
Original file line number Diff line number Diff line change
Expand Up @@ -1605,7 +1605,7 @@

//生成二维码
function generateQrcode(content, parentElement){
var arr = mySplit(content, 400);
var arr = mySplit(content, 250);
for(var i = 0; i < arr.length; i++){
jQuery(function(){jQuery("#" + parentElement).qrcode(str2rstr_utf8(arr[i]));});
document.getElementById(parentElement).appendChild(document.createElement("br"));
Expand Down Expand Up @@ -1640,8 +1640,10 @@
}
txOutValue = txOutValue * 100000000;

var vBytes = Math.round((txInValue - txOutValue) / txSignedRawObj.txJSON.hex_raw_length * 100) / 100; //保留两位小数
return vBytes;
var txFee = txInValue - txOutValue;
var vBytes = txSignedRawObj.txJSON.hex_raw_length / 2;
var feepervB = Math.round(txFee / vBytes * 100) / 100; //保留两位小数
return feepervB;
}
</script>
</head>
Expand Down

0 comments on commit e19bdb2

Please sign in to comment.