Closed AMIRKHANEF closed 2 months ago
The changes involve enhancing account management and authorization processes within the extension. Key modifications include the addition of timestamps for account creation and authorization, updating methods to accommodate these timestamps, and refining logic for handling authorizations and account listings. The introduction of new properties and methods allows for better tracking of account metadata, improving overall functionality.
Files | Change Summary |
---|---|
packages/extension-base/src/background/handlers/Extension.ts |
Added applyAddedTime method for timestamp tracking during account creation and restoration. |
packages/extension-base/src/background/handlers/State.ts |
Updated AuthUrlInfo to include authorizedTime for tracking authorization timestamps. |
packages/extension-base/src/background/handlers/Tabs.ts |
Modified transformAccounts to include addedTime and updated authorize and accountsListAuthorized methods. |
packages/extension-base/src/background/types.ts |
Updated interfaces to include authorizedTime and addedTime , added new ApplyAddedTime interface. |
packages/extension-inject/src/types.ts |
Added optional addedTime property to InjectedAccount interface. |
packages/extension-polkagate/src/popup/authorize/Request.tsx |
Integrated dynamic fetching of authorization lists and updated state management for selected accounts. |
packages/extension-polkagate/src/popup/import/restoreJSONFullScreen/index.tsx |
Added metadata handling for account timestamps in RestoreJson function. |
sequenceDiagram
participant User
participant Extension
participant State
participant Tabs
User->>Extension: Create/Restore Account
Extension->>keyring: Create/Restore Account
keyring-->>Extension: Return Pair
Extension->>Extension: applyAddedTime(pair)
Extension->>State: Update authorizedTime
Extension->>Tabs: Update account list
Tabs-->>User: Show updated accounts
Objective | Addressed | Explanation |
---|---|---|
if a new account is added we need a new authorization popup (#1492) | β |
π Hop, hop, hooray, with each new account's birth,
Timestamps now track their worth,
In the world of code, we play,
Authorizations bright and gay,
With every change, we leap and cheer,
For better management is finally here! π
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
- The reauthorization window does not appear for already authorized URLs when new accounts are added.
- It's better to use 'Ignore' instead of 'Reject' as the button label.
All fixed
@AMIRKHANEF I donβt see the re-authorization popup for the new account I derived from existing ones.
Works Done
addedTime
to the keyring of the created, imported or added accounts.addedTime
to the type.Request.tsx
.ImportFromJSONFile.tsx
in order to addaddedTime
to the imported accounts from JSON file.close: #1492
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Style