File tree Expand file tree Collapse file tree 5 files changed +28
-28
lines changed Expand file tree Collapse file tree 5 files changed +28
-28
lines changed Original file line number Diff line number Diff line change 90
90
"%@ sats fee" : {
91
91
92
92
},
93
- "%lld Transaction %@" : {
93
+ "%lld Output %@" : {
94
94
"localizations" : {
95
95
"en" : {
96
96
"stringUnit" : {
97
97
"state" : "new",
98
- "value" : "%1$lld Transaction %2$@"
98
+ "value" : "%1$lld Output %2$@"
99
99
}
100
100
}
101
101
}
102
102
},
103
- "%lld UTXO %@" : {
103
+ "%lld Transaction %@" : {
104
104
"localizations" : {
105
105
"en" : {
106
106
"stringUnit" : {
107
107
"state" : "new",
108
- "value" : "%1$lld UTXO %2$@"
108
+ "value" : "%1$lld Transaction %2$@"
109
109
}
110
110
}
111
111
}
426
426
}
427
427
}
428
428
}
429
+ },
430
+ "No Outputs" : {
431
+
429
432
},
430
433
"No seed available" : {
431
434
439
442
}
440
443
}
441
444
}
442
- },
443
- "No UTXOs" : {
444
-
445
445
},
446
446
"OK" : {
447
447
"localizations" : {
462
462
}
463
463
}
464
464
}
465
+ },
466
+ "Outputs" : {
467
+
465
468
},
466
469
"Receive" : {
467
470
"localizations" : {
684
687
}
685
688
}
686
689
}
687
- },
688
- "UTXOs" : {
689
-
690
690
},
691
691
"Vout: %u" : {
692
692
Original file line number Diff line number Diff line change @@ -19,12 +19,12 @@ class ActivityListViewModel {
19
19
var progress : Float = 0.0
20
20
var inspectedScripts : UInt64 = 0
21
21
var totalScripts : UInt64 = 0
22
- var utxos : [ LocalOutput ] = [ ]
22
+ var localOutputs : [ LocalOutput ] = [ ]
23
23
var displayMode : DisplayMode = . transactions
24
24
25
25
enum DisplayMode {
26
26
case transactions
27
- case utxos
27
+ case outputs
28
28
}
29
29
30
30
init (
@@ -37,9 +37,9 @@ class ActivityListViewModel {
37
37
self . transactions = transactions
38
38
}
39
39
40
- func getUTXOs ( ) {
40
+ func listUnspent ( ) {
41
41
do {
42
- self . utxos = try bdkClient. listUnspent ( )
42
+ self . localOutputs = try bdkClient. listUnspent ( )
43
43
} catch let error as WalletError {
44
44
self . walletViewError = . generic( message: error. localizedDescription)
45
45
self . showingWalletViewErrorAlert = true
Original file line number Diff line number Diff line change @@ -30,20 +30,20 @@ struct ActivityListView: View {
30
30
)
31
31
} else {
32
32
LocalOutputListView (
33
- localOutputs: viewModel. utxos ,
33
+ localOutputs: viewModel. localOutputs ,
34
34
walletSyncState: viewModel. walletSyncState
35
35
)
36
36
}
37
37
}
38
38
. task {
39
39
viewModel. getTransactions ( )
40
- viewModel. getUTXOs ( )
40
+ viewModel. listUnspent ( )
41
41
}
42
42
}
43
43
. navigationTitle (
44
44
viewModel. displayMode == . transactions
45
45
? " \( viewModel. transactions. count) Transaction \( viewModel. transactions. count == 1 ? " " : " s " ) "
46
- : " \( viewModel. utxos . count) UTXO \( viewModel. utxos . count == 1 ? " " : " s " ) "
46
+ : " \( viewModel. localOutputs . count) Output \( viewModel. localOutputs . count == 1 ? " " : " s " ) "
47
47
)
48
48
. navigationBarTitleDisplayMode ( . inline)
49
49
. padding ( . top)
@@ -59,7 +59,7 @@ struct CustomSegmentedControl: View {
59
59
var body : some View {
60
60
HStack ( spacing: 20 ) {
61
61
segmentButton ( for: . transactions)
62
- segmentButton ( for: . utxos )
62
+ segmentButton ( for: . outputs )
63
63
Spacer ( )
64
64
}
65
65
}
@@ -68,7 +68,7 @@ struct CustomSegmentedControl: View {
68
68
Button ( action: {
69
69
selection = mode
70
70
} ) {
71
- Text ( mode == . transactions ? " Transactions " : " UTXOs " ) . bold ( )
71
+ Text ( mode == . transactions ? " Transactions " : " Outputs " ) . bold ( )
72
72
. foregroundColor ( selection == mode ? . primary : . gray)
73
73
}
74
74
}
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import BitcoinDevKit
9
9
import SwiftUI
10
10
11
11
struct LocalOutputItemView : View {
12
- let utxo : LocalOutput
12
+ let output : LocalOutput
13
13
let isRedacted : Bool
14
14
@Environment ( \. dynamicTypeSize) var dynamicTypeSize
15
15
@@ -33,15 +33,15 @@ struct LocalOutputItemView: View {
33
33
34
34
VStack ( alignment: . leading, spacing: 5 ) {
35
35
36
- Text ( utxo . outpoint. txid)
36
+ Text ( output . outpoint. txid)
37
37
. truncationMode ( . middle)
38
38
. lineLimit ( 1 )
39
39
. fontDesign ( . monospaced)
40
40
. fontWeight ( . semibold)
41
41
. font ( . title)
42
42
. foregroundColor ( . primary)
43
43
44
- Text ( " Vout: \( utxo . outpoint. vout) " )
44
+ Text ( " Vout: \( output . outpoint. vout) " )
45
45
. lineLimit ( dynamicTypeSize. isAccessibilitySize ? 2 : 1 )
46
46
. font ( . caption2)
47
47
. fontWidth ( . condensed)
@@ -54,7 +54,7 @@ struct LocalOutputItemView: View {
54
54
55
55
Spacer ( )
56
56
57
- Text ( " \( utxo . txout. value) sats " )
57
+ Text ( " \( output . txout. value) sats " )
58
58
. font ( . subheadline)
59
59
. fontWeight ( . semibold)
60
60
. fontDesign ( . rounded)
@@ -69,5 +69,5 @@ struct LocalOutputItemView: View {
69
69
}
70
70
71
71
#Preview {
72
- LocalOutputItemView ( utxo : . mock, isRedacted: false )
72
+ LocalOutputItemView ( output : . mock, isRedacted: false )
73
73
}
Original file line number Diff line number Diff line change @@ -15,17 +15,17 @@ struct LocalOutputListView: View {
15
15
var body : some View {
16
16
List {
17
17
if localOutputs. isEmpty && walletSyncState == . syncing {
18
- LocalOutputItemView ( utxo : . mock, isRedacted: true )
18
+ LocalOutputItemView ( output : . mock, isRedacted: true )
19
19
. listRowInsets ( EdgeInsets ( ) )
20
20
. listRowSeparator ( . hidden)
21
21
} else if localOutputs. isEmpty {
22
- Text ( " No UTXOs " )
22
+ Text ( " No Outputs " )
23
23
. font ( . subheadline)
24
24
. listRowInsets ( EdgeInsets ( ) )
25
25
. listRowSeparator ( . hidden)
26
26
} else {
27
- ForEach ( localOutputs, id: \. outpoint) { utxo in
28
- LocalOutputItemView ( utxo : utxo , isRedacted: false )
27
+ ForEach ( localOutputs, id: \. outpoint) { output in
28
+ LocalOutputItemView ( output : output , isRedacted: false )
29
29
}
30
30
. listRowInsets ( EdgeInsets ( ) )
31
31
. listRowSeparator ( . hidden)
You can’t perform that action at this time.
0 commit comments