mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-04-22 02:07:55 +00:00
feat(mobile): Enable shared/lib imports via symlink for production blockchain integration
- Create symlink mobile/shared -> ../shared for Metro bundler access - Update all @pezkuwi/lib/* imports to use relative paths (../../shared/lib/*) - Dashboard Roles card now fetches real tiki data from blockchain - Staking screen uses production getStakingInfo and getAllScores - All citizenship, referral, and NFT screens use real blockchain queries Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Symlink
+1
@@ -0,0 +1 @@
|
|||||||
|
../shared
|
||||||
@@ -18,8 +18,8 @@ import {
|
|||||||
submitKycApplication,
|
submitKycApplication,
|
||||||
uploadToIPFS,
|
uploadToIPFS,
|
||||||
FOUNDER_ADDRESS,
|
FOUNDER_ADDRESS,
|
||||||
} from '@pezkuwi/lib/citizenship-workflow';
|
} from '../../shared/lib/citizenship-workflow';
|
||||||
import type { Region, MaritalStatus } from '@pezkuwi/lib/citizenship-workflow';
|
import type { Region, MaritalStatus } from '../../shared/lib/citizenship-workflow';
|
||||||
import { KurdistanColors } from '../theme/colors';
|
import { KurdistanColors } from '../theme/colors';
|
||||||
|
|
||||||
// Temporary custom picker component (until we fix @react-native-picker/picker installation)
|
// Temporary custom picker component (until we fix @react-native-picker/picker installation)
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import { useNavigation } from '@react-navigation/native';
|
import { useNavigation } from '@react-navigation/native';
|
||||||
import { usePezkuwi } from '../contexts/PezkuwiContext';
|
import { usePezkuwi } from '../contexts/PezkuwiContext';
|
||||||
import { getCitizenshipStatus } from '@pezkuwi/lib/citizenship-workflow';
|
import { getCitizenshipStatus } from '../../shared/lib/citizenship-workflow';
|
||||||
import { KurdistanColors } from '../theme/colors';
|
import { KurdistanColors } from '../theme/colors';
|
||||||
|
|
||||||
const BeCitizenClaimScreen: React.FC = () => {
|
const BeCitizenClaimScreen: React.FC = () => {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import {
|
|||||||
submitKycApplication,
|
submitKycApplication,
|
||||||
uploadToIPFS,
|
uploadToIPFS,
|
||||||
getCitizenshipStatus,
|
getCitizenshipStatus,
|
||||||
} from '@pezkuwi/lib/citizenship-workflow';
|
} from '../../shared/lib/citizenship-workflow';
|
||||||
import { KurdistanColors } from '../theme/colors';
|
import { KurdistanColors } from '../theme/colors';
|
||||||
|
|
||||||
const BeCitizenScreen: React.FC = () => {
|
const BeCitizenScreen: React.FC = () => {
|
||||||
|
|||||||
@@ -23,9 +23,9 @@ import { useAuth } from '../contexts/AuthContext';
|
|||||||
import { usePezkuwi } from '../contexts/PezkuwiContext';
|
import { usePezkuwi } from '../contexts/PezkuwiContext';
|
||||||
import { supabase } from '../lib/supabase';
|
import { supabase } from '../lib/supabase';
|
||||||
import AvatarPickerModal from '../components/AvatarPickerModal';
|
import AvatarPickerModal from '../components/AvatarPickerModal';
|
||||||
import { fetchUserTikis, getPrimaryRole, getTikiDisplayName, getTikiEmoji, getTikiColor } from '@pezkuwi/lib/tiki';
|
import { fetchUserTikis, getPrimaryRole, getTikiDisplayName, getTikiEmoji, getTikiColor } from '../../shared/lib/tiki';
|
||||||
import { getAllScores, type UserScores } from '@pezkuwi/lib/scores';
|
import { getAllScores, type UserScores } from '../../shared/lib/scores';
|
||||||
import { getKycStatus } from '@pezkuwi/lib/kyc';
|
import { getKycStatus } from '../../shared/lib/kyc';
|
||||||
|
|
||||||
// Existing Quick Action Images (Reused)
|
// Existing Quick Action Images (Reused)
|
||||||
import qaEducation from '../../../shared/images/quick-actions/qa_education.png';
|
import qaEducation from '../../../shared/images/quick-actions/qa_education.png';
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import {
|
|||||||
Badge,
|
Badge,
|
||||||
CardSkeleton,
|
CardSkeleton,
|
||||||
} from '../components';
|
} from '../components';
|
||||||
import { fetchUserTikis, getTikiDisplayName, getTikiEmoji } from '@pezkuwi/lib/tiki';
|
import { fetchUserTikis, getTikiDisplayName, getTikiEmoji } from '../../shared/lib/tiki';
|
||||||
|
|
||||||
const { width } = Dimensions.get('window');
|
const { width } = Dimensions.get('window');
|
||||||
const NFT_SIZE = (width - 48) / 2; // 2 columns with padding
|
const NFT_SIZE = (width - 48) / 2; // 2 columns with padding
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import {
|
|||||||
getMyReferrals,
|
getMyReferrals,
|
||||||
calculateReferralScore,
|
calculateReferralScore,
|
||||||
type ReferralStats as BlockchainReferralStats,
|
type ReferralStats as BlockchainReferralStats,
|
||||||
} from '@pezkuwi/lib/referral';
|
} from '../../shared/lib/referral';
|
||||||
|
|
||||||
interface ReferralStats {
|
interface ReferralStats {
|
||||||
totalReferrals: number;
|
totalReferrals: number;
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ import {
|
|||||||
ValidatorSelectionSheet,
|
ValidatorSelectionSheet,
|
||||||
CardSkeleton,
|
CardSkeleton,
|
||||||
} from '../components';
|
} from '../components';
|
||||||
import { getStakingInfo } from '@pezkuwi/lib/staking';
|
import { getStakingInfo } from '../../shared/lib/staking';
|
||||||
import { getAllScores } from '@pezkuwi/lib/scores';
|
import { getAllScores } from '../../shared/lib/scores';
|
||||||
import { formatBalance } from '@pezkuwi/lib/wallet';
|
import { formatBalance } from '../../shared/lib/wallet';
|
||||||
|
|
||||||
// Helper types derived from shared lib
|
// Helper types derived from shared lib
|
||||||
interface StakingScreenData {
|
interface StakingScreenData {
|
||||||
|
|||||||
Reference in New Issue
Block a user