mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-07-12 06:25:41 +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:
@@ -9,15 +9,13 @@ import { KurdistanColors } from '../theme/colors';
|
||||
import WelcomeScreen from '../screens/WelcomeScreen';
|
||||
import SignInScreen from '../screens/SignInScreen';
|
||||
import SignUpScreen from '../screens/SignUpScreen';
|
||||
import DashboardScreen from '../screens/DashboardScreen';
|
||||
import SettingsScreen from '../screens/SettingsScreen';
|
||||
import BottomTabNavigator from './BottomTabNavigator';
|
||||
|
||||
export type RootStackParamList = {
|
||||
Welcome: undefined;
|
||||
SignIn: undefined;
|
||||
SignUp: undefined;
|
||||
Dashboard: undefined;
|
||||
Settings: undefined;
|
||||
MainApp: undefined;
|
||||
};
|
||||
|
||||
const Stack = createStackNavigator<RootStackParamList>();
|
||||
@@ -100,27 +98,8 @@ const AppNavigator: React.FC = () => {
|
||||
</Stack.Screen>
|
||||
</>
|
||||
) : (
|
||||
// Show main app if authenticated
|
||||
<>
|
||||
<Stack.Screen name="Dashboard">
|
||||
{(props) => (
|
||||
<DashboardScreen
|
||||
{...props}
|
||||
onNavigateToWallet={() => console.log('Navigate to Wallet')}
|
||||
onNavigateToSettings={() => props.navigation.navigate('Settings')}
|
||||
/>
|
||||
)}
|
||||
</Stack.Screen>
|
||||
<Stack.Screen name="Settings">
|
||||
{(props) => (
|
||||
<SettingsScreen
|
||||
{...props}
|
||||
onBack={() => props.navigation.goBack()}
|
||||
onLogout={handleLogout}
|
||||
/>
|
||||
)}
|
||||
</Stack.Screen>
|
||||
</>
|
||||
// Show main app (bottom tabs) if authenticated
|
||||
<Stack.Screen name="MainApp" component={BottomTabNavigator} />
|
||||
)}
|
||||
</Stack.Navigator>
|
||||
</NavigationContainer>
|
||||
|
||||
Reference in New Issue
Block a user