Skip to content

Commit ce793a9

Browse files
committed
Code review fixes
1 parent a05f172 commit ce793a9

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

BDKSwiftExampleWallet/Service/BDK Service/BDKService.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ struct BDKClient {
8686
let fullScanWithFullScanProgress: (@escaping FullScanProgress) async throws -> Void
8787
let getAddress: () throws -> String
8888
let send: (String, UInt64, UInt64) throws -> Void
89-
let calculateFee: (BitcoinDevKit.Transaction) throws -> Amount
90-
let calculateFeeRate: (BitcoinDevKit.Transaction) throws -> UInt64
91-
let sentAndReceived: (BitcoinDevKit.Transaction) throws -> SentAndReceivedValues
89+
let calculateFee: (Transaction) throws -> Amount
90+
let calculateFeeRate: (Transaction) throws -> UInt64
91+
let sentAndReceived: (Transaction) throws -> SentAndReceivedValues
9292
let buildTransaction: (String, UInt64, UInt64) throws -> Psbt
9393
let getBackupInfo: () throws -> BackupInfo
9494
let needsFullScan: () -> Bool

BDKSwiftExampleWallet/View Model/Activity/TransactionDetailViewModel.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class TransactionDetailViewModel {
2828
self.bdkClient = bdkClient
2929
}
3030

31-
func getCalulateFee(tx: BitcoinDevKit.Transaction) {
31+
func getCalulateFee(tx: Transaction) {
3232
do {
3333
let calculateFee = try bdkClient.calculateFee(tx)
3434
let feeString = String(calculateFee.toSat())
@@ -61,7 +61,7 @@ class TransactionDetailViewModel {
6161
self.network = bdkClient.getNetwork().description
6262
}
6363

64-
func getSentAndReceived(tx: BitcoinDevKit.Transaction) -> SentAndReceivedValues? {
64+
func getSentAndReceived(tx: Transaction) -> SentAndReceivedValues? {
6565
do {
6666
let sentAndReceived = try bdkClient.sentAndReceived(tx)
6767
return sentAndReceived

BDKSwiftExampleWallet/View Model/Activity/TransactionListViewModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class TransactionListViewModel {
2222
self.bdkClient = bdkClient
2323
}
2424

25-
func getSentAndReceived(tx: BitcoinDevKit.Transaction) -> SentAndReceivedValues? {
25+
func getSentAndReceived(tx: Transaction) -> SentAndReceivedValues? {
2626
do {
2727
let sentAndReceived = try bdkClient.sentAndReceived(tx)
2828
return sentAndReceived

BDKSwiftExampleWallet/View Model/Send/BuildTransactionViewModel.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class BuildTransactionViewModel {
4040
}
4141
}
4242

43-
func extractTransaction() -> BitcoinDevKit.Transaction? {
43+
func extractTransaction() -> Transaction? {
4444
guard let psbt = self.psbt else {
4545
return nil
4646
}
@@ -56,7 +56,7 @@ class BuildTransactionViewModel {
5656
}
5757
}
5858

59-
func getCalulateFee(tx: BitcoinDevKit.Transaction) {
59+
func getCalulateFee(tx: Transaction) {
6060
do {
6161
let calculateFee = try bdkClient.calculateFee(tx)
6262
let feeString = String(calculateFee.toSat())

0 commit comments

Comments
 (0)