Use automatic 0.001 VTX/kB transaction fee
This commit is contained in:
parent
a7d4f6c9c0
commit
e513de0d7c
2 changed files with 6 additions and 6 deletions
|
|
@ -22,8 +22,8 @@ android {
|
||||||
applicationId = "org.vextaproject.wallet"
|
applicationId = "org.vextaproject.wallet"
|
||||||
minSdk = 26
|
minSdk = 26
|
||||||
targetSdk = 36
|
targetSdk = 36
|
||||||
versionCode = 28
|
versionCode = 29
|
||||||
versionName = "0.5.0"
|
versionName = "0.5.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ object VextaTransactionSender {
|
||||||
private const val sighashAll = 1L
|
private const val sighashAll = 1L
|
||||||
private const val sequence = 0xffffffffL
|
private const val sequence = 0xffffffffL
|
||||||
private const val dustLimit = 546L
|
private const val dustLimit = 546L
|
||||||
|
private const val defaultFeeSatoshisPerKb = 100_000L
|
||||||
|
|
||||||
data class CreatedTransaction(
|
data class CreatedTransaction(
|
||||||
val rawTransaction: ByteArray,
|
val rawTransaction: ByteArray,
|
||||||
|
|
@ -317,10 +318,9 @@ object VextaTransactionSender {
|
||||||
inputCount * 69L +
|
inputCount * 69L +
|
||||||
outputCount * 31L
|
outputCount * 31L
|
||||||
|
|
||||||
return maxOf(
|
return (
|
||||||
1_000L,
|
virtualBytes * defaultFeeSatoshisPerKb + 999L
|
||||||
virtualBytes * 10L
|
) / 1_000L
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun addressToScript(address: String): ByteArray {
|
private fun addressToScript(address: String): ByteArray {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue