Skip to content
Merged
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
14 changes: 14 additions & 0 deletions Bitkit/Views/Wallets/Send/SendConfirmationView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,18 @@ struct SendConfirmationView: View {
return context.canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, error: &error)
}

private var canEditAmount: Bool {
guard app.selectedWalletToPayFrom == .lightning else {
return true
}

guard let invoice = app.scannedLightningInvoice else {
return true
}

return invoice.amountSatoshis == 0
}

var body: some View {
VStack(alignment: .leading, spacing: 0) {
SheetHeader(title: t("wallet__send_review"), showBackButton: true)
Expand Down Expand Up @@ -600,6 +612,8 @@ struct SendConfirmationView: View {
}

private func navigateToAmount() {
guard canEditAmount else { return }

if let amountIndex = navigationPath.lastIndex(of: .amount) {
navigationPath = Array(navigationPath.prefix(amountIndex + 1))
} else {
Expand Down
Loading