Skip to content

Commit 0d172a1

Browse files
committed
fix: ln auth error message formatting
1 parent e542eb4 commit 0d172a1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Bitkit/Views/Sheets/LnurlAuth/LnurlAuthSheet.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,14 @@ struct LnurlAuthSheet: View {
149149
} catch {
150150
Logger.error("Failed to handle LNURL auth: \(error)")
151151

152+
let errorMsg = (error as NSError).localizedDescription
153+
.trimmingCharacters(in: .whitespacesAndNewlines)
154+
let raw = errorMsg.isEmpty ? String(describing: type(of: error)) : errorMsg
155+
152156
app.toast(
153157
type: .error,
154158
title: t("other__lnurl_auth_error"),
155-
description: t("other__lnurl_auth_error_msg")
159+
description: t("other__lnurl_auth_error_msg", variables: ["raw": raw])
156160
)
157161
}
158162
}

0 commit comments

Comments
 (0)