mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-05-09 22:27:55 +00:00
Fix frontend: resolve imports, add missing functions, configure Vite properly
This commit is contained in:
@@ -7,8 +7,8 @@ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/com
|
||||
import { Loader2, CheckCircle, AlertTriangle, Shield } from 'lucide-react';
|
||||
import { usePolkadot } from '@/contexts/PolkadotContext';
|
||||
import { verifyNftOwnership } from '@pezkuwi/lib/citizenship-workflow';
|
||||
import { generateAuthChallenge, signChallenge, verifySignature, saveCitizenSession } from '@pezkuwi/lib/citizenship-crypto';
|
||||
import type { AuthChallenge } from '@pezkuwi/lib/citizenship-crypto';
|
||||
import { generateAuthChallenge, signChallenge, verifySignature, saveCitizenSession } from '@pezkuwi/lib/citizenship-workflow';
|
||||
import type { AuthChallenge } from '@pezkuwi/lib/citizenship-workflow';
|
||||
|
||||
interface ExistingCitizenAuthProps {
|
||||
onClose: () => void;
|
||||
|
||||
@@ -12,7 +12,7 @@ import { Loader2, AlertTriangle, CheckCircle, User, Users as UsersIcon, MapPin,
|
||||
import { usePolkadot } from '@/contexts/PolkadotContext';
|
||||
import type { CitizenshipData, Region, MaritalStatus } from '@pezkuwi/lib/citizenship-workflow';
|
||||
import { FOUNDER_ADDRESS, submitKycApplication, subscribeToKycApproval, getKycStatus } from '@pezkuwi/lib/citizenship-workflow';
|
||||
import { generateCommitmentHash, generateNullifierHash, encryptData, saveLocalCitizenshipData, uploadToIPFS } from '@pezkuwi/lib/citizenship-crypto';
|
||||
import { generateCommitmentHash, generateNullifierHash, encryptData, saveLocalCitizenshipData, uploadToIPFS } from '@pezkuwi/lib/citizenship-workflow';
|
||||
|
||||
interface NewCitizenApplicationProps {
|
||||
onClose: () => void;
|
||||
|
||||
@@ -8,7 +8,7 @@ import { Card, CardContent, CardHeader, CardTitle } from '../ui/card';
|
||||
import { Badge } from '../ui/badge';
|
||||
import { Progress } from '../ui/progress';
|
||||
import { usePolkadot } from '../../contexts/PolkadotContext';
|
||||
import { formatBalance } from '../@pezkuwi/lib/wallet';
|
||||
import { formatBalance } from '@pezkuwi/lib/wallet';
|
||||
|
||||
interface GovernanceStats {
|
||||
activeProposals: number;
|
||||
|
||||
@@ -7,6 +7,8 @@ import './i18n/config'
|
||||
declare global {
|
||||
interface Window {
|
||||
ethereum?: any;
|
||||
Buffer: any;
|
||||
global: any;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+10
-3
@@ -19,6 +19,10 @@ export default defineConfig(({ mode }) => ({
|
||||
plugins: [
|
||||
react()
|
||||
].filter(Boolean),
|
||||
define: {
|
||||
'global': 'globalThis',
|
||||
'process.env': {}
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": path.resolve(__dirname, "./src"),
|
||||
@@ -27,11 +31,14 @@ export default defineConfig(({ mode }) => ({
|
||||
"@pezkuwi/utils": path.resolve(__dirname, "../shared/utils"),
|
||||
"@pezkuwi/theme": path.resolve(__dirname, "../shared/theme"),
|
||||
"@pezkuwi/types": path.resolve(__dirname, "../shared/types"),
|
||||
'buffer': 'buffer/',
|
||||
},
|
||||
},
|
||||
json: {
|
||||
stringify: true,
|
||||
optimizeDeps: {
|
||||
esbuildOptions: {
|
||||
define: {
|
||||
global: 'globalThis'
|
||||
}
|
||||
}
|
||||
},
|
||||
assetsInclude: ['**/*.json'],
|
||||
}));
|
||||
Reference in New Issue
Block a user