mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-04-24 06:17:54 +00:00
refactor(mobile): Remove i18n, expand core screens, update plan
BREAKING: Removed multi-language support (i18n) - will be re-added later Changes: - Removed i18n system (6 language files, LanguageContext) - Expanded WalletScreen, SettingsScreen, SwapScreen with more features - Added KurdistanSun component, HEZ/PEZ token icons - Added EditProfileScreen, WalletSetupScreen - Added button e2e tests (Profile, Settings, Wallet) - Updated plan: honest assessment - 42 nav buttons with mock data - Fixed terminology: Polkadot→Pezkuwi, Substrate→Bizinikiwi Reality check: UI complete with mock data, converting to production one-by-one
This commit is contained in:
@@ -22,7 +22,7 @@ const mockUser: User = {
|
||||
created_at: new Date().toISOString(),
|
||||
};
|
||||
|
||||
const mockAuthContext: AuthContextType = {
|
||||
export const mockAuthContext: AuthContextType = {
|
||||
user: mockUser,
|
||||
session: null,
|
||||
loading: false,
|
||||
|
||||
@@ -7,20 +7,36 @@ interface BiometricAuthContextType {
|
||||
isBiometricAvailable: boolean;
|
||||
biometricType: 'fingerprint' | 'facial' | 'iris' | 'none';
|
||||
isBiometricEnabled: boolean;
|
||||
isLocked: boolean;
|
||||
autoLockTimer: number;
|
||||
authenticate: () => Promise<boolean>;
|
||||
enableBiometric: () => Promise<boolean>;
|
||||
disableBiometric: () => Promise<void>;
|
||||
setPinCode: (pin: string) => Promise<void>;
|
||||
verifyPinCode: (pin: string) => Promise<boolean>;
|
||||
setAutoLockTimer: (minutes: number) => Promise<void>;
|
||||
lock: () => void;
|
||||
unlock: () => void;
|
||||
checkAutoLock: () => Promise<void>;
|
||||
}
|
||||
|
||||
const mockBiometricContext: BiometricAuthContextType = {
|
||||
export const mockBiometricContext: BiometricAuthContextType = {
|
||||
isBiometricSupported: true,
|
||||
isBiometricEnrolled: true,
|
||||
isBiometricAvailable: true,
|
||||
biometricType: 'fingerprint',
|
||||
isBiometricEnabled: false,
|
||||
isLocked: false,
|
||||
autoLockTimer: 5,
|
||||
authenticate: jest.fn().mockResolvedValue(true),
|
||||
enableBiometric: jest.fn().mockResolvedValue(true),
|
||||
disableBiometric: jest.fn().mockResolvedValue(undefined),
|
||||
setPinCode: jest.fn().mockResolvedValue(undefined),
|
||||
verifyPinCode: jest.fn().mockResolvedValue(true),
|
||||
setAutoLockTimer: jest.fn().mockResolvedValue(undefined),
|
||||
lock: jest.fn(),
|
||||
unlock: jest.fn(),
|
||||
checkAutoLock: jest.fn().mockResolvedValue(undefined),
|
||||
};
|
||||
|
||||
const BiometricAuthContext = createContext<BiometricAuthContextType>(mockBiometricContext);
|
||||
|
||||
@@ -19,7 +19,7 @@ interface ThemeContextType {
|
||||
fontScale: number;
|
||||
}
|
||||
|
||||
const mockThemeContext: ThemeContextType = {
|
||||
export const mockThemeContext: ThemeContextType = {
|
||||
isDarkMode: false,
|
||||
toggleDarkMode: jest.fn().mockResolvedValue(undefined),
|
||||
colors: LightColors,
|
||||
|
||||
Reference in New Issue
Block a user