The path is an array of tuples [[assetId, amount], [assetId, amount]],
not an array of objects. Fixed to access asset ID at index 0 of each tuple.
Previous code was trying to access object properties (nativeOrAsset.asset)
which don't exist on arrays, causing all swaps to default to HEZ→HEZ.
The SwapExecuted event has 5 fields (who, send_to, amountIn, amountOut, path),
not 4. The old code was missing send_to, which caused the path (asset array)
to be assigned the recipient address instead, resulting in all swaps showing
as HEZ→HEZ regardless of actual token pairs.
This fixes the swap history display to show correct token symbols.
- Fixed path array parsing for SwapExecuted events
- Handle different Polkadot.js enum formats (nativeOrAsset vs NativeOrAsset)
- Added toJSON() conversion for proper array parsing
- Now correctly shows HEZ↔PEZ swaps instead of HEZ→HEZ
- Applied fix to both initial history load and post-swap refresh
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added DKstate.png to public folder (719KB PNG)
- Replaced Kurdish Flag CDN image with local DKstate background
- Updated alt text to "DKstate Background"
- Maintained gradient overlay styling
Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added PezkuwiChain logo to public folder (179KB PNG)
- Replaced CDN image with local logo in RewardDistribution component
- Updated alt text to "PezkuwiChain Logo"
Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fetch trust score from blockchain via api.query.trust.trustScores
- Display trust score in AccountBalance component (Account Info card)
- Show between Address and Source fields with Award icon
- Use purple-cyan gradient styling for visual consistency
Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Added comprehensive console logs to debug trust score fetching:
- API readiness check
- Account availability check
- Query execution log
- Detailed error logging with stack trace
This will help identify the exact point of failure.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Changed from `trustScoreOf` to `trustScores` to match the actual
storage item name in pallet_trust. Polkadot.js API uses storage names,
not getter function names.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fetch trust score from pallet_trust via API
- Display score in WalletModal with Award icon
- Shows user's current trust score from blockchain
- Gradient styling (purple to cyan) for visual appeal
- Fallback to '-' when API not ready or score unavailable
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fetch total staked tokens from pallet_staking.erasTotalStake()
- Count unique voters from pallet_conviction_voting.votingFor.keys()
- Display real-time data instead of hardcoded values
- Shows '-' when data is unavailable (e.g. no current era)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Updated HeroSection to fetch real governance data:
- Active Proposals from pallet_referenda (was hardcoded to 127)
- Replaced all hardcoded stats with dynamic blockchain queries
- Shows "-" for unavailable data (totalVoters, tokensStaked, trustScore)
- Real-time updates using PolkadotContext API
Now homepage shows actual on-chain referendum count instead of mock data.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Connected governance overview to actual blockchain data:
- Active proposals from pallet_referenda
- Treasury balance from treasury account
- Parliament (Council) members from pallet_collective
- Real-time data fetching using PolkadotContext API
- Replaced mock data with live blockchain queries
Todo: Add total voters and participation rate calculation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Added Pezkuwi whitepaper PDF to repository and updated navigation:
- Added public/Whitepaper.pdf (738KB)
- Updated Docs links to download whitepaper from GitHub
- Both header and footer navigation now link to GitHub raw PDF
- Users can download whitepaper by clicking Docs
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Added animated Kurdistan-themed loading indicator that displays during swap transactions:
- KurdistanSun component with 21 rays (Kurdistan flag symbolism)
- White center sun with glow effects
- Rotating colored halos: green (outer), red (middle), yellow (inner)
- Full-screen overlay with backdrop blur during processing
- Fixed timing: dialog closes before animation shows
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fixed white/light text on white/light backgrounds across multiple pages by adding text-gray-900 classes to ensure proper contrast and readability. This addresses the issue where text was unreadable until hover/click on delegation, proposal, swap, and other pages.
Changes:
- DelegationManager: Added dark text to green-50 TabsList
- DelegateProfile: Fixed text color in blue-50 and green-50 Alert components
- ProposalWizard: Added dark text to green-50 success Alert
- Dashboard: Fixed text color in yellow-50 verification warning
- TokenSwap: Added dark text to all gray-50 and blue-50 containers (6 instances)
- DiscussionThread: Fixed markdown help card with gray-50 background
- FundingProposal: Added dark text to yellow-50 milestone warning
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
New Components:
- AccountBalance: Real-time balance display with free/reserved breakdown
- TransferModal: Token transfer interface with transaction signing
- WalletDashboard: Complete wallet management page
Features:
- Live balance fetching from blockchain
- Balance subscription for real-time updates
- Transfer modal with recipient and amount input
- Transaction signing via Polkadot.js extension
- Transaction status tracking (signing, pending, success, error)
- Account switching support
- Responsive dashboard layout
- Quick action buttons (Send, Receive, History)
Technical:
- Integration with PolkadotContext
- web3FromAddress for transaction signing
- signAndSend for blockchain transactions
- Balance conversion (plancks to tokens)
- Error handling and user feedback
- Toast notifications for transaction status
Navigation:
- Added /wallet route with ProtectedRoute
- Added Wallet link to navigation menu
Major Changes:
- Added @polkadot/api and related dependencies
- Created PolkadotContext for blockchain connection
- Implemented NetworkStats component with live data
- Added PolkadotWalletButton for wallet integration
- Connected to local validator node (ws://127.0.0.1:9944)
Features:
- Live block number and hash display
- Real-time validator count
- Network connection status monitoring
- Polkadot.js extension integration
- Multi-account support
- Account switching capability
Technical:
- RPC endpoint: ws://127.0.0.1:9944
- Auto-reconnect on disconnect
- TypeScript integration
- React hooks for state management