Skip to content

Commit

Permalink
fix: nodeidview delete seed
Browse files Browse the repository at this point in the history
  • Loading branch information
reez authored Sep 18, 2024
1 parent 52fad75 commit a99b598
Show file tree
Hide file tree
Showing 21 changed files with 408 additions and 390 deletions.
14 changes: 10 additions & 4 deletions LDKNodeMonday/App/LDKNodeMondayApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,19 @@ import SwiftUI
struct LDKNodeMondayApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
@AppStorage("isOnboarding") var isOnboarding: Bool = true
@State private var navigationPath = NavigationPath()

var body: some Scene {
WindowGroup {
if isOnboarding {
OnboardingView(viewModel: .init())
} else {
StartView(viewModel: .init())
NavigationStack(path: $navigationPath) {
if isOnboarding {
OnboardingView(viewModel: .init())
} else {
StartView(viewModel: .init())
}
}
.onChange(of: isOnboarding) { oldValue, newValue in
navigationPath = NavigationPath()
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions LDKNodeMonday/Extensions/PaymentKind+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ extension PaymentKind {
return preimage
case .spontaneous(_, let preimage):
return preimage
case .bolt12Offer(hash: _, let preimage, secret: _, offerId: _):
case .bolt12Offer(hash: _, let preimage, secret: _, offerId: _, payerNote: _, quantity: _):
return preimage
case .bolt12Refund(hash: _, let preimage, secret: _):
case .bolt12Refund(hash: _, let preimage, secret: _, payerNote: _, quantity: _):
return preimage
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ func handleNodeError(_ error: NodeError) -> MondayError {
case .InvalidUri(let message):
return .init(title: "InvalidUri", detail: message)

case .InvalidQuantity(let message):
return .init(title: "InvalidQuantity", detail: message)

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@ class ChannelAddViewModel: ObservableObject {
@Published var nodeId: PublicKey = ""
@Published var isOpenChannelFinished: Bool = false
@Published var isProgressViewShowing: Bool = false
private let channelConfig = ChannelConfig()

init() {
self.channelConfig.setForwardingFeeProportionalMillionths(value: UInt32(0))
self.channelConfig.setForwardingFeeBaseMsat(feeMsat: UInt32(1000))
self.channelConfig.setCltvExpiryDelta(value: UInt16(72))
self.channelConfig.setMaxDustHtlcExposureFromFixedLimit(limitMsat: UInt64(50_000_000))
self.channelConfig.setForceCloseAvoidanceMaxFeeSatoshis(valueSat: UInt64(1000))
}
private let channelConfig = ChannelConfig(
forwardingFeeProportionalMillionths: UInt32(0),
forwardingFeeBaseMsat: UInt32(1000),
cltvExpiryDelta: UInt16(72),
maxDustHtlcExposure: .feeRateMultiplier(multiplier: UInt64(50_000_000)),
forceCloseAvoidanceMaxFeeSatoshis: UInt64(1000),
acceptUnderpayingHtlcs: false
)

func openChannel(
nodeId: PublicKey,
Expand Down
Loading

0 comments on commit a99b598

Please sign in to comment.