Skip to content

Commit

Permalink
ui: remove bolt11 bolt12 onchain
Browse files Browse the repository at this point in the history
  • Loading branch information
reez committed Aug 5, 2024
1 parent 375a7a8 commit 4356edf
Showing 2 changed files with 20 additions and 20 deletions.
14 changes: 7 additions & 7 deletions LDKNodeMonday/Model/ReceiveOption.swift
Original file line number Diff line number Diff line change
@@ -8,12 +8,12 @@
import Foundation

enum ReceiveOption: String, CaseIterable, Identifiable {
case bolt11Zero = "Bolt11 0"
case bolt11 = "Bolt11"
// case bolt11Zero = "Bolt11 0"
// case bolt11 = "Bolt11"
case bolt11JIT = "Bolt11 JIT"
// case bolt12Zero = "Bolt12 0"
case bolt12 = "Bolt12"
case bitcoin = "Address"
// case bolt12 = "Bolt12"
// case bitcoin = "Address"
case bip21 = "BIP21"

var id: Self { self }
@@ -22,10 +22,10 @@ enum ReceiveOption: String, CaseIterable, Identifiable {
extension ReceiveOption {
var systemImageName: String {
switch self {
case .bitcoin:
return "bitcoinsign"
default:
case .bolt11JIT:
return "bolt"
default:
return "qrcode"
}
}
}
26 changes: 13 additions & 13 deletions LDKNodeMonday/View/Home/Receive/ReceiveView.swift
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@
import SwiftUI

struct ReceiveView: View {
@State private var selectedOption: ReceiveOption = .bolt11Zero
@State private var selectedOption: ReceiveOption = .bip21

var body: some View {

@@ -19,18 +19,18 @@ struct ReceiveView: View {
Spacer()

switch selectedOption {
case .bolt11Zero:
ZeroInvoiceView(viewModel: .init())
case .bolt11:
AmountInvoiceView(viewModel: .init())
// case .bolt11Zero:
// ZeroInvoiceView(viewModel: .init())
// case .bolt11:
// AmountInvoiceView(viewModel: .init())
case .bolt11JIT:
JITInvoiceView(viewModel: .init())
// case .bolt12Zero:
// Bolt12ZeroInvoiceView(viewModel: .init())
case .bolt12:
Bolt12InvoiceView(viewModel: .init())
case .bitcoin:
AddressView(viewModel: .init())
// case .bolt12:
// Bolt12InvoiceView(viewModel: .init())
// case .bitcoin:
// AddressView(viewModel: .init())
case .bip21:
BIP21View(viewModel: .init())
}
@@ -54,12 +54,12 @@ struct CustomSegmentedPicker: View {
}) {
VStack {
Image(systemName: option.systemImageName)
.font(.system(size: 6))
//.font(.system(size: 6))
Text(option.rawValue)
.font(.system(size: 6))
//.font(.system(size: 6))
}
.padding()
.font(.caption2)
.font(.body)
.foregroundColor(
self.selectedOption == option ? Color.primary : Color.secondary
)
@@ -76,5 +76,5 @@ struct CustomSegmentedPicker: View {
}

#Preview {
CustomSegmentedPicker(options: ReceiveOption.allCases, selectedOption: .constant(.bolt11Zero))
CustomSegmentedPicker(options: ReceiveOption.allCases, selectedOption: .constant(.bip21))
}

0 comments on commit 4356edf

Please sign in to comment.