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
6 changes: 3 additions & 3 deletions BDKSwiftExampleWallet/View/Activity/ActivityListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ struct CustomSegmentedControl: View {
}

private func segmentButton(for mode: ActivityListViewModel.DisplayMode) -> some View {
Button(action: {
Button {
withAnimation(.spring(response: 0.5, dampingFraction: 0.7)) {
selection = mode
}
}) {
} label: {
Text(mode == .transactions ? "Transactions" : "Unspent")
.bold()
.foregroundColor(selection == mode ? .primary : .gray)
.foregroundStyle(selection == mode ? Color.primary : Color.gray)
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions BDKSwiftExampleWallet/View/Activity/LocalOutputItemView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ struct LocalOutputItemView: View {
.fontDesign(.monospaced)
.fontWeight(.semibold)
.font(.title)
.foregroundColor(.primary)
.foregroundStyle(.primary)

Text("Vout: \(output.outpoint.vout)")
.lineLimit(dynamicTypeSize.isAccessibilitySize ? 2 : 1)
.font(.caption2)
.fontWidth(.condensed)

}
.foregroundColor(.secondary)
.foregroundStyle(.secondary)
.font(.subheadline)
.padding(.trailing, 30.0)
.redacted(reason: isRedacted ? .placeholder : [])
Expand Down
12 changes: 6 additions & 6 deletions BDKSwiftExampleWallet/View/Activity/TransactionDetailView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ struct TransactionDetailView: View {
switch canonicalTx.chainPosition {
case .confirmed(let confirmationBlockTime):
Text("Block \(confirmationBlockTime.blockId.height.delimiter)")
.foregroundColor(.secondary)
.foregroundStyle(.secondary)
case .unconfirmed(_):
Text("Unconfirmed")
.foregroundColor(.secondary)
.foregroundStyle(.secondary)
}

}
Expand All @@ -71,7 +71,7 @@ struct TransactionDetailView: View {
.lineLimit(1)
.minimumScaleFactor(0.5)
.font(.largeTitle)
.foregroundColor(.primary)
.foregroundStyle(.primary)
.fontWeight(.bold)
.fontDesign(.rounded)
VStack(spacing: 4) {
Expand All @@ -95,7 +95,7 @@ struct TransactionDetailView: View {
Text("\(fee.formattedWithSeparator) sats fee")
}
}
.foregroundColor(.secondary)
.foregroundStyle(.secondary)
.font(.callout)
}

Expand All @@ -115,7 +115,7 @@ struct TransactionDetailView: View {
} label: {
Image(systemName: "safari")
.fontWeight(.semibold)
.foregroundColor(.bitcoinOrange)
.foregroundStyle(Color.bitcoinOrange)
}
Spacer()
}
Expand All @@ -142,7 +142,7 @@ struct TransactionDetailView: View {
}
}
.fontWeight(.semibold)
.foregroundColor(.bitcoinOrange)
.foregroundStyle(Color.bitcoinOrange)
}
}
.fontDesign(.monospaced)
Expand Down
4 changes: 2 additions & 2 deletions BDKSwiftExampleWallet/View/Activity/TransactionItemView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ struct TransactionItemView: View {
.fontDesign(.monospaced)
.fontWeight(.semibold)
.font(.title)
.foregroundColor(.primary)
.foregroundStyle(.primary)
switch canonicalTx.chainPosition {
case .confirmed(let confirmationBlockTime):
Text(
Expand All @@ -85,7 +85,7 @@ struct TransactionItemView: View {
.fontWidth(.condensed)
}
}
.foregroundColor(.secondary)
.foregroundStyle(.secondary)
.font(.subheadline)
.padding(.trailing, 30.0)
.redacted(reason: isRedacted ? .placeholder : [])
Expand Down
2 changes: 1 addition & 1 deletion BDKSwiftExampleWallet/View/Receive/ReceiveView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ struct ReceiveView: View {
}
}
.fontWeight(.semibold)
.foregroundColor(.bitcoinOrange)
.foregroundStyle(Color.bitcoinOrange)
}
}
.padding()
Expand Down
12 changes: 8 additions & 4 deletions BDKSwiftExampleWallet/View/Send/AddressView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,11 @@ struct CustomScannerView: View {

VStack {
HStack {
Button(action: { dismiss() }) {
Button {
dismiss()
} label: {
Image(systemName: "xmark")
.foregroundColor(.white)
.foregroundStyle(.white)
.font(.system(size: 20, weight: .bold))
.frame(width: 44, height: 44)
.background(Color.black.opacity(0.6))
Expand All @@ -120,10 +122,12 @@ struct CustomScannerView: View {

Spacer()

Button(action: pasteAction) {
Button {
pasteAction()
} label: {
Text("Paste Address")
.padding()
.foregroundColor(Color(uiColor: .label))
.foregroundStyle(Color(uiColor: .label))
.background(Color(uiColor: .systemBackground).opacity(0.5))
.clipShape(Capsule())
}
Expand Down
4 changes: 2 additions & 2 deletions BDKSwiftExampleWallet/View/Send/AmountView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ struct AmountView: View {
}
.fontWeight(.semibold)
.font(.caption)
.foregroundColor(.secondary)
.foregroundStyle(.secondary)
}
if let balance = viewModel.balanceConfirmed {
HStack(spacing: 2) {
Expand All @@ -40,7 +40,7 @@ struct AmountView: View {
}
.fontWeight(.semibold)
.font(.caption)
.foregroundColor(.secondary)
.foregroundStyle(.secondary)
}
}

Expand Down
6 changes: 3 additions & 3 deletions BDKSwiftExampleWallet/View/Send/BuildTransactionView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ struct BuildTransactionView: View {
.font(.largeTitle)
.fontWeight(.bold)
.fontDesign(.rounded)
.foregroundColor(.primary)
.foregroundStyle(.primary)
} else {
Text("...")
}
Expand Down Expand Up @@ -166,7 +166,7 @@ struct BuildTransactionView: View {
} else if isSent && viewModel.buildTransactionViewError == nil {
VStack {
Image(systemName: "checkmark")
.foregroundColor(.green)
.foregroundStyle(.green)
if let transaction = viewModel.extractTransaction() {
HStack {
Text(transaction.computeTxid())
Expand All @@ -191,7 +191,7 @@ struct BuildTransactionView: View {
}
}
.fontWeight(.semibold)
.foregroundColor(.bitcoinOrange)
.foregroundStyle(Color.bitcoinOrange)
}
}
.fontDesign(.monospaced)
Expand Down
2 changes: 1 addition & 1 deletion BDKSwiftExampleWallet/View/Send/FeeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ struct FeeView: View {
.accessibilityValue("\(viewModel.selectedFee ?? 1) satoshis per vbyte")

Text("sat/vb")
.foregroundColor(.secondary)
.foregroundStyle(.secondary)
.fontWeight(.thin)

Spacer()
Expand Down
8 changes: 4 additions & 4 deletions BDKSwiftExampleWallet/View/Settings/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct SettingsView: View {
.padding(.horizontal, 20.0)
.padding(.top, 40.0)
.padding(.bottom, -40.0)
.foregroundColor(.secondary)
.foregroundStyle(.secondary)

Form {

Expand All @@ -37,7 +37,7 @@ struct SettingsView: View {
Text(
"\(network.capitalized) • \(url.replacingOccurrences(of: "https://", with: "").replacingOccurrences(of: "http://", with: ""))"
)
.foregroundColor(.primary)
.foregroundStyle(.primary)
} else {
HStack {
Text("No Network")
Expand All @@ -53,11 +53,11 @@ struct SettingsView: View {
} label: {
Text("Full Scan")
}
.foregroundColor(.bitcoinOrange)
.foregroundStyle(Color.bitcoinOrange)
if viewModel.walletSyncState == .syncing {
Text("\(viewModel.inspectedScripts)")
.contentTransition(.numericText())
.foregroundColor(.primary)
.foregroundStyle(.primary)
.animation(.easeInOut, value: viewModel.inspectedScripts)
}
}
Expand Down
32 changes: 16 additions & 16 deletions BDKSwiftExampleWallet/View/WalletView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ struct WalletView: View {
Text("Bitcoin".uppercased())
.fontWeight(.semibold)
.fontWidth(.expanded)
.foregroundColor(.bitcoinOrange)
.foregroundStyle(Color.bitcoinOrange)
.scaleEffect(isAnimating ? 1.0 : 0.6)
.onAppear {
withAnimation(.easeOut(duration: 0.5)) {
Expand All @@ -41,15 +41,15 @@ struct WalletView: View {
withAnimation {
HStack(spacing: 15) {
Image(systemName: "bitcoinsign")
.foregroundColor(.secondary)
.foregroundStyle(.secondary)
.font(.title)
.fontWeight(.thin)
Text(viewModel.balanceTotal.formattedSatoshis())
.contentTransition(.numericText())
.fontWeight(.semibold)
.fontDesign(.rounded)
Text("sats")
.foregroundColor(.secondary)
.foregroundStyle(.secondary)
.fontWeight(.thin)
}
.font(.largeTitle)
Expand All @@ -70,7 +70,7 @@ struct WalletView: View {
.contentTransition(.numericText())
.fontDesign(.rounded)
}
.foregroundColor(.secondary)
.foregroundStyle(.secondary)
.font(.subheadline)
}
.padding(.vertical, 20.0)
Expand Down Expand Up @@ -110,7 +110,7 @@ struct WalletView: View {
}
}
.fontDesign(.monospaced)
.foregroundColor(.secondary)
.foregroundStyle(.secondary)
.font(.caption2)
.fontWeight(.thin)
.animation(.easeInOut, value: viewModel.inspectedScripts)
Expand All @@ -126,7 +126,7 @@ struct WalletView: View {
)
} else if viewModel.walletSyncState == .synced {
Image(systemName: "checkmark.circle.fill")
.foregroundColor(
.foregroundStyle(
viewModel.walletSyncState == .synced
? .green : .secondary
)
Expand All @@ -141,19 +141,19 @@ struct WalletView: View {
.contentTransition(.symbolEffect(.replace.offUp))

}
.foregroundColor(.secondary)
.foregroundStyle(.secondary)
.font(.caption)

if viewModel.walletSyncState == .synced {
Button(action: {
Button {
showAllTransactions = true
}) {
} label: {
HStack(spacing: 2) {
Text("Show All")
Image(systemName: "arrow.right")
}
.font(.caption)
.foregroundColor(.secondary)
.foregroundStyle(.secondary)
.fontWeight(.regular)
}
}
Expand All @@ -173,20 +173,20 @@ struct WalletView: View {
}

HStack {
Button(action: {
Button {
showReceiveView = true
}) {
} label: {
Image(systemName: "qrcode")
.font(.title)
.foregroundColor(.primary)
.foregroundStyle(.primary)
}

Spacer()

NavigationLink(value: NavigationDestination.address) {
Image(systemName: "qrcode.viewfinder")
.font(.title)
.foregroundColor(.primary)
.foregroundStyle(.primary)
}
}
.padding([.horizontal, .bottom])
Expand Down Expand Up @@ -282,9 +282,9 @@ struct WalletView: View {
}
.toolbar {
ToolbarItem(placement: .navigationBarTrailing) {
Button(action: {
Button {
showSettingsView = true
}) {
} label: {
Image(systemName: "person.and.background.dotted")
}
}
Expand Down
Loading