Closed Nick-1979 closed 3 months ago
The updates address the issue where importing proxied accounts fails after switching chains or addresses. Changes include adding a new case in Bread.tsx
, refining logic in useProxiedAccounts.ts
to handle api
and formatted
parameters, adjusting layout and imports in importProxiedFullScreen/index.tsx
, and adding a genesisHash
field to the ProxiedAccounts
type.
Files/Paths | Change Summary |
---|---|
.../fullscreen/partials/Bread.tsx |
Added a new case 'import' to the switch statement for the path variable. |
.../hooks/useProxiedAccounts.ts |
Added ApiPromise import, modified getProxiedAccounts to accept api and formatted parameters, updated logic, dependencies in useEffect , and refined return statement using useMemo . |
.../popup/import/importProxied/ProxiedTable.tsx |
Adjusted allSelected variable assignment by removing unnecessary whitespace. |
.../popup/import/importProxiedFullScreen/index.tsx |
Modified imports and component structure, added Bread and Title components, dynamic table height calculation. |
.../util/types.ts |
Added genesisHash field to the ProxiedAccounts type. |
sequenceDiagram
participant User
participant UI
participant Hooks
participant API
User->>UI: Navigate to import proxied accounts
UI->>Hooks: Fetch proxied accounts
Hooks->>API: Get proxied accounts with api and formatted parameters
API-->>Hooks: Return proxied accounts with genesisHash
Hooks-->>UI: Provide proxied accounts data
UI-->>User: Display proxied accounts
User->>UI: Switch chain or address
UI->>Hooks: Fetch updated proxied accounts
Hooks->>API: Get updated proxied accounts with new api and formatted parameters
API-->>Hooks: Return updated proxied accounts with genesisHash
Hooks-->>UI: Provide updated proxied accounts data
UI-->>User: Display updated proxied accounts
Objective | Addressed | Explanation |
---|---|---|
Import proxied does not work if you switch chain or address after first try (#1352) | ✅ |
In the code where proxies dwell,
A bug once cast its tricky spell.
We switched the chains, the paths anew,
And now the proxies follow through.
With hashes, heights, and logic keen,
Our import flows like a dream serene.
🐇✨
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?
closes #1352
Summary by CodeRabbit
New Features
Enhancements
genesisHash
for better data accuracy.Bug Fixes