Skip to content

Commit

Permalink
Disable editing amount when paying an invoice with a defined amount (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ndungudedan authored Mar 26, 2024
1 parent 7a9d48b commit 98fb16a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ fun SendBolt11PaymentView(
topContent = {
AmountHeroInput(
initialAmount = amount,
enabled = amount == null,
onAmountChange = { newAmount ->
amountErrorMessage = ""
when {
Expand Down
1 change: 1 addition & 0 deletions phoenix-ios/phoenix-ios/views/send/ValidateView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ struct ValidateView: View {
.disableAutocorrection(true)
.fixedSize()
.font(.title)
.disabled(paymentRequest()?.amount != nil)
.multilineTextAlignment(.trailing)
.minimumScaleFactor(0.95) // SwiftUI bugs: truncating text in RTL
.foregroundColor(isInvalidAmount() ? Color.appNegative : Color.primaryForeground)
Expand Down

0 comments on commit 98fb16a

Please sign in to comment.