diff --git a/TalerWallet1/Resources/Localizable.xcstrings b/TalerWallet1/Resources/Localizable.xcstrings index e283ca45..83c20cc0 100755 --- a/TalerWallet1/Resources/Localizable.xcstrings +++ b/TalerWallet1/Resources/Localizable.xcstrings @@ -1880,6 +1880,9 @@ } } }, + "A required token is not available in this wallet." : { + "comment" : "payment option needs a merchant-issued discount or subscription token the wallet does not hold" + }, "Abort" : { "comment" : "deposit", "localizations" : { diff --git a/TalerWallet1/Views/Sheets/Payment/ChoicesView.swift b/TalerWallet1/Views/Sheets/Payment/ChoicesView.swift index dbeb0dca..dcd94b73 100644 --- a/TalerWallet1/Views/Sheets/Payment/ChoicesView.swift +++ b/TalerWallet1/Views/Sheets/Payment/ChoicesView.swift @@ -143,6 +143,12 @@ struct ChoicesView: View, Sendable { .talerFont(.body) .padding(.bottom, -4) InputTokenView(inputs: inputs, tokenFamilies: tokenFamilies) + if !isPaymentPossible, let tokenDetails = selectionDetail.tokenDetails, + tokenDetails.tokensAvailable < tokenDetails.tokensRequested { + Text("A required token is not available in this wallet.") + .talerFont(.body) + .foregroundColor(WalletColors().errorColor) + } } // Receive output tokens let outputs = contractChoice.outputs