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
+3 -2
View File
@@ -4,7 +4,7 @@
// Handles citizenship verification, status checks, and workflow logic
import type { ApiPromise } from '@pezkuwi/api';
import { web3FromAddress as web3FromAddressOriginal } from '@pezkuwi/extension-dapp';
import { web3Enable, web3FromAddress as web3FromAddressOriginal } from '@pezkuwi/extension-dapp';
import type { InjectedAccountWithMeta } from '@pezkuwi/extension-inject/types';
import type { Signer } from '@pezkuwi/api/types';
@@ -30,7 +30,8 @@ interface InjectedExtension {
// Use real extension in browser, throw error in unsupported environments
const web3FromAddress = async (address: string): Promise<InjectedExtension> => {
// Check if we're in a browser environment with extension support
if (typeof window !== 'undefined' && (window as any).injectedWeb3) {
if (typeof window !== 'undefined') {
await web3Enable('PezkuwiChain');
return web3FromAddressOriginal(address) as Promise<InjectedExtension>;
}
throw new Error('Pezkuwi Wallet extension not available. Please install the extension.');