From abe89d875b3f741aa89c8cffcb0f41208ec984df Mon Sep 17 00:00:00 2001 From: Henrique Velloso Date: Fri, 20 Feb 2026 15:36:37 -0300 Subject: [PATCH] hotfix(trust-dialog): gate trust UI by signer readiness and harden reputation lookup In the install trust dialog, stop using profile availability as signed-in signal. Now we show reputation details and "Always trust" only when both `activePubkey` and `activeSigner` are available, so the UI matches actual trust persistence capability. In reputation lookup, make the provider reactive to signer state (`watch` instead of `read`) and send Vertex DVM params as hex pubkeys (`source` and `target`) to avoid format issues. Also replace raw reputation errors with the user-facing message "Service temporarily unavailable." --- lib/widgets/relevant_who_follow_container.dart | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/widgets/relevant_who_follow_container.dart b/lib/widgets/relevant_who_follow_container.dart index 54aa7b9..99929e7 100644 --- a/lib/widgets/relevant_who_follow_container.dart +++ b/lib/widgets/relevant_who_follow_container.dart @@ -192,9 +192,9 @@ class RelevantWhoFollowContainer extends HookConsumerWidget { ); }, ), - AsyncError(:final error) => Center( + AsyncError() => Center( child: Text( - error.toString().replaceFirst('Exception: ', ''), + 'Service temporarily unavailable.', style: baseStyle, ), ), @@ -353,16 +353,18 @@ class RelevantWhoFollowContainer extends HookConsumerWidget { final relevantWhoFollowProvider = FutureProvider.autoDispose .family, ({String to})>((ref, arg) async { // Require active signer and profile to submit the request - final signer = ref.read(Signer.activeSignerProvider); + final signer = ref.watch(Signer.activeSignerProvider); final pubkey = ref.watch(Signer.activePubkeyProvider); if (signer == null || pubkey == null) { throw 'Not signed in'; } + final targetPubkey = arg.to.decodeShareable(); + // Build and sign a reputation verification request final partial = PartialVerifyReputationRequest( - source: pubkey.encodeShareable(type: 'npub'), - target: arg.to, + source: pubkey, + target: targetPubkey, limit: 7, ); final request = await partial.signWith(signer);