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:
parent
fffbd857fc
commit
a01205b408
|
@ -8,11 +8,24 @@
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
/// A data structure that describes a series of transactions to be created.
|
/// A data structure that describes a series of transactions to be created.
|
||||||
public struct Proposal {
|
public struct Proposal: Equatable {
|
||||||
let inner: FfiProposal
|
let inner: FfiProposal
|
||||||
|
|
||||||
/// Returns the total fee to be paid across all proposed transactions, in zatoshis.
|
/// Returns the total fee to be paid across all proposed transactions, in zatoshis.
|
||||||
public func totalFeeRequired() -> Zatoshi {
|
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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ let globalDBLock = NSLock()
|
||||||
|
|
||||||
actor ZcashRustBackend: ZcashRustBackendWelding {
|
actor ZcashRustBackend: ZcashRustBackendWelding {
|
||||||
let minimumConfirmations: UInt32 = 10
|
let minimumConfirmations: UInt32 = 10
|
||||||
let useZIP317Fees = false
|
let useZIP317Fees = true
|
||||||
|
|
||||||
let dbData: (String, UInt)
|
let dbData: (String, UInt)
|
||||||
let fsBlockDbRoot: (String, UInt)
|
let fsBlockDbRoot: (String, UInt)
|
||||||
|
|
Loading…
Reference in New Issue