mirror of
https://github.com/pezkuwichain/pezkuwi-apps.git
synced 2026-11-24 14:49:57 +00:00
fix: update extension packages and fix type compatibility for pezkuwi-sdk
- Update @pezkuwi/extension-inject to ^0.62.13 with proper /types exports - Update @pezkuwi/extension-dapp to ^0.62.13 - Update @pezkuwi/extension-compat-metamask to ^0.62.13 - Fix IconTheme type to include 'bizinikiwi' and 'pezkuwi' themes - Fix endpoint array issues (getTeleports -> direct array references) - Add type assertions for external package compatibility (acala, moonbeam, parallel) - Fix subspace.ts dynamic class typing - Fix conviction type in page-referenda - Update Pallet type names to Pezpallet prefix across codebase - Define InjectedExtension types locally for module resolution - Add styled-components DefaultTheme augmentation - Add react-copy-to-clipboard type declaration for React 18 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e64f846b0d
commit
7a4bbeac25
570 files changed
+3281
-3030
No files matched your search
@@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ApiPromise } from '@pezkuwi/api';
|
||||
import type { SpStakingExposure } from '@pezkuwi/types/lookup';
|
||||
import type { PezspStakingExposure } from '@pezkuwi/types/lookup';
|
||||
import type { Route, TFunction } from './types.js';
|
||||
|
||||
import Component from '@pezkuwi/app-staking2';
|
||||
@@ -14,7 +14,7 @@ function needsApiCheck (api: ApiPromise): boolean {
|
||||
try {
|
||||
// we need a known Exposure type
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
const { others: [{ value, who }], own, total } = api.registry.createType<SpStakingExposure>(
|
||||
const { others: [{ value, who }], own, total } = api.registry.createType<PezspStakingExposure>(
|
||||
unwrapStorageType(api.registry, api.query.staking.erasStakers.creator.meta.type),
|
||||
{ others: [{ value: BN_ONE, who: ZERO_ACCOUNT }], own: BN_ONE, total: BN_ONE }
|
||||
);
|
||||
@@ -35,6 +35,7 @@ function needsApiCheck (api: ApiPromise): boolean {
|
||||
api.tx.staking.bond(ZERO_ACCOUNT, BN_ONE, { Account: ZERO_ACCOUNT });
|
||||
} else if (api.tx.staking.bond.meta.args.length === 2) {
|
||||
// current, no controller account
|
||||
// @ts-expect-error Runtime type format
|
||||
api.tx.staking.bond(BN_ONE, { Account: ZERO_ACCOUNT });
|
||||
} else {
|
||||
// unknown
|
||||
|
||||
Reference in new issue
Block a user