File tree Expand file tree Collapse file tree 6 files changed +14
-14
lines changed
Extensions/BDK+Extensions Expand file tree Collapse file tree 6 files changed +14
-14
lines changed Original file line number Diff line number Diff line change 5
5
// Created by Matthew Ramsden on 6/3/25.
6
6
//
7
7
8
- import Foundation
9
8
import BitcoinDevKit
9
+ import Foundation
10
10
11
11
extension OutPoint : Hashable {
12
12
public static func == ( lhs: OutPoint , rhs: OutPoint ) -> Bool {
13
13
lhs. txid == rhs. txid && lhs. vout == rhs. vout
14
14
}
15
-
15
+
16
16
public func hash( into hasher: inout Hasher ) {
17
17
hasher. combine ( txid)
18
18
hasher. combine ( vout)
Original file line number Diff line number Diff line change 5
5
// Created by Matthew Ramsden on 6/11/25.
6
6
//
7
7
8
- import Foundation
9
8
import BitcoinDevKit
9
+ import Foundation
10
10
11
11
extension TxDetails {
12
12
static let mock = TxDetails (
Original file line number Diff line number Diff line change 5
5
// Created by Matthew Ramsden on 6/11/25.
6
6
//
7
7
8
- import Foundation
9
8
import BitcoinDevKit
9
+ import Foundation
10
10
11
11
extension Txid {
12
12
static let mock = try ? Txid . fromBytes (
Original file line number Diff line number Diff line change @@ -412,7 +412,7 @@ private class BDKService {
412
412
let values = wallet. sentAndReceived ( tx: tx)
413
413
return values
414
414
}
415
-
415
+
416
416
func txDetails( txid: Txid ) throws -> TxDetails ? {
417
417
guard let wallet = self . wallet else {
418
418
throw WalletError . walletNotFound
Original file line number Diff line number Diff line change 8
8
import SwiftUI
9
9
10
10
struct ActivityHomeHeaderView : View {
11
-
11
+
12
12
let walletSyncState : WalletSyncState
13
13
let progress : Float
14
14
let inspectedScripts : UInt64
15
15
let totalScripts : UInt64
16
16
let needsFullScan : Bool
17
-
17
+
18
18
let showAllTransactions : ( ) -> Void
19
-
19
+
20
20
var body : some View {
21
21
HStack {
22
22
Text ( " Activity " )
23
23
Spacer ( )
24
-
24
+
25
25
HStack {
26
26
if needsFullScan {
27
27
Text ( " \( inspectedScripts) " )
@@ -78,7 +78,7 @@ struct ActivityHomeHeaderView: View {
78
78
}
79
79
. foregroundStyle ( . secondary)
80
80
. font ( . caption)
81
-
81
+
82
82
if walletSyncState == . synced {
83
83
Button {
84
84
self . showAllTransactions ( )
@@ -95,7 +95,7 @@ struct ActivityHomeHeaderView: View {
95
95
}
96
96
. fontWeight ( . bold)
97
97
}
98
-
98
+
99
99
@ViewBuilder
100
100
private func syncImageIndicator( ) -> some View {
101
101
switch walletSyncState {
@@ -104,15 +104,15 @@ struct ActivityHomeHeaderView: View {
104
104
Image ( systemName: " checkmark.circle.fill " )
105
105
. foregroundStyle ( . green)
106
106
)
107
-
107
+
108
108
case . syncing:
109
109
AnyView (
110
110
Image ( systemName: " slowmo " )
111
111
. symbolEffect (
112
112
. variableColor. cumulative
113
113
)
114
114
)
115
-
115
+
116
116
case . notStarted:
117
117
AnyView (
118
118
Image ( systemName: " arrow.clockwise " )
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ struct WalletView: View {
51
51
) {
52
52
showAllTransactions = true
53
53
}
54
-
54
+
55
55
TransactionListView (
56
56
viewModel: . init( ) ,
57
57
transactions: viewModel. recentTransactions,
You can’t perform that action at this time.
0 commit comments