diff --git a/walletjs.html b/walletjs.html index 8380937..43eeb93 100644 --- a/walletjs.html +++ b/walletjs.html @@ -719,7 +719,7 @@ hash = Crypto.util.hexToBytes(hash).reverse(); hash = Crypto.util.bytesToHex(hash); txJSON.hash = hash; - txJSON.hex_raw_length = raw.length; //计算单位字节花费矿工费sats/vB时用到 + txJSON.hex_raw_length = raw.length; //计算单位字节花费矿工费sat/vB时用到 return txJSON; } @@ -1641,7 +1641,7 @@ txOutValue = txOutValue * 100000000; var txFee = txInValue - txOutValue; - var vBytes = txSignedRawObj.txJSON.hex_raw_length / 2; + var vBytes = txSignedRawObj.txJSON.hex_raw_length / 2 + floatMultiply((txSignedRaw.length - txSignedRawObj.txJSON.hex_raw_length) / 2, 0.25); var feepervB = Math.round(txFee / vBytes * 100) / 100; //保留两位小数 return feepervB; } @@ -2102,11 +2102,11 @@
- +