From 609cdcc5f9d59cf6018ff3724ff4976580df42af Mon Sep 17 00:00:00 2001 From: yse Date: Mon, 16 Feb 2026 10:44:58 +0100 Subject: [PATCH] wallet: errors: add %@ string formatting instead of %s This fixes a UI issue where the error message from the NWC response would be incorrectly displayed due to utf-8 formatting. Signed-off-by: Hydra Yse --- .../Wallet/Models/WalletConnect/HumanReadableErrors.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/damus/Features/Wallet/Models/WalletConnect/HumanReadableErrors.swift b/damus/Features/Wallet/Models/WalletConnect/HumanReadableErrors.swift index 93fa5976..d4249834 100644 --- a/damus/Features/Wallet/Models/WalletConnect/HumanReadableErrors.swift +++ b/damus/Features/Wallet/Models/WalletConnect/HumanReadableErrors.swift @@ -38,7 +38,7 @@ extension WalletConnect.WalletResponseErr { var humanReadableError: ErrorView.UserPresentableError? { guard let code = self.code else { return .init( - user_visible_description: String(format: NSLocalizedString("Your connected wallet raised an unknown error. Message: %s", comment: "Human readable error description for unknown error"), self.message ?? NSLocalizedString("Empty error message", comment: "A human readable placeholder to indicate that the error message is empty")), + user_visible_description: String(format: NSLocalizedString("Your connected wallet raised an unknown error. Message: %@", comment: "Human readable error description for unknown error"), self.message ?? NSLocalizedString("Empty error message", comment: "A human readable placeholder to indicate that the error message is empty")), tip: NSLocalizedString("Please contact the developer of your wallet provider for help.", comment: "Human readable error description for an unknown error raised by a wallet provider."), technical_info: "NWC wallet provider returned an error response without a valid reason code. Message: \(self.message ?? "Empty error message")" )