[#1273] 10_000-ZAT Miners fee
- Removed all uses of the incorrect 1000-ZAT fee as defined with deprecated zip-313 - Default is now 10k zatoshi, the minimum defined by zip-317 - Changelog updated - Closes #1273
This commit is contained in:
parent
ebde156c6c
commit
ddffd170d1
|
@ -10,6 +10,9 @@ and this library adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
- `PersistableWallet` API provides a new `endpoint` parameter of type `LightWalletEndpoint`, which could be used for
|
- `PersistableWallet` API provides a new `endpoint` parameter of type `LightWalletEndpoint`, which could be used for
|
||||||
the Lightwalletd server customization. The new parameter is part of PersistableWallet persistence. The SDK handles
|
the Lightwalletd server customization. The new parameter is part of PersistableWallet persistence. The SDK handles
|
||||||
the persistence migration internally.
|
the persistence migration internally.
|
||||||
|
- The **1_000** Zatoshi fee proposed in ZIP-313 is deprecated now, so the minimum is **10_000** Zatoshi, defined in
|
||||||
|
ZIP-317—the ZcashSdk.MINERS_FEE now returns the correct value as described above. Note that the actual fee is
|
||||||
|
handled in a rust layer.
|
||||||
|
|
||||||
## [2.0.0] - 2023-09-25
|
## [2.0.0] - 2023-09-25
|
||||||
|
|
||||||
|
|
|
@ -154,6 +154,8 @@ private fun BalanceMainContent(
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// TODO [#776]: Support variable fees
|
||||||
|
// TODO [#776]: https://github.com/zcash/zcash-android-wallet-sdk/issues/776
|
||||||
// This check will not be correct with variable fees
|
// This check will not be correct with variable fees
|
||||||
if (walletSnapshot.transparentBalance.available > ZcashSdk.MINERS_FEE) {
|
if (walletSnapshot.transparentBalance.available > ZcashSdk.MINERS_FEE) {
|
||||||
// Note this implementation does not guard against multiple clicks
|
// Note this implementation does not guard against multiple clicks
|
||||||
|
|
|
@ -16,9 +16,11 @@ data class WalletSnapshot(
|
||||||
val progress: PercentDecimal,
|
val progress: PercentDecimal,
|
||||||
val synchronizerError: SynchronizerError?
|
val synchronizerError: SynchronizerError?
|
||||||
) {
|
) {
|
||||||
|
// TODO [#776]: Support variable fees
|
||||||
|
// TODO [#776]: https://github.com/zcash/zcash-android-wallet-sdk/issues/776
|
||||||
// Note: the wallet is effectively empty if it cannot cover the miner's fee
|
// Note: the wallet is effectively empty if it cannot cover the miner's fee
|
||||||
val hasFunds = saplingBalance.available.value >
|
val hasFunds = saplingBalance.available.value >
|
||||||
(ZcashSdk.MINERS_FEE.value.toDouble() / Zatoshi.ZATOSHI_PER_ZEC) // 0.00001
|
(ZcashSdk.MINERS_FEE.value.toDouble() / Zatoshi.ZATOSHI_PER_ZEC) // 0.0001
|
||||||
val hasSaplingBalance = saplingBalance.total.value > 0
|
val hasSaplingBalance = saplingBalance.total.value > 0
|
||||||
|
|
||||||
val isSendEnabled: Boolean get() = status == Synchronizer.Status.SYNCED && hasFunds
|
val isSendEnabled: Boolean get() = status == Synchronizer.Status.SYNCED && hasFunds
|
||||||
|
|
|
@ -14,7 +14,7 @@ object ZcashSdk {
|
||||||
/**
|
/**
|
||||||
* Miner's fee in zatoshi.
|
* Miner's fee in zatoshi.
|
||||||
*/
|
*/
|
||||||
val MINERS_FEE = Zatoshi(1_000L)
|
val MINERS_FEE = Zatoshi(10_000L)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The maximum length of a memo.
|
* The maximum length of a memo.
|
||||||
|
|
Loading…
Reference in New Issue