Skip to content

Commit 0dcc2cf

Browse files
authored
ui: walletview and sendview
1 parent 95b88d4 commit 0dcc2cf

File tree

6 files changed

+12
-32
lines changed

6 files changed

+12
-32
lines changed

BDKSwiftExampleWallet/Resources/Localizable.xcstrings

+1
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@
318318
}
319319
},
320320
"Wallet" : {
321+
"extractionState" : "stale",
321322
"localizations" : {
322323
"fr" : {
323324
"stringUnit" : {

BDKSwiftExampleWallet/View/SendView.swift

-8
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,6 @@ struct SendView: View {
5454
)
5555
.padding()
5656
.keyboardType(.numberPad)
57-
Rectangle()
58-
.frame(height: 1)
59-
.foregroundColor(.secondary)
60-
.padding(.horizontal)
6157
}
6258

6359
VStack {
@@ -74,10 +70,6 @@ struct SendView: View {
7470
.padding()
7571
.truncationMode(.middle)
7672
.lineLimit(1)
77-
Rectangle()
78-
.frame(height: 1)
79-
.foregroundColor(.secondary)
80-
.padding(.horizontal)
8173
}
8274

8375
VStack {

BDKSwiftExampleWallet/View/TabHomeView.swift

+5-17
Original file line numberDiff line numberDiff line change
@@ -15,33 +15,21 @@ struct TabHomeView: View {
1515
Color(uiColor: UIColor.systemBackground)
1616

1717
TabView {
18-
1918
WalletView(viewModel: .init())
2019
.tabItem {
21-
Label(
22-
"Wallet",
23-
systemImage: "bitcoinsign"
24-
)
20+
Image(systemName: "bitcoinsign")
2521
}
26-
2722
ReceiveView(viewModel: .init())
2823
.tabItem {
29-
Label(
30-
"Receive",
31-
systemImage: "arrow.down"
32-
)
24+
Image(systemName: "arrow.down")
3325
}
34-
3526
SendView(viewModel: .init())
3627
.tabItem {
37-
Label(
38-
"Send",
39-
systemImage: "arrow.up"
40-
)
28+
Image(systemName: "arrow.up")
4129
}
42-
4330
}
44-
.tint(.orange)
31+
.tint(.primary)
32+
4533
}
4634

4735
}

BDKSwiftExampleWallet/View/WalletTransactionListView.swift

+5-6
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ struct WalletTransactionListView: View {
4242
.font(.largeTitle)
4343
.symbolRenderingMode(.palette)
4444
.foregroundStyle(
45-
Color(UIColor.systemBackground),
4645
transaction.confirmationTime != nil
47-
? Color.bitcoinOrange : Color.secondary
46+
? Color.bitcoinOrange : Color.secondary,
47+
Color.gray.opacity(0.05)
4848
)
4949
VStack(alignment: .leading, spacing: 5) {
5050
Text(transaction.txid)
@@ -56,15 +56,14 @@ struct WalletTransactionListView: View {
5656
.foregroundColor(.primary)
5757
Text(
5858
transaction.confirmationTime?.timestamp.toDate().formatted(
59-
date: .abbreviated,
60-
time: Date.FormatStyle.TimeStyle.shortened
59+
.dateTime.day().month().hour().minute()
6160
)
6261
?? "Unconfirmed"
6362
)
6463
}
6564
.foregroundColor(.secondary)
66-
.font(.caption2)
67-
.padding(.trailing, 10.0)
65+
.font(.caption)
66+
.padding(.trailing, 30.0)
6867
Spacer()
6968
Text(
7069
transaction.sent > 0

Docs/bitcoin-screen.png

-15.8 KB
Loading

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![License](https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg)](https://github.com/reez/BDKSwiftExampleWallet/blob/main/LICENSE)
44

5-
An example iOS app using [BDK](https://github.com/bitcoindevkit)
5+
An example iOS app using [Bitcoin Dev Kit](https://github.com/bitcoindevkit) (BDK)
66

77
<img src="Docs/bitcoin-screen.png" alt="Screenshot" width="236" height="511">
88

0 commit comments

Comments
 (0)