Add connected apps permission center#49
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a “Connected Apps” permission center that persists per-wallet connected dApp grants in Settings, records connections after authentication, gates dAPI getAccounts behind an active grant, and adds UI + localization for reviewing and revoking those connections.
Changes:
- Add
ConnectedDAppService+ConnectedDAppmodel to persist connected dApps per wallet. - Record connected domains after in-app and external authentication; gate dAPI
GetAccounts. - Add Security Center entry + Connected Apps management page, with EN / zh-Hans strings.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| OneGateApp/Services/ConnectedDAppService.cs | New persistence service for per-wallet connected dApp grants (load/connect/disconnect). |
| OneGateApp/Models/ConnectedDApp.cs | Model for connected dApp data plus display/format helpers for UI. |
| OneGateApp/Pages/ConnectedAppsPage.xaml | New UI page for listing connected dApps and showing permission summary/empty state. |
| OneGateApp/Pages/ConnectedAppsPage.xaml.cs | Page logic for refresh, single disconnect, disconnect-all with confirmation + toast. |
| OneGateApp/Pages/SecurityCenterPage.xaml | Adds a tappable “dApp authorization” row that surfaces connected dApp status/text and navigates to the new page. |
| OneGateApp/Pages/SecurityCenterPage.xaml.cs | Loads connected dApp count during refresh; adds navigation handler; injects service. |
| OneGateApp/Pages/LaunchDAppPage.xaml.dAPI.cs | Records connected dApp on Authenticate; gates GetAccounts on an existing grant. |
| OneGateApp/Pages/LaunchDAppPage.xaml.cs | Injects ConnectedDAppService into dApp launch page. |
| OneGateApp/Pages/AuthenticatePage.xaml.cs | Records connected dApp after external authentication; injects service. |
| OneGateApp/MauiProgram.cs | Registers ConnectedDAppService in DI. |
| OneGateApp/AppShell.xaml.cs | Registers route for the Connected Apps page. |
| OneGateApp/Properties/Strings.resx | Adds EN strings for Connected Apps UI and actions. |
| OneGateApp/Properties/Strings.zh-Hans.resx | Adds zh-Hans strings for Connected Apps UI and actions. |
| OneGateApp/Properties/Strings.Designer.cs | Resource designer updates for newly added strings. |
Files not reviewed (1)
- OneGateApp/Properties/Strings.Designer.cs: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
erikzhang
left a comment
There was a problem hiding this comment.
This is not in line with NEP-21 specifications. The purpose of authenticate is for the website to authenticate the user, not for the user to authorize the website. If user authorization is required to allow the website to obtain the address, then we should ask for the user's consent when the website calls getAccounts.
|
Latest review follow-up after merging current master (bb40f15): this PR still respects Erik review feedback and NEP-21 semantics. |


Scope
Verification
Screenshots
Known limitations