mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-06-14 02:11:00 +00:00
Integrate Polkadot.js blockchain with mobile wallet (FAZ 1)
This commit implements the complete blockchain integration for the mobile app's wallet functionality: **Polkadot.js Integration:** - Created PolkadotContext for mobile with full blockchain connectivity - Implemented wallet creation with mnemonic seed phrases - Added secure key management with AsyncStorage - Connected to Pezkuwi testnet (wss://beta-rpc.pezkuwi.art) **WalletScreen Enhancements:** - Live blockchain balance fetching for HEZ (native token) - Live balance fetching for PEZ and wUSDT (assets) - Real-time balance updates every 30 seconds - Actual send transactions using api.tx.balances.transfer (HEZ) - Actual send transactions using api.tx.assets.transfer (PEZ, wUSDT) - Transaction signing with user's keypair - Loading states and error handling - Wallet creation flow for new users - Connect/disconnect wallet functionality **Bottom Navigation:** - Created BottomTabNavigator with 5 tabs - Added WalletScreen with live blockchain integration - Added BeCitizenScreen (citizenship application) - Added ReferralScreen (referral program) - Renamed SettingsScreen to ProfileScreen - Custom center button for "Be Citizen" feature **App Structure:** - Wrapped app with PolkadotProvider in App.tsx - Updated AppNavigator to use BottomTabNavigator - Integrated language selection flow with blockchain features All wallet features now use live blockchain data instead of mock data.
This commit is contained in:
+7
-4
@@ -3,6 +3,7 @@ import { View, ActivityIndicator, StyleSheet } from 'react-native';
|
||||
import { StatusBar } from 'expo-status-bar';
|
||||
import { initializeI18n } from './src/i18n';
|
||||
import { LanguageProvider } from './src/contexts/LanguageContext';
|
||||
import { PolkadotProvider } from './src/contexts/PolkadotContext';
|
||||
import AppNavigator from './src/navigation/AppNavigator';
|
||||
import { KurdistanColors } from './src/theme/colors';
|
||||
|
||||
@@ -34,10 +35,12 @@ export default function App() {
|
||||
}
|
||||
|
||||
return (
|
||||
<LanguageProvider>
|
||||
<StatusBar style="auto" />
|
||||
<AppNavigator />
|
||||
</LanguageProvider>
|
||||
<PolkadotProvider>
|
||||
<LanguageProvider>
|
||||
<StatusBar style="auto" />
|
||||
<AppNavigator />
|
||||
</LanguageProvider>
|
||||
</PolkadotProvider>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user