Commit Graph

32 Commits

Author SHA1 Message Date
pezkuwichain e0cd1f5def fix: Bridge cards use AssetIconProvider and displayNameWithAssetStandard
The redesigned Bridge cards resolved asset icons via the chain-icon
helper (asset.icon.asIconOrFallback()), which treats the value as a
ready-to-load URL. Chain.Asset.icon is frequently a bare filename
resolved through AssetIconProvider's base-URL/color-mode logic, so
any asset relying on that path rendered a blank icon (Polkadot Asset
Hub's USDT, and the DOT/HEZ utility assets on the affected side).
Switched to assetIconProvider.getAssetIconOrFallback(asset), the same
path every other asset row in the app uses.

Also switched the card subtitle from chain.name to
chain.displayNameWithAssetStandard(), so Pezkuwi Asset Hub shows its
PEZ-20 token-standard label, matching Send/Receive/the balance list.
2026-07-13 11:43:03 -07:00
pezkuwichain 3b5e15457d fix: remove unused Chain import flagged by ktlint
The type is only used via inference (chainRegistry.getChain() return),
never referenced explicitly.
2026-07-13 09:33:29 -07:00
pezkuwichain 398f2fc996 Redesign Bridge screen UI to match Swap's modern card layout
Replaces the segmented pair/direction buttons and plain-text amount
sections with token-icon cards (BridgeAssetInputView), a one-tap flip
button, and a bottom-sheet pair picker (BridgePairListBottomSheet).
BridgeViewModel gains only additive presentation data (fromCard/toCard/
pairOptions, derived from the existing pair/direction state and the
same chainId/assetId mapping swapClicked() already used) - all bridge
business logic (rate, fee, minimum, liquidity warnings, submission)
is unchanged.
2026-07-13 09:28:30 -07:00
pezkuwichain cf02896a58 fix: apply the chain/asset-standard label to the main balance list too
The Send/Receive/etc. network picker (NetworkFlowViewModel) already showed
"Ethereum (ERC-20)"/"Tron (TRC-20)" for a multi-chain token's per-chain rows,
but the main Assets dashboard's own expandable per-token breakdown (tap a
token like USDT to see every chain it exists on) is a completely separate
code path (TokenAssetMappers/TokenAssetViewHolder) that still showed a bare
chain name - found via a real device screenshot of that specific screen.

Moved the shared display-name-with-label logic to a public extension
(Chain.displayNameWithAssetStandard(), runtime/ext/ChainExt.kt) so both
screens build the exact same string instead of duplicating (and now
diverging) the same logic twice.
2026-07-11 14:07:59 -07:00
pezkuwichain e055e1a84c feat: order and label per-chain token breakdown by ecosystem + standard
The per-chain list shown when picking an action (Send/Receive/Swap/Buy/Sell/
Gift) for a token that exists on multiple chains (e.g. USDT) now orders
Ethereum and Tron right after the existing Pezkuwi/Polkadot/Kusama priority
chains instead of falling into the alphabetical "everything else" bucket,
and appends a token-standard label - "(PEZ-20)"/"(ERC-20)"/"(TRC-20)" - to
disambiguate which issuance this is, since a bare chain name alone doesn't
convey that.

The label is intentionally chain-specific, not derived from Chain.Asset.Type,
since every Statemine-type chain (Polkadot AH, Kusama AH, Pezkuwi AH) shares
the same asset type but only Pezkuwi AH's issuance needs the PEZ-20 label.
2026-07-11 06:44:35 -07:00
pezkuwichain 7f071f4821 debug: log Tron chain arrival + gate evaluation in BalancesUpdateSystem
TRX is completely absent from the Assets list even for a brand-new
wallet on a completely fresh install - ruled out per-account backfill
(fresh wallet correctly derives tronAddress) and stale per-device chain
state (fresh install, no carried-over connectionState). Need to see
empirically whether the Tron chain even reaches currentChains at all,
and if so, which of hasAccountIn/connectionState.isDisabled gates it.
2026-07-10 17:25:31 -07:00
pezkuwichain c5174d0ccf fix: NativeAssetBalance uses typed subscribe DSL, not raw key subscription
Root cause found via 4 rounds of CI diagnostics: HEZ (native asset) on
Pezkuwi Asset Hub was correctly present+enabled in the Chain domain model,
correctly dispatched to NativeAssetBalance, and its System.Account storage
key was correctly computed - but the raw subscriptionBuilder.subscribe(key)
call never actually reached the RPC connection, with zero exceptions and
zero data, while the chain's 5 other assets (all statemine-type, all using
the same SharedRequestsBuilder) synced fine. The same NativeAssetBalance
code worked correctly for every OTHER native asset on every OTHER chain
tested, ruling out a generic bug in the class.

Switched startSyncingBalance() to the typed remoteStorage.subscribe { }
DSL (metadata.system.account.observeWithRaw) - the same mechanism this
class's own subscribeAccountBalanceUpdatePoint() and PooledBalanceUpdater/
BalanceLocksUpdater already use successfully on the same busy chain
connection, instead of the raw subscriptionBuilder.subscribe(key) call
that appears to silently drop registration in that specific configuration.

Also removes the diagnostic logging added during the investigation
(BalancesUpdateSystem's per-chain balancesSync trace, FullSyncPaymentUpdater's
per-chain asset dump) - kept the one genuinely valuable permanent addition,
the "listenForUpdates() threw synchronously" error log for a previously
silent failure mode.
2026-07-09 11:53:35 -07:00
pezkuwichain 688a23ba6b fix: log and stop swallowing synchronous listenForUpdates() failures; retry NDK download in CI
BalancesUpdateSystem.launchChainUpdaters() wrapped updater.listenForUpdates() in a
try/catch that discarded synchronous exceptions with zero logging - a silent failure
point that could explain a chain's balances never syncing with no trace in logcat.

Also add a full-architecture instrumented test that persists a real watch-only
MetaAccount and polls AssetDao through the actual BalancesUpdateSystem pipeline,
instead of bypassing it like the existing BalancesIntegrationTest does.
2026-07-09 07:52:15 -07:00
pezkuwichain 74728a8477 feat(dashboard): collapsible Pezkuwi card, minimal by default
Card now opens in a slim single-line pill showing only Trust Score.
Tapping it expands to the full card (citizen status, world Kurdish
count, referral actions); a chevron in the expanded header collapses
it back. Expand state persists across scroll/recycling within the
session but resets to collapsed on a fresh app launch.
2026-07-08 10:18:04 -07:00
pezkuwichain 85bde7e448 Redesign: dashboard card + action row (v1.1.1) (#6)
* redesign(dashboard): brand-book restyle of Pezkuwi dashboard card

Match the brand book / handoff screenshot:
- bg_pezkuwi_dashboard: blue/indigo gradient -> frosted dark-navy surface
  (#1C1F2E) with a 1px periwinkle hairline, 20dp corners.
- item_pezkuwi_dashboard: replace hardcoded non-brand colors —
  trust value amber #FFD54F -> zer #FDB813; welati count -> positive #2FC864;
  Approve/start buttons Material-green -> kesk #009639; Sign red -> sor #E2231A;
  Share button yellow #FDD835 -> frosted-navy secondary #2A2F45 (white text);
  blue-grey text -> brand white tokens. Pill-er 12dp button corners.

* redesign(actions): circular action buttons (primary green Send + dark rest)

Match the brand-book screenshot: the balance action row (Send/Receive/Swap/
Buy/Gift) becomes circular icon buttons with a label below — Send on a kesk
green circle, the rest on frosted-dark circles. IDs preserved (used only for
click + isEnabled), so AssetsTotalBalanceView keeps working.

* redesign(dashboard): pro-level Pezkuwi card layout

Rework the card to match the brand-book screenshot: header row with a small
Newroz-flame icon + title/roles on the left and the citizen count on the right;
trust score row; full-height (48dp) pill-er (14dp) action buttons — Approve
(kesk, bold), Sign (sor), Share (frosted-dark with hairline). Adds the small
ic_nevroz_flame icon.

* release: bump versionName to 1.1.1 (dashboard & action-row redesign)
2026-06-14 23:34:49 -07:00
pezkuwichain 8d150266fb fix: detect on-chain dispatch errors for citizenship and staking extrinsics
Switch from submitExtrinsic (fire-and-forget) to submitExtrinsicAndAwaitExecution
which waits for block inclusion and checks ExtrinsicFailed events. Previously the
app showed success even when pallet-level errors occurred (e.g. ReferrerNotCitizen,
AlreadyExists). Now dispatch errors are properly surfaced to the user.
2026-03-09 02:46:49 +03:00
pezkuwichain 84d0f39f8a fix: replace setFragmentResult with interface callback for citizenship dismiss
setFragmentResult API not available in this project. Use CitizenshipDismissListener
interface instead for parent-child fragment communication.
2026-03-08 19:06:21 +03:00
pezkuwichain 138c0199c9 fix: auto-refresh Pezkuwi dashboard card after actions
Add dashboardRefreshSignal to trigger re-fetch on swipe-to-refresh,
onResume, citizenship bottom sheet dismiss, and score tracking.
Rename button label to "Apply & Actions (KYC)" for clarity.
2026-03-08 17:32:40 +03:00
pezkuwichain ba057617d3 fix: ktlint multiline-if-else braces in PezkuwiDashboardAdapter 2026-03-05 02:40:08 +03:00
pezkuwichain 91f2b5d254 feat: add Start Tracking button for StakingScore on dashboard
Query StakingScore::StakingStartBlock from People Chain to check
tracking status. Show "Start Tracking" button for approved citizens
who haven't opted in yet. Submits start_score_tracking() extrinsic
with loading state and error handling to prevent duplicate calls.
2026-03-05 02:33:31 +03:00
pezkuwichain 81b0491691 fix: use safe call for nullable String in ifBlank 2026-03-01 22:22:41 +03:00
pezkuwichain 5705d0d578 fix: resolve citizenship bottom sheet not opening on button tap
Event(null) was swallowed by EventObserver's ?.let pattern, preventing
the CitizenshipBottomSheet from opening when tapping dashboard buttons.
Changed to Event("") with ifBlank conversion to preserve null referrer
semantics while ensuring the observer callback fires.
2026-03-01 22:08:19 +03:00
pezkuwichain d33a0a6289 fix: use https telegram link in dashboard share referral button 2026-02-28 04:22:16 +03:00
pezkuwichain 5771fbc10b fix: use https telegram link instead of custom scheme for sharing
Custom scheme pezkuwiwallet:// is not clickable in WhatsApp and
other messaging apps. Use https://t.me/pezkuwichainBot?start=ADDRESS
which is universally clickable and auto-fills the referrer field.
2026-02-28 02:40:06 +03:00
pezkuwichain 66be33c43e fix: disable referrer input when pre-filled from deep link
Prevent user from editing or clearing the referrer address when it
comes from a referral deep link to ensure correct on-chain submission.
2026-02-28 02:00:08 +03:00
pezkuwichain 33c6559a41 fix: connect referral link to blockchain via deep link handler
When Alice shares a referral link, it now generates a deep link URL
(pezkuwiwallet://pezkuwi/open/citizenship?referrer=address) that
auto-opens the citizenship form with Alice's address pre-filled as
the referrer, fixing the bug where referrer defaulted to founder.
2026-02-27 22:11:34 +03:00
pezkuwichain 894e5dac22 fix: prevent staking dashboard hang when exposure flag not cached
isPagedExposuresUsed() called storageCache.getEntry() which suspends
forever if the entry doesn't exist. The flag is only written by
ValidatorExposureUpdater (staking detail flow), so the dashboard
would hang indefinitely waiting for it.

Check cache first with isFullKeyInCache() and default to paged
exposures when the flag is absent. Also remove debug log statements.
2026-02-27 13:41:26 +03:00
pezkuwichain b9fadbe6da fix: remove unused imports to pass ktlint 2026-02-22 05:15:10 +03:00
pezkuwichain 771c9c8877 feat: in-app citizenship application with referral system
- Add CitizenshipBottomSheet with form (name, father, grandfather, mother, tribe, region)
- Submit apply_for_citizenship extrinsic with referrer parameter to People Chain
- Query KYC status from IdentityKyc pallet and show appropriate UI state
- Referrer approval: query Referral + Applications entries, approve pending referrals
- Sign (confirm_citizenship) for applicants after referrer approval
- Share referral link for citizens to invite others
- Dashboard buttons adapt to citizenship status (hide Apply/Sign when approved)
- Balance check (1.1 HEZ) only before new applications, not for sign/approve
- i18n strings for en, tr, ku
2026-02-22 05:04:43 +03:00
pezkuwichain 37829e30f0 style: fix ktlint no-multi-spaces violations in BridgeViewModel 2026-02-21 18:46:37 +03:00
pezkuwichain 359cfb1eb3 fix: correct Welati counter URL to telegram.pezkiwi.app 2026-02-18 07:01:20 +03:00
pezkuwichain 326aa869ed fix: update Welati counter URL to telegram.pezkuwi.app/kurds 2026-02-18 06:58:09 +03:00
pezkuwichain 533aa9e831 feat: replace dashboard image with Welati counter (Hejmara Kurd Le Cihane)
Remove telegram_welcome image from dashboard card, add live Welati
citizen count fetched from kurds-counter API endpoint. Shows formatted
count with "Hejmara Kurd Le Cihane" label in green.
2026-02-18 06:52:01 +03:00
pezkuwichain 14519d7818 Fix Polkadot staking, add USDT bridge, update dashboard card
- Restore staking module to Nova upstream (fix Polkadot ACTIVE/shimmer)
- Add USDT(DOT) <-> USDT(HEZ) bridge option to Buy/Sell screen
- Dashboard card: add telegram_welcome image, info text, Non-Citizen role
- Add non-citizen info text to all 12 locale files
- Simplify ComputationalCache (remove stale scope recreation)
2026-02-18 02:43:53 +03:00
pezkuwichain 9c7bb7c6e9 Prepare for Play Store release: simplify dashboard, clean debug logs
- Simplify dashboard card: remove referral/staking/perwerde fields (not yet on-chain), keep roles + trust score + action button
- Remove all debug Log.d/e/w calls added during development (PEZ_STAKE, RuntimeFactory, ExtrinsicBuilder, etc.)
- Change Play Store track from beta to production
- Add release notes (whatsnew-en-US)
2026-02-17 06:13:59 +03:00
pezkuwichain 93e94cbf15 feat: add Pezkuwi Dashboard card with live People Chain data
- Dashboard card on Assets page showing roles, trust score, referral,
  staking, and perwerde points from People Chain pallets
- Repository queries: Tiki, Trust, Referral, StakingScore, Perwerde
- CachedStakingDetails double map query (RelayChain + AssetHub sources)
- Full i18n support across all 15 locales including new Turkish locale
- "Apply & Actions" button opens Telegram bot
- Staking improvements for split ecosystem multi-endpoint stats
2026-02-17 00:10:23 +03:00
pezkuwichain a294aa1a6b Initial commit: Pezkuwi Wallet Android
Security hardened release:
- Code obfuscation enabled (minifyEnabled=true, shrinkResources=true)
- Sensitive files excluded (google-services.json, keystores)
- Branch.io key moved to BuildConfig placeholder
- Updated dependencies: OkHttp 4.12.0, Gson 2.10.1, BouncyCastle 1.77
- Comprehensive ProGuard rules for crypto wallet
- Navigation 2.7.7, Lifecycle 2.7.0, ConstraintLayout 2.1.4
2026-02-12 05:19:41 +03:00