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:
2026-01-08 16:24:19 +03:00
parent e64f846b0d
commit 7a4bbeac25
570 changed files with 3281 additions and 3030 deletions
+8 -8
View File
@@ -4,7 +4,7 @@
import type { ApiPromise } from '@pezkuwi/api';
import type { Bytes, Option, u8, u32 } from '@pezkuwi/types';
import type { BlockNumber, Call, Hash, Scheduled } from '@pezkuwi/types/interfaces';
import type { FrameSupportPreimagesBounded, PalletSchedulerScheduled } from '@pezkuwi/types/lookup';
import type { PezframeSupportPreimagesBounded, PezpalletSchedulerScheduled } from '@pezkuwi/types/lookup';
import type { Codec, ITuple } from '@pezkuwi/types/types';
import type { ScheduledExt } from './types.js';
@@ -21,7 +21,7 @@ interface Props {
}
// included here for backwards compat
interface PalletSchedulerScheduledV3 extends Codec {
interface PezpalletSchedulerScheduledV3 extends Codec {
maybeId: Option<Bytes>;
priority: u8;
call: FrameSupportScheduleMaybeHashed;
@@ -41,7 +41,7 @@ interface FrameSupportScheduleMaybeHashed extends Codec {
}
const OPT_SCHED = {
transform: (entries: [{ args: [BlockNumber] }, Option<Scheduled | PalletSchedulerScheduled | PalletSchedulerScheduledV3>[]][], api: ApiPromise): ScheduledExt[] => {
transform: (entries: [{ args: [BlockNumber] }, Option<Scheduled | PezpalletSchedulerScheduled | PezpalletSchedulerScheduledV3>[]][], api: ApiPromise): ScheduledExt[] => {
return entries
.filter(([, all]) => all.some((o) => o.isSome))
.reduce((items: ScheduledExt[], [key, all]): ScheduledExt[] => {
@@ -52,19 +52,19 @@ const OPT_SCHED = {
.map((o) => o.unwrap())
.reduce((items: ScheduledExt[], { call: callOrEnum, maybeId, maybePeriodic, priority }, index) => {
let call: Call | null = null;
let preimageHash: FrameSupportPreimagesBounded | undefined;
let preimageHash: PezframeSupportPreimagesBounded | undefined;
if ((callOrEnum as unknown as FrameSupportScheduleMaybeHashed).inner) {
if ((callOrEnum as unknown as FrameSupportScheduleMaybeHashed).isValue) {
call = (callOrEnum as unknown as FrameSupportScheduleMaybeHashed).asValue;
} else if ((callOrEnum as unknown as FrameSupportPreimagesBounded).isInline) {
} else if ((callOrEnum as unknown as PezframeSupportPreimagesBounded).isInline) {
try {
call = api.registry.createType('Call', (callOrEnum as unknown as FrameSupportPreimagesBounded).asInline.toHex());
call = api.registry.createType('Call', (callOrEnum as unknown as PezframeSupportPreimagesBounded).asInline.toHex());
} catch (error) {
console.error(error);
}
} else if ((callOrEnum as unknown as FrameSupportPreimagesBounded).isLookup) {
preimageHash = (callOrEnum as unknown as FrameSupportPreimagesBounded);
} else if ((callOrEnum as unknown as PezframeSupportPreimagesBounded).isLookup) {
preimageHash = (callOrEnum as unknown as PezframeSupportPreimagesBounded);
}
} else {
call = callOrEnum as Call;
+2 -2
View File
@@ -3,7 +3,7 @@
import type { Bytes, Option } from '@pezkuwi/types';
import type { BlockNumber, Call, SchedulePeriod, SchedulePriority } from '@pezkuwi/types/interfaces';
import type { FrameSupportPreimagesBounded } from '@pezkuwi/types/lookup';
import type { PezframeSupportPreimagesBounded } from '@pezkuwi/types/lookup';
export interface ScheduledExt {
blockNumber: BlockNumber;
@@ -12,5 +12,5 @@ export interface ScheduledExt {
maybeId: Option<Bytes>;
maybePeriodic: Option<SchedulePeriod>;
priority: SchedulePriority;
preimageHash?: FrameSupportPreimagesBounded;
preimageHash?: PezframeSupportPreimagesBounded;
}