Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc: view model update space and lines #79

Merged
merged 1 commit into from
Feb 11, 2024
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: 1 addition & 5 deletions LDKNodeMonday/View Model/Bitcoin/SendBitcoinViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ import SwiftUI

class SendBitcoinViewModel: ObservableObject {
let spendableBalance: String
@Published var address: String = "" {
didSet {
address = address.trimmingCharacters(in: .whitespacesAndNewlines)
}
}
@Published var address: String = ""
@Published var txId: String = ""
@Published var sendViewError: MondayError?
@Published var networkColor = Color.gray
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,11 @@ import LDKNode
import SwiftUI

class ChannelAddViewModel: ObservableObject {
@Published var address: String = "" {
didSet {
address = address.trimmingCharacters(in: .whitespacesAndNewlines)
}
}
@Published var channelAmountSats: String = "" {
didSet {
channelAmountSats = channelAmountSats.trimmingCharacters(in: .whitespacesAndNewlines)
}
}
@Published var address: String = ""
@Published var channelAmountSats: String = ""
@Published var channelAddViewError: MondayError?
@Published var networkColor = Color.gray
@Published var nodeId: PublicKey = "" {
didSet {
nodeId = nodeId.trimmingCharacters(in: .whitespacesAndNewlines)
}
}
@Published var nodeId: PublicKey = ""
@Published var isOpenChannelFinished: Bool = false
@Published var isProgressViewShowing: Bool = false

Expand Down
12 changes: 2 additions & 10 deletions LDKNodeMonday/View Model/Lightning/Peer/PeerViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,10 @@ import LDKNode
import SwiftUI

class PeerViewModel: ObservableObject {
@Published var address: String = "" {
didSet {
address = address.trimmingCharacters(in: .whitespacesAndNewlines)
}
}
@Published var address: String = ""
@Published var peerViewError: MondayError?
@Published var networkColor = Color.gray
@Published var nodeId: PublicKey = "" {
didSet {
nodeId = nodeId.trimmingCharacters(in: .whitespacesAndNewlines)
}
}
@Published var nodeId: PublicKey = ""
@Published var isProgressViewShowing: Bool = false

func connect(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ import LDKNode
import SwiftUI

class ReceiveViewModel: ObservableObject {
@Published var amountMsat: String = "" {
didSet {
amountMsat = amountMsat.trimmingCharacters(in: .whitespacesAndNewlines)
}
}
@Published var amountMsat: String = ""
@Published var invoice: Bolt11Invoice = ""
@Published var receiveViewError: MondayError?
@Published var networkColor = Color.gray
Expand Down
6 changes: 1 addition & 5 deletions LDKNodeMonday/View Model/Lightning/Send/SendViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ import LDKNode
import SwiftUI

class SendViewModel: ObservableObject {
@Published var invoice: PublicKey = "" {
didSet {
invoice = invoice.trimmingCharacters(in: .whitespacesAndNewlines)
}
}
@Published var invoice: PublicKey = ""
@Published var networkColor = Color.gray
@Published var parseError: MondayError?

Expand Down
Loading