mirror of
https://github.com/zapstore/zapstore.git
synced 2026-10-05 12:38:24 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user