TCA-conformations

- Proposal conforms to the Equatable
- .zero Proposal added

TCA-conformations

- internal protection level -> public

TCA-conformations

- zip317 enabled

TCA-conformations

- removed public .zero Proposal

TCA-conformations

- testOnlyFakeProposal for testing purposes outside SDK

TCA-conformations

- updated code

TCA-conformations

- typos fixed
This commit is contained in:
Lukas Korba 2024-02-29 13:31:27 +01:00
parent fffbd857fc
commit a01205b408
2 changed files with 16 additions and 3 deletions

View File

@ -8,11 +8,24 @@
import Foundation
/// A data structure that describes a series of transactions to be created.
public struct Proposal {
public struct Proposal: Equatable {
let inner: FfiProposal
/// Returns the total fee to be paid across all proposed transactions, in zatoshis.
public func totalFeeRequired() -> Zatoshi {
return Zatoshi(Int64(inner.balance.feeRequired))
Zatoshi(Int64(inner.balance.feeRequired))
}
}
public extension Proposal {
/// IMPORTANT: Use of this function is for testing purposes only, not recommended to use in production.
/// The instance of `Proposal` should never be created on client's side.
static func testOnlyFakeProposal(totalFee: UInt64) -> Self {
var ffiProposal = FfiProposal()
var balance = FfiTransactionBalance()
balance.feeRequired = totalFee
return Self(inner: ffiProposal)
}
}

View File

@ -13,7 +13,7 @@ let globalDBLock = NSLock()
actor ZcashRustBackend: ZcashRustBackendWelding {
let minimumConfirmations: UInt32 = 10
let useZIP317Fees = false
let useZIP317Fees = true
let dbData: (String, UInt)
let fsBlockDbRoot: (String, UInt)