From c218e0dcdd5eaae0a1101759ec3050229cef74f3 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Thu, 22 Jun 2023 09:43:26 +0200 Subject: [PATCH] refactor: use zap.is_anon instead of recomputing I believe this code was written before we computed is_anon inside the zap. --- damus/Models/HomeModel.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/damus/Models/HomeModel.swift b/damus/Models/HomeModel.swift index 60fc9a75..85a7c5b1 100644 --- a/damus/Models/HomeModel.swift +++ b/damus/Models/HomeModel.swift @@ -1075,8 +1075,7 @@ func zap_notification_title(_ zap: Zap) -> String { func zap_notification_body(profiles: Profiles, zap: Zap, locale: Locale = Locale.current) -> String { let src = zap.request.ev - let anon = event_is_anonymous(ev: src) - let pk = anon ? "anon" : src.pubkey + let pk = zap.is_anon ? "anon" : src.pubkey let profile = profiles.lookup(id: pk) let sats = NSNumber(value: (Double(zap.invoice.amount) / 1000.0)) let formattedSats = format_msats_abbrev(zap.invoice.amount)