mirror of
https://github.com/pezkuwichain/pezkuwi-apps.git
synced 2026-06-18 15:21:07 +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:
@@ -6,7 +6,7 @@ import type { SubmittableExtrinsic } from '@pezkuwi/api/types';
|
||||
import type { QueueTx } from '@pezkuwi/react-components/Status/types';
|
||||
import type { Option, Vec } from '@pezkuwi/types';
|
||||
import type { AccountId, BalanceOf, Call, Multisig } from '@pezkuwi/types/interfaces';
|
||||
import type { KitchensinkRuntimeProxyType, PalletProxyProxyDefinition } from '@pezkuwi/types/lookup';
|
||||
import type { KitchensinkRuntimeProxyType, PezpalletProxyProxyDefinition } from '@pezkuwi/types/lookup';
|
||||
import type { ITuple } from '@pezkuwi/types/types';
|
||||
import type { BN } from '@pezkuwi/util';
|
||||
import type { AddressFlags, AddressProxy } from './types.js';
|
||||
@@ -176,9 +176,9 @@ async function queryForMultisig (api: ApiPromise, requestAddress: string | null,
|
||||
async function queryForProxy (api: ApiPromise, allAccounts: string[], address: string | null, tx: SubmittableExtrinsic<'promise'>): Promise<ProxyState | null> {
|
||||
if (isFunction(api.query.proxy?.proxies)) {
|
||||
const { isProxied } = extractExternal(address);
|
||||
const [_proxies] = await api.query.proxy.proxies<ITuple<[Vec<ITuple<[AccountId, KitchensinkRuntimeProxyType]> | PalletProxyProxyDefinition>, BalanceOf]>>(address);
|
||||
const [_proxies] = await api.query.proxy.proxies<ITuple<[Vec<ITuple<[AccountId, KitchensinkRuntimeProxyType]> | PezpalletProxyProxyDefinition>, BalanceOf]>>(address);
|
||||
const proxies = api.tx.proxy.addProxy.meta.args.length === 3
|
||||
? (_proxies as PalletProxyProxyDefinition[]).map(({ delay, delegate, proxyType }): [string, BN, KitchensinkRuntimeProxyType] => [delegate.toString(), delay, proxyType])
|
||||
? (_proxies as PezpalletProxyProxyDefinition[]).map(({ delay, delegate, proxyType }): [string, BN, KitchensinkRuntimeProxyType] => [delegate.toString(), delay, proxyType])
|
||||
: (_proxies as [AccountId, KitchensinkRuntimeProxyType][]).map(([delegate, proxyType]): [string, BN, KitchensinkRuntimeProxyType] => [delegate.toString(), BN_ZERO, proxyType]);
|
||||
const proxiesFilter = filterProxies(allAccounts, tx, proxies);
|
||||
|
||||
|
||||
@@ -41,12 +41,13 @@ function PaymentInfo ({ accountId, className = '', extrinsic, isHeader, signerOp
|
||||
const info = await extrinsic.paymentInfo(accountId, signerOptions);
|
||||
|
||||
if (signerOptions?.assetId) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const convertedFee = new BN((await api.call.assetConversionApi.quotePriceTokensForExactTokens(
|
||||
signerOptions?.assetId as string,
|
||||
signerOptions?.assetId as any,
|
||||
{
|
||||
interior: 'Here',
|
||||
parents: 1
|
||||
} as unknown as string,
|
||||
} as any,
|
||||
info.partialFee,
|
||||
true
|
||||
)).toString());
|
||||
|
||||
Reference in New Issue
Block a user