Skip to content

refactor: use resource api and update api path#245

Merged
carlhong merged 6 commits intomasterfrom
feat/carl/resource
Mar 3, 2026
Merged

refactor: use resource api and update api path#245
carlhong merged 6 commits intomasterfrom
feat/carl/resource

Conversation

@carlhong
Copy link
Copy Markdown
Collaborator

@perrornet
Copy link
Copy Markdown
Contributor

perrornet commented Feb 27, 2026

preview environment is ready at https://245-a99a304.multisig-preview.subscan.io

@perrornet
Copy link
Copy Markdown
Contributor

perrornet commented Mar 2, 2026

preview environment is ready at https://245-2d3252a.multisig-preview.subscan.io

@perrornet
Copy link
Copy Markdown
Contributor

perrornet commented Mar 2, 2026

preview environment is ready at https://245-9e07007.multisig-preview.subscan.io

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors Subscan integration to use the newer resource-based count API and updated Subscan base URLs, while adding optional API key support (stored locally) to unlock/enable advanced Subscan-backed features.

Changes:

  • Switch multisig confirmed/cancelled counters to a single “resource count” fetch path (with Subquery fallback).
  • Add an API key configuration modal and persist the key in local storage; attach it as X-API-Key on Subscan requests.
  • Update multiple chain configs from *.webapi.subscan.io to *.api.subscan.io and debounce tab-driven fetching.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/providers/multisig-provider.tsx Uses the new multisig resource-count hook to populate confirmed/cancelled totals.
src/model/storage.ts Extends persisted storage shape with optional subscanApiKey.
src/hooks/subscan.ts Adds useResourceCount Subscan hook hitting /api/scan/resource_count.
src/hooks/combineQuery.ts Adds useMultisigResourceCount to unify Subscan single-call vs Subquery fallback behavior.
src/hooks/AxiosRequest.ts Adds X-API-Key header injection from local storage for Subscan requests.
src/config/chains/people_polkadot.json Updates Subscan base URL to *.api.subscan.io.
src/config/chains/people_paseo.json Updates Subscan base URL to *.api.subscan.io.
src/config/chains/people_kusama.json Updates Subscan base URL to *.api.subscan.io.
src/config/chains/pendulum.json Updates Subscan base URL to *.api.subscan.io.
src/config/chains/hydration.json Updates Subscan base URL to *.api.subscan.io.
src/config/chains/coretime_polkadot.json Updates Subscan base URL to *.api.subscan.io.
src/config/chains/coretime_paseo.json Updates Subscan base URL to *.api.subscan.io.
src/config/chains/coretime_kusama.json Updates Subscan base URL to *.api.subscan.io.
src/config/chains/bifrost.json Updates Subscan base URL to *.api.subscan.io.
src/config/chains/astar.json Updates Subscan base URL to *.api.subscan.io.
src/config/chains/assethub_polkadot.json Updates Subscan base URL to *.api.subscan.io.
src/config/chains/assethub_paseo.json Updates Subscan base URL to *.api.subscan.io.
src/config/chains/assethub_kusama.json Updates Subscan base URL to *.api.subscan.io.
src/components/modals/ApiKeyModal.tsx New modal UI to validate/save/delete a locally-stored Subscan API key.
src/components/ExtrinsicRecords.tsx Debounces tab switching to reduce rapid refetch churn.
src/App.tsx Adds an “Advanced settings” entry point and mounts the API key modal.
public/locales/zh/translation.json Adds zh translations for API key modal UI.
public/locales/en/translation.json Adds en translations for API key modal UI.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

carlhong and others added 2 commits March 2, 2026 16:28
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@perrornet
Copy link
Copy Markdown
Contributor

preview environment is ready at https://245-dceeebd.multisig-preview.subscan.io

@perrornet
Copy link
Copy Markdown
Contributor

preview environment is ready at https://245-6cc221c.multisig-preview.subscan.io

@carlhong carlhong merged commit 599b6a3 into master Mar 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants