Skip to content

Commit cec0db6

Browse files
authored
Merge branch 'master' into test/lnurl
2 parents 86e78a0 + b78b19b commit cec0db6

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Bitkit/Views/Wallets/Send/SendConfirmationView.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,18 @@ struct SendConfirmationView: View {
7373
return context.canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, error: &error)
7474
}
7575

76+
private var canEditAmount: Bool {
77+
guard app.selectedWalletToPayFrom == .lightning else {
78+
return true
79+
}
80+
81+
guard let invoice = app.scannedLightningInvoice else {
82+
return true
83+
}
84+
85+
return invoice.amountSatoshis == 0
86+
}
87+
7688
var body: some View {
7789
VStack(alignment: .leading, spacing: 0) {
7890
SheetHeader(title: t("wallet__send_review"), showBackButton: true)
@@ -600,6 +612,8 @@ struct SendConfirmationView: View {
600612
}
601613

602614
private func navigateToAmount() {
615+
guard canEditAmount else { return }
616+
603617
if let amountIndex = navigationPath.lastIndex(of: .amount) {
604618
navigationPath = Array(navigationPath.prefix(amountIndex + 1))
605619
} else {

0 commit comments

Comments
 (0)