Skip to content

Commit

Permalink
Migrate to in-progress version of FFI backend 0.6.0
Browse files Browse the repository at this point in the history
Includes:
- Multi-step transaction proposals.
- Changes to support `Synchronizer.proposeShielding` API changes.
  • Loading branch information
str4d committed Mar 6, 2024
1 parent f617f17 commit e9177a2
Show file tree
Hide file tree
Showing 11 changed files with 565 additions and 116 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,7 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/zcash-hackworks/zcash-light-client-ffi",
"state" : {
"revision" : "c90afd6cc092468e71810bc715ddb49be8210b75",
"version" : "0.5.1"
"revision" : "789d0c068fb32e2ab149cdd785f16e0ac88f3594"
}
}
],
Expand Down
3 changes: 1 addition & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/zcash-hackworks/zcash-light-client-ffi",
"state" : {
"revision" : "c90afd6cc092468e71810bc715ddb49be8210b75",
"version" : "0.5.1"
"revision" : "789d0c068fb32e2ab149cdd785f16e0ac88f3594"
}
}
],
Expand Down
3 changes: 2 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ let package = Package(
dependencies: [
.package(url: "https://github.com/grpc/grpc-swift.git", from: "1.19.1"),
.package(url: "https://github.com/stephencelis/SQLite.swift.git", from: "0.14.1"),
.package(url: "https://github.com/zcash-hackworks/zcash-light-client-ffi", exact: "0.5.1")
// Compiled from revision `97e09ed3709ae9f26226587bec852a725bc783a4`.
.package(url: "https://github.com/zcash-hackworks/zcash-light-client-ffi", revision: "789d0c068fb32e2ab149cdd785f16e0ac88f3594")
],
targets: [
.target(
Expand Down
4 changes: 3 additions & 1 deletion Sources/ZcashLightClientKit/Model/Proposal.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ public struct Proposal: Equatable {

/// Returns the total fee to be paid across all proposed transactions, in zatoshis.
public func totalFeeRequired() -> Zatoshi {
Zatoshi(Int64(inner.balance.feeRequired))
inner.steps.reduce(Zatoshi.zero) { acc, step in
acc + Zatoshi(Int64(step.balance.feeRequired))
}
}
}

Expand Down

0 comments on commit e9177a2

Please sign in to comment.