fix: resolve all lint errors for CI/CD workflow

- Remove unused supabase import from AppLayout.tsx
- Replace any types with proper type assertions in XCMTeleportModal.tsx
- Remove unused events parameter from signAndSend callback
- Fix any types in PezkuwiContext.tsx debug code
- Escape apostrophe in EmailVerification.tsx
- Remove unused ArrowDownRight import from AccountBalance.tsx
This commit is contained in:
2026-02-04 12:00:48 +03:00
parent 02094a3635
commit 76e99689e5
5 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
import React, { useEffect, useState } from 'react';
import { usePezkuwi } from '@/contexts/PezkuwiContext';
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
import { Wallet, TrendingUp, ArrowDownRight, RefreshCw, Award, Plus, Coins, Send, Shield, Users, Fuel } from 'lucide-react';
import { Wallet, TrendingUp, RefreshCw, Award, Plus, Coins, Send, Shield, Users, Fuel } from 'lucide-react';
import { Button } from '@/components/ui/button';
import { ASSET_IDS, getAssetSymbol } from '@pezkuwi/lib/wallet';
import { AddTokenModal } from './AddTokenModal';
-1
View File
@@ -27,7 +27,6 @@ import { useWebSocket } from '@/contexts/WebSocketContext';
import { StakingDashboard } from './staking/StakingDashboard';
import { MultiSigWallet } from './wallet/MultiSigWallet';
import { useWallet } from '@/contexts/WalletContext';
import { supabase } from '@/lib/supabase';
import { PezkuwiWalletButton } from './PezkuwiWalletButton';
import { DEXDashboard } from './dex/DEXDashboard';
import { P2PDashboard } from './p2p/P2PDashboard';
+7 -7
View File
@@ -75,8 +75,8 @@ export const XCMTeleportModal: React.FC<XCMTeleportModalProps> = ({ isOpen, onCl
// Relay chain balance
if (api && isApiReady) {
try {
const accountInfo = await api.query.system.account(selectedAccount.address);
const free = (accountInfo as any).data.free.toString();
const accountInfo = await api.query.system.account(selectedAccount.address) as { data: { free: { toString(): string } } };
const free = accountInfo.data.free.toString();
const balanceNum = Number(free) / 1e12;
setRelayBalance(balanceNum.toFixed(4));
} catch (err) {
@@ -87,8 +87,8 @@ export const XCMTeleportModal: React.FC<XCMTeleportModalProps> = ({ isOpen, onCl
// Asset Hub balance
if (assetHubApi && isAssetHubReady) {
try {
const accountInfo = await assetHubApi.query.system.account(selectedAccount.address);
const free = (accountInfo as any).data.free.toString();
const accountInfo = await assetHubApi.query.system.account(selectedAccount.address) as { data: { free: { toString(): string } } };
const free = accountInfo.data.free.toString();
const balanceNum = Number(free) / 1e12;
setAssetHubBalance(balanceNum.toFixed(4));
} catch (err) {
@@ -99,8 +99,8 @@ export const XCMTeleportModal: React.FC<XCMTeleportModalProps> = ({ isOpen, onCl
// People chain balance
if (peopleApi && isPeopleReady) {
try {
const accountInfo = await peopleApi.query.system.account(selectedAccount.address);
const free = (accountInfo as any).data.free.toString();
const accountInfo = await peopleApi.query.system.account(selectedAccount.address) as { data: { free: { toString(): string } } };
const free = accountInfo.data.free.toString();
const balanceNum = Number(free) / 1e12;
setPeopleBalance(balanceNum.toFixed(4));
} catch (err) {
@@ -228,7 +228,7 @@ export const XCMTeleportModal: React.FC<XCMTeleportModalProps> = ({ isOpen, onCl
const unsub = await tx.signAndSend(
selectedAccount.address,
{ signer: injector.signer },
({ status, events, dispatchError }) => {
({ status, dispatchError }) => {
if (status.isInBlock) {
if (import.meta.env.DEV) console.log(`XCM Teleport in block: ${status.asInBlock}`);
setTxHash(status.asInBlock.toHex());
+3 -2
View File
@@ -114,9 +114,10 @@ export const PezkuwiProvider: React.FC<PezkuwiProviderProps> = ({
// Debug: Check Junction type definition
try {
const junctionType = apiInstance.createType('XcmV3Junction');
console.log('🔍 XCM Junction type keys:', (junctionType as any).defKeys || Object.keys(junctionType.toJSON() || {}));
const junctionObj = junctionType as unknown as { defKeys?: string[] };
console.log('🔍 XCM Junction type keys:', junctionObj.defKeys || Object.keys(junctionType.toJSON() || {}));
// Expose api for console debugging
(window as any).__PEZKUWI_API__ = apiInstance;
(window as unknown as { __PEZKUWI_API__: typeof apiInstance }).__PEZKUWI_API__ = apiInstance;
console.log('💡 API exposed as window.__PEZKUWI_API__ for debugging');
} catch (e) {
console.log('⚠️ Could not check Junction type:', e);
+1 -1
View File
@@ -101,7 +101,7 @@ export default function EmailVerification() {
<div className="bg-gray-800/50 rounded-lg p-4 text-left space-y-2">
<p className="text-sm text-gray-300">Please check your email and click the verification link to activate your account.</p>
<p className="text-xs text-gray-500">If you don't see the email, check your spam folder.</p>
<p className="text-xs text-gray-500">If you don&apos;t see the email, check your spam folder.</p>
</div>
{error && (