Fix all shadow deprecation warnings across entire mobile app

- Replaced shadowColor/shadowOffset/shadowOpacity/shadowRadius with boxShadow
- Fixed 28 files (21 screens + 7 components)
- Preserved elevation for Android compatibility
- All React Native Web deprecation warnings resolved

Files fixed:
- All screen components
- All reusable components
- Navigation components
- Modal components
This commit is contained in:
2026-01-14 15:05:10 +03:00
parent 9090e0fc2b
commit 8d30519efc
231 changed files with 30234 additions and 62124 deletions
+101
View File
@@ -0,0 +1,101 @@
/**
* Environment Configuration
*
* Centralized access to environment variables from .env files
* Use .env.development for dev mode, .env.production for production
*/
import Constants from 'expo-constants';
export type Environment = 'development' | 'production' | 'staging';
interface EnvConfig {
// Environment
env: Environment;
isDevelopment: boolean;
isProduction: boolean;
debug: boolean;
// Supabase
supabaseUrl: string;
supabaseAnonKey: string;
// Blockchain
network: string;
wsEndpoint: string;
chainName: string;
tokenSymbol: string;
tokenDecimals: number;
ss58Format: number;
// Feature Flags
enableTestAccounts: boolean;
enableMockData: boolean;
enableDebugMenu: boolean;
skipBiometric: boolean;
// API
apiUrl: string;
explorerUrl: string;
}
// Get value from expo-constants with fallback
function getEnvVar(key: string, defaultValue: string = ''): string {
return Constants.expoConfig?.extra?.[key] || process.env[key] || defaultValue;
}
function getBoolEnvVar(key: string, defaultValue: boolean = false): boolean {
const value = getEnvVar(key, String(defaultValue));
return value === 'true' || value === '1';
}
function getNumberEnvVar(key: string, defaultValue: number = 0): number {
const value = getEnvVar(key, String(defaultValue));
return parseInt(value, 10) || defaultValue;
}
// Parse environment
const envString = getEnvVar('EXPO_PUBLIC_ENV', 'development') as Environment;
export const ENV: EnvConfig = {
// Environment
env: envString,
isDevelopment: envString === 'development',
isProduction: envString === 'production',
debug: getBoolEnvVar('EXPO_PUBLIC_DEBUG', false),
// Supabase
supabaseUrl: getEnvVar('EXPO_PUBLIC_SUPABASE_URL'),
supabaseAnonKey: getEnvVar('EXPO_PUBLIC_SUPABASE_ANON_KEY'),
// Blockchain
network: getEnvVar('EXPO_PUBLIC_NETWORK', 'development'),
wsEndpoint: getEnvVar('EXPO_PUBLIC_WS_ENDPOINT', 'wss://beta-rpc.pezkuwichain.io:19944'),
chainName: getEnvVar('EXPO_PUBLIC_CHAIN_NAME', 'PezkuwiChain'),
tokenSymbol: getEnvVar('EXPO_PUBLIC_CHAIN_TOKEN_SYMBOL', 'HEZ'),
tokenDecimals: getNumberEnvVar('EXPO_PUBLIC_CHAIN_TOKEN_DECIMALS', 12),
ss58Format: getNumberEnvVar('EXPO_PUBLIC_CHAIN_SS58_FORMAT', 42),
// Feature Flags
enableTestAccounts: getBoolEnvVar('EXPO_PUBLIC_ENABLE_TEST_ACCOUNTS', false),
enableMockData: getBoolEnvVar('EXPO_PUBLIC_ENABLE_MOCK_DATA', false),
enableDebugMenu: getBoolEnvVar('EXPO_PUBLIC_ENABLE_DEBUG_MENU', false),
skipBiometric: getBoolEnvVar('EXPO_PUBLIC_SKIP_BIOMETRIC', false),
// API
apiUrl: getEnvVar('EXPO_PUBLIC_API_URL', 'https://api.pezkuwichain.io'),
explorerUrl: getEnvVar('EXPO_PUBLIC_EXPLORER_URL', 'https://explorer.pezkuwichain.io'),
};
// Log environment on startup (dev only)
if (ENV.isDevelopment && ENV.debug) {
console.log('🔧 Environment Config:', {
env: ENV.env,
network: ENV.network,
wsEndpoint: ENV.wsEndpoint,
testAccounts: ENV.enableTestAccounts,
mockData: ENV.enableMockData,
});
}
export default ENV;
+16
View File
@@ -0,0 +1,16 @@
/**
* Configuration Index
*
* Central export point for all configuration
*/
export { ENV, type Environment } from './environment';
export {
TEST_ACCOUNTS,
getTestAccount,
getDefaultTestAccount,
isTestAccountsEnabled,
getTestAccountAddresses,
isTestAccount,
type TestAccount,
} from './testAccounts';
+98
View File
@@ -0,0 +1,98 @@
/**
* Test Accounts for Development
*
* Pre-funded test accounts (Alice, Bob, Charlie) for Zombienet development
* These are well-known test accounts with pre-funded balances
*
* ⚠️ WARNING: NEVER use these in production! Only for dev/testing.
*/
import ENV from './environment';
export interface TestAccount {
name: string;
mnemonic: string;
address: string;
derivationPath?: string;
balance?: string;
description: string;
}
/**
* Standard Substrate test accounts (Alice, Bob, Charlie, etc.)
* These have pre-funded balances in dev chains
*/
export const TEST_ACCOUNTS: TestAccount[] = [
{
name: 'Alice',
mnemonic: 'bottom drive obey lake curtain smoke basket hold race lonely fit walk',
address: '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY', // //Alice
description: 'Primary validator - Pre-funded development account',
balance: '1,000,000 HEZ',
},
{
name: 'Bob',
mnemonic: 'bottom drive obey lake curtain smoke basket hold race lonely fit walk//Bob',
address: '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty', // //Bob
description: 'Secondary validator - Pre-funded development account',
balance: '1,000,000 HEZ',
},
{
name: 'Charlie',
mnemonic: 'bottom drive obey lake curtain smoke basket hold race lonely fit walk//Charlie',
address: '5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y', // //Charlie
description: 'Test user - Pre-funded development account',
balance: '1,000,000 HEZ',
},
{
name: 'Dave',
mnemonic: 'bottom drive obey lake curtain smoke basket hold race lonely fit walk//Dave',
address: '5DAAnrj7VHTznn2AWBemMuyBwZWs6FNFjdyVXUeYum3PTXFy', // //Dave
description: 'Test user - Pre-funded development account',
balance: '1,000,000 HEZ',
},
{
name: 'Eve',
mnemonic: 'bottom drive obey lake curtain smoke basket hold race lonely fit walk//Eve',
address: '5HGjWAeFDfFCWPsjFQdVV2Msvz2XtMktvgocEZcCj68kUMaw', // //Eve
description: 'Test user - Pre-funded development account',
balance: '1,000,000 HEZ',
},
];
/**
* Get test account by name
*/
export function getTestAccount(name: string): TestAccount | undefined {
return TEST_ACCOUNTS.find(acc => acc.name.toLowerCase() === name.toLowerCase());
}
/**
* Check if test accounts are enabled
*/
export function isTestAccountsEnabled(): boolean {
return ENV.enableTestAccounts && ENV.isDevelopment;
}
/**
* Get default test account (Alice)
*/
export function getDefaultTestAccount(): TestAccount {
return TEST_ACCOUNTS[0]; // Alice
}
/**
* Get all test account addresses
*/
export function getTestAccountAddresses(): string[] {
return TEST_ACCOUNTS.map(acc => acc.address);
}
/**
* Check if address is a test account
*/
export function isTestAccount(address: string): boolean {
return getTestAccountAddresses().includes(address);
}
export default TEST_ACCOUNTS;