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:
Kurdistan Tech MinistryandClaude Opus 4.5 committed 2026-01-08 16:24:19 +03:00
1 parent e64f846b0d
commit 7a4bbeac25
570 files changed
+3281 -3030

No files matched your search

+5 -5
View File
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
import type { AccountId, Balance, BlockNumber, OpenTipTo225 } from '@pezkuwi/types/interfaces';
import type { PalletTipsOpenTip } from '@pezkuwi/types/lookup';
import type { PezpalletTipsOpenTip } from '@pezkuwi/types/lookup';
import type { BN } from '@pezkuwi/util';
import React, { useCallback, useEffect, useMemo, useState } from 'react';
@@ -25,7 +25,7 @@ interface Props {
members: string[];
onSelect: (hash: string, isSelected: boolean, value: BN) => void;
onlyUntipped: boolean;
tip: PalletTipsOpenTip | OpenTipTo225;
tip: PezpalletTipsOpenTip | OpenTipTo225;
}
interface TipState {
@@ -38,11 +38,11 @@ interface TipState {
median: BN;
}
function isCurrentTip (tip: PalletTipsOpenTip | OpenTipTo225): tip is PalletTipsOpenTip {
return !!(tip as PalletTipsOpenTip)?.findersFee;
function isCurrentTip (tip: PezpalletTipsOpenTip | OpenTipTo225): tip is PezpalletTipsOpenTip {
return !!(tip as PezpalletTipsOpenTip)?.findersFee;
}
function extractTipState (tip: PalletTipsOpenTip | OpenTipTo225, allAccounts: string[]): TipState {
function extractTipState (tip: PezpalletTipsOpenTip | OpenTipTo225, allAccounts: string[]): TipState {
const closesAt = tip.closes.unwrapOr(null);
let finder: AccountId | null = null;
let deposit: Balance | null = null;
+6 -6
View File
@@ -3,7 +3,7 @@
import type { Option } from '@pezkuwi/types';
import type { OpenTipTo225 } from '@pezkuwi/types/interfaces';
import type { PalletTipsOpenTip } from '@pezkuwi/types/lookup';
import type { PezpalletTipsOpenTip } from '@pezkuwi/types/lookup';
import type { BN } from '@pezkuwi/util';
import React, { useMemo, useRef, useState } from 'react';
@@ -23,11 +23,11 @@ interface Props {
onSelectTip: (hash: string, isSelected: boolean, value: BN) => void,
}
type TipType = [string, PalletTipsOpenTip | OpenTipTo225];
type TipType = [string, PezpalletTipsOpenTip | OpenTipTo225];
const TIP_OPTS = { withParams: true };
function extractTips (tipsWithHashes?: [[string[]], Option<PalletTipsOpenTip>[]], inHashes?: string[] | null): TipType[] | undefined {
function extractTips (tipsWithHashes?: [[string[]], Option<PezpalletTipsOpenTip>[]], inHashes?: string[] | null): TipType[] | undefined {
if (!tipsWithHashes || !inHashes) {
return undefined;
}
@@ -35,8 +35,8 @@ function extractTips (tipsWithHashes?: [[string[]], Option<PalletTipsOpenTip>[]]
const [[hashes], optTips] = tipsWithHashes;
return optTips
.map((opt, index): [string, PalletTipsOpenTip | null] => [hashes[index], opt.unwrapOr(null)])
.filter((val): val is [string, PalletTipsOpenTip] => inHashes.includes(val[0]) && !!val[1])
.map((opt, index): [string, PezpalletTipsOpenTip | null] => [hashes[index], opt.unwrapOr(null)])
.filter((val): val is [string, PezpalletTipsOpenTip] => inHashes.includes(val[0]) && !!val[1])
.sort((a, b) =>
a[1].closes.isNone
? b[1].closes.isNone
@@ -53,7 +53,7 @@ function Tips ({ className = '', defaultId, hashes, isMember, members, onSelectT
const { api } = useApi();
const [onlyUntipped, setOnlyUntipped] = useState(false);
const bestNumber = useBestNumber();
const tipsWithHashes = useCall<[[string[]], Option<PalletTipsOpenTip>[]]>(hashes && (api.query.tips || api.query.treasury).tips.multi, [hashes], TIP_OPTS);
const tipsWithHashes = useCall<[[string[]], Option<PezpalletTipsOpenTip>[]]>(hashes && (api.query.tips || api.query.treasury).tips.multi, [hashes], TIP_OPTS);
const tips = useMemo(
() => extractTips(tipsWithHashes, hashes),