Repository navigation
fix(wallet): consistently use verified calls in the request dialog - #679
Merged
Merged
Conversation
The request dialog loads the request itself with a verified call, but some of the data rendered inside it was still loaded with query calls: the current values shown in diff views, the next request when "Load next" is enabled, the full CallExternalCanister details, and the labels resolved by autocompletes, named rule chips and address book specifiers. Load these with the verified actor as well. Shared components pick this up through a new `provideVerifiedReads`/`useVerifiedReads` pair, so they keep using query calls everywhere outside of the dialog. `getNamedRule` gains the `verifiedCall` parameter the other getters already have. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WAEJVi9S9JPmbMVGCycebk
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Tooltip lookups remain unverified, and named-rule removal rows unintentionally use update calls outside the dialog.
2 open issues
What changed in this PR
This PR extends verified reads across the wallet’s request review dialog so supporting data uses the same verification approach as the request itself.
Changes:
- Enables verified calls for operation details, full request information, and loading the next request.
- Adds a verification scope for shared autocomplete, named-rule, and address-book components.
- Adds scope tests and strengthens the load-next assertion.
| File | Description |
|---|---|
| apps/wallet/src/services/station.service.ts | Adds optional verification to named-rule reads. |
| apps/wallet/src/composables/verified-reads.composable.ts | Defines the shared verification scope. |
| apps/wallet/src/composables/verified-reads.composable.spec.ts | Tests reads inside and outside the scope. |
| apps/wallet/src/composables/autocomplete.composable.ts | Applies verification scope to autocomplete lookups. |
| apps/wallet/src/components/requests/RequestDialog.vue | Provides verification scope and verifies load-next reads. |
| apps/wallet/src/components/requests/RequestDialog.spec.ts | Asserts verified load-next calls. |
| apps/wallet/src/components/requests/operations/RemoveRequestPolicyOperation.vue | Verifies policy detail reads. |
| apps/wallet/src/components/requests/operations/RemoveNamedRuleOperation.vue | Enables verified named-rule reads. |
| apps/wallet/src/components/requests/operations/ManageSystemInfoOperation.vue | Verifies system information outside list mode. |
| apps/wallet/src/components/requests/operations/EditUserOperation.vue | Verifies current-user reads. |
| apps/wallet/src/components/requests/operations/EditUserGroupOperation.vue | Verifies current-group reads. |
| apps/wallet/src/components/requests/operations/EditRequestPolicyOperation.vue | Verifies current-policy reads. |
| apps/wallet/src/components/requests/operations/EditPermissionOperation.vue | Verifies current-permission reads. |
| apps/wallet/src/components/requests/operations/EditNamedRuleOperation.vue | Verifies current named-rule reads. |
| apps/wallet/src/components/requests/operations/CallExternalCanisterOperation.vue | Verifies the full-information request fetch. |
| apps/wallet/src/components/request-policies/specifier/AddressBookEntrySpecifier.vue | Applies verification scope to entry lookups. |
| apps/wallet/src/components/request-policies/rule/NamedRule.vue | Applies verification scope to named-rule loading. |
| apps/wallet/src/components/request-policies/InteractiveNamedRule.vue | Applies verification scope to interactive rule loading. |
Review effort: Balanced
Rule tooltips and summaries resolve user, group and named rule names through `populateRule`, which always used query calls. Pass the dialog's verified reads flag through it, so these lookups match the rest of the dialog and keep using query calls elsewhere. Also keep the RemoveNamedRule request list rows on query calls; only its detail view needs the verified read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WAEJVi9S9JPmbMVGCycebk
aterga
marked this pull request as ready for review
November 2, 2026 12:09
sea-snake
approved these changes
Nov 2, 2026
sea-snake
enabled auto-merge (squash)
November 2, 2026 12:11
|
✅ No security or compliance issues detected. Reviewed everything up to 8398e81. Security OverviewDetected Code Changes
|
`InteractiveUserGroup` lists a group's members on hover and is rendered inside the request dialog through rule summaries. Pass the dialog's verified reads flag to its `listUsers` call, like the other shared components, so it keeps using query calls elsewhere. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WAEJVi9S9JPmbMVGCycebk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
The request dialog already loads the request itself with a verified call (
getRequest(..., true)), and some operation renderers (EditAddressBookEntry,EditAsset,RemoveAddressBookEntry,RemoveUserGroup,ChangeExternalCanister) load their current values the same way. This PR applies that consistently to the rest of the data rendered inside the dialog:EditUser,EditUserGroup,EditNamedRule,EditPermission,EditRequestPolicy,RemoveNamedRule,RemoveRequestPolicyandManageSystemInfo(list rows keep using query calls).getNextApprovableRequestis called withverifiedCall = true, since its response is rendered directly.getRequestre-fetch done in detail mode.useRuleToTooltip,usePopulatedRule), group member tooltips (InteractiveUserGroup), and the address book entry specifier.RequestDialogcalls the newprovideVerifiedReads(), and these components read it withuseVerifiedReads(), so they keep using query calls everywhere outside the dialog.StationService.getNamedRulegains theverifiedCallparameter the other getters already have.Trade-off
Reads inside the request dialog become update calls, which adds roughly a second or two when the dialog opens and when the next request is loaded. Lists and other pages are unchanged.
Testing
verified-reads.composable.spec.tscovers autocomplete, rule tooltip and group member tooltip lookups inside and outside the dialog scope.RequestDialog.spec.tsnow asserts that load next uses a verified call.vitest run(106 files, 502 tests),vue-tsc --noEmit, ESLint and Prettier all pass.🤖 Generated with Claude Code
https://claude.ai/code/session_01WAEJVi9S9JPmbMVGCycebk