Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion BDKSwiftExampleWallet.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,7 @@
repositoryURL = "https://github.com/bitcoindevkit/bdk-swift";
requirement = {
kind = exactVersion;
version = 1.1.0;
version = 1.2.0;
};
};
AEAF83B42B7BD4D10019B23B /* XCRemoteSwiftPackageReference "CodeScanner" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ extension Balance: Equatable {
#if DEBUG
extension Balance {
static var mock = Self(
immature: Amount.fromSat(fromSat: UInt64(100)),
trustedPending: Amount.fromSat(fromSat: UInt64(200)),
untrustedPending: Amount.fromSat(fromSat: UInt64(300)),
confirmed: Amount.fromSat(fromSat: UInt64(21000)),
trustedSpendable: Amount.fromSat(fromSat: UInt64(1_000_000)),
total: Amount.fromSat(fromSat: UInt64(615_000_000))
immature: Amount.fromSat(satoshi: UInt64(100)),
trustedPending: Amount.fromSat(satoshi: UInt64(200)),
untrustedPending: Amount.fromSat(satoshi: UInt64(300)),
confirmed: Amount.fromSat(satoshi: UInt64(21000)),
trustedSpendable: Amount.fromSat(satoshi: UInt64(1_000_000)),
total: Amount.fromSat(satoshi: UInt64(615_000_000))
)
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import Foundation
#if DEBUG
extension SentAndReceivedValues {
static var mock = Self(
sent: Amount.fromSat(fromSat: UInt64(0)),
received: Amount.fromSat(fromSat: UInt64(1_000_000))
sent: Amount.fromSat(satoshi: UInt64(0)),
received: Amount.fromSat(satoshi: UInt64(1_000_000))
)
}
#endif
10 changes: 5 additions & 5 deletions BDKSwiftExampleWallet/Service/BDK Service/BDKService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,9 @@ private class BDKService {
let txBuilder = try TxBuilder()
.addRecipient(
script: script,
amount: Amount.fromSat(fromSat: amount)
amount: Amount.fromSat(satoshi: amount)
)
.feeRate(feeRate: FeeRate.fromSatPerVb(satPerVb: feeRate))
.feeRate(feeRate: FeeRate.fromSatPerVb(satVb: feeRate))
.finish(wallet: wallet)
return txBuilder
}
Expand Down Expand Up @@ -527,12 +527,12 @@ extension BDKClient {
fullScanWithInspector: { _ in },
getAddress: { "tb1pd8jmenqpe7rz2mavfdx7uc8pj7vskxv4rl6avxlqsw2u8u7d4gfs97durt" },
send: { _, _, _ in },
calculateFee: { _ in Amount.fromSat(fromSat: UInt64(615)) },
calculateFee: { _ in Amount.fromSat(satoshi: UInt64(615)) },
calculateFeeRate: { _ in return UInt64(6.15) },
sentAndReceived: { _ in
return SentAndReceivedValues(
sent: Amount.fromSat(fromSat: UInt64(20000)),
received: Amount.fromSat(fromSat: UInt64(210))
sent: Amount.fromSat(satoshi: UInt64(20000)),
received: Amount.fromSat(satoshi: UInt64(210))
)
},
buildTransaction: { _, _, _ in
Expand Down
4 changes: 2 additions & 2 deletions BDKSwiftExampleWallet/View/Activity/TransactionListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ struct TransactionListView: View {
canonicalTx: .mock,
isRedacted: true,
sentAndReceivedValues: .init(
sent: Amount.fromSat(fromSat: UInt64(0)),
received: Amount.fromSat(fromSat: UInt64(0))
sent: Amount.fromSat(satoshi: UInt64(0)),
received: Amount.fromSat(satoshi: UInt64(0))
)
)
.listRowInsets(EdgeInsets())
Expand Down