diff --git a/index.html b/index.html index f009c11..b956332 100644 --- a/index.html +++ b/index.html @@ -712,7 +712,12 @@ console.log('Inscription address: ', inscriptionAddress ); console.log('Tapkey:', tapkey); - let txsize = 1000 + Math.floor(data.length / 4); + let txsize = 600 + Math.floor(data.length / 4); + + if(files[i].sha256 == '') + { + txsize = 300 + Math.floor(files[i].hex.length / 2); + } let fee = feerate * txsize; total_fee += fee; diff --git a/signet-bootstrap.html b/signet-bootstrap.html index 9934552..d27b1eb 100644 --- a/signet-bootstrap.html +++ b/signet-bootstrap.html @@ -712,7 +712,12 @@ console.log('Inscription address: ', inscriptionAddress ); console.log('Tapkey:', tapkey); - let txsize = 1000 + Math.floor(data.length / 4); + let txsize = 600 + Math.floor(data.length / 4); + + if(files[i].sha256 == '') + { + txsize = 300 + Math.floor(files[i].hex.length / 2); + } let fee = feerate * txsize; total_fee += fee; diff --git a/signet.html b/signet.html index 135f0f6..3a66890 100644 --- a/signet.html +++ b/signet.html @@ -739,7 +739,14 @@ console.log('Inscription address: ', inscriptionAddress); console.log('Tapkey:', tapkey); - let txsize = 1000 + Math.floor(data.length / 4); + let txsize = 600 + Math.floor(data.length / 4); + + if(files[i].sha256 == '') + { + txsize = 300 + Math.floor(files[i].hex.length / 2); + } + + console.log("TXSIZE", txsize); let fee = feerate * txsize; total_fee += fee;