fix: mobile UI improvements and web3Enable for WalletConnect signing

- Compact stat cards on mobile (Dashboard, Referral, P2P)
- Hide unnecessary sections on mobile (Recent Activity, NFTs, Score Calculation, Liquidity Pools, Recent Swaps)
- Fix back arrow overlapping title on all pages
- Swap Settings and Governance nav positions for better mobile dropdown
- Add back arrow to Presale page
- Add web3Enable before all web3FromAddress calls for WalletConnect compatibility
- Fix citizenship authentication signing with WalletConnect
This commit is contained in:
2026-02-23 06:22:12 +03:00
parent 7107f18ea6
commit bcee7c2a7d
22 changed files with 258 additions and 113 deletions
+4 -1
View File
@@ -1,7 +1,7 @@
import React, { useState, useEffect } from 'react';
import { useTranslation } from 'react-i18next';
import { X, Lock, Unlock, Gift, AlertCircle, Loader2, Info } from 'lucide-react';
import { web3FromAddress } from '@pezkuwi/extension-dapp';
import { web3Enable, web3FromAddress } from '@pezkuwi/extension-dapp';
import { usePezkuwi } from '@/contexts/PezkuwiContext';
import { Button } from '@/components/ui/button';
import { Alert, AlertDescription } from '@/components/ui/alert';
@@ -143,6 +143,7 @@ export const LPStakingModal: React.FC<LPStakingModalProps> = ({ isOpen, onClose
if (!pool) throw new Error('Pool not found');
const amountBN = BigInt(Math.floor(parseFloat(stakeAmount) * 1e12));
await web3Enable('PezkuwiChain');
const injector = await web3FromAddress(selectedAccount.address);
const tx = assetHubApi.tx.assetRewards.stake(selectedPool, amountBN.toString());
@@ -189,6 +190,7 @@ export const LPStakingModal: React.FC<LPStakingModalProps> = ({ isOpen, onClose
if (!pool) throw new Error('Pool not found');
const amountBN = BigInt(Math.floor(parseFloat(unstakeAmount) * 1e12));
await web3Enable('PezkuwiChain');
const injector = await web3FromAddress(selectedAccount.address);
const tx = assetHubApi.tx.assetRewards.unstake(selectedPool, amountBN.toString());
@@ -231,6 +233,7 @@ export const LPStakingModal: React.FC<LPStakingModalProps> = ({ isOpen, onClose
setSuccess(null);
try {
await web3Enable('PezkuwiChain');
const injector = await web3FromAddress(selectedAccount.address);
const tx = assetHubApi.tx.assetRewards.harvestRewards(selectedPool);