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."
This commit is contained in:
Henrique Velloso
2026-02-20 15:36:37 -03:00
parent 1ad36dc387
commit abe89d875b
@@ -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<List<Profile>, ({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);