mirror of
https://github.com/pezkuwichain/pezkuwi-wallet-android.git
synced 2026-11-20 01:26:11 +00:00
cb74f8cde0a346295e5b47c42672e5650a815149
261
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
cb74f8cde0 |
Fetch .kurd content from our own gateway first, and believe a proven absence (#39)
ipfs.io and dweb.link now send trustless (?format=car) requests on to trustless-gateway.link, which only finds content announced over HTTP: for the dks.news package our node pins and serves it answered 525/526. The built-in list now starts with ipfs.pezkuwichain.io, a trustless-only gateway serving just what our node pins; the public two stay as fallbacks. Every block is still checked against the root, so the order changes reachability, not trust. A trustless gateway answers a path that is not there with 200 and the directory blocks that lack it. The fetcher took that for "no answer" and the reader saw Unavailable for a plain 404. A missing block throws in the reader, so a null from a verified CAR means the name is absent: it is now NotFound in one request. |
||
|
|
8cbde5c422 |
Tell the reader when a .kurd page could not load a part from elsewhere (#38)
A .kurd page may load only from its own name, so a site built to pull a video, an image or a script from another server has that part missing, with nothing saying why. A script the wallet adds at the start of every .kurd document reports the page's own policy violations; the browser shows a note naming what kind of content was not loaded, until the reader closes it or leaves the page. Only the top frame of the .kurd page shown is heard, and only a block of a server other than the page's own counts: inline script, eval and data URLs are the page's doing, not a server it relies on. A page can post the report itself, but only to have the note shown about itself. |
||
|
|
425079281c |
Resolve and serve .kurd sites from verified content, never via DNS (#37)
* Resolve .kurd names on chain and keep them away from DNS and search The Navnisan pallet is live on Zagros People. The wallet now reads a name's record and every ancestor's at one finalized block, checks that each record sits under the parent its name implies, and judges validity the way the pallet does (expiry, 30-day grace for leases, a subname valid only under the registration it was set against). Records are decoded by hand, so a lookup does not depend on the chain's runtime being loaded; the decoder is tested against records read from the live chain, and namehash against the vectors the pallet pins. Names are read through the light client, which proves each value. The chain's own connection is RPC first, so it is not used for names. When the light client cannot answer, two RPC nodes on different hosts must return the same records; an answer reached that way is marked unverified, and an official, institutional, reserved or zone name is then refused rather than opened. The light client tracked its users with one set, so the RPC fallback releasing a chain would stop it under any other reader. Each holder now keeps its own lease. A .kurd host never reaches system DNS or the search engine: the search box offers no web address or search for it, and the DApp browser answers every request to such a host itself, including loadUrl and resources a page embeds. The DuckDuckGo query is now URL-encoded. * Verify .kurd site content block by block A name's content is an IPFS CID on chain; mirrors serve it as a CAR. Every block in the CAR is checked against its CID while it is read, and one block that does not match refuses the whole CAR, so a mirror can withhold content but cannot change it. Files are then assembled only by following CIDs taken from blocks already checked, starting from the CID the chain gave rather than the roots the CAR claims. Supported: CIDv1 and CIDv0, dag-pb and raw, sha2-256 and inlined identity blocks; UnixFS files of any chunking, plain directories and HAMT-sharded directories (murmur3-x64-64, as Kubo builds them). An ipns contenthash, a symlink, an escaping path segment or a file over 32 MiB is refused. Tested against CARs Kubo produced, taken unchanged from ipfs/gateway-conformance (MIT / Apache-2.0), including a 238-shard HAMT, a CAR with a missing block and nodes with their fields in either order; murmur3 also against Guava's reference vector. * Serve .kurd sites from verified content under their own origin The DApp browser now answers https://<name>.kurd itself: the name is resolved on chain, its content root fetched from IPFS trustless gateways as a CAR for the requested path, verified block by block, and only then served. The page's origin is the full name, so cookies, storage and permissions belong to that name alone, and every response carries a policy the wallet writes: nothing loads or connects outside the name, no workers, no framing. Gateways are tried in order and one that fails, withholds or changes a block is skipped. A gateway saying "not found" is believed only once the parent directory, verified, shows the name is absent. A directory is served through its index.html. The gateway list is the signed kurd/gateways.json from the config repository when it can be read, otherwise the gateways measured reachable from Turkiye; entries can only be https origins. Bad paths (dot segments, encoded slashes, malformed escapes, non-UTF-8) are refused before any lookup. A refused, missing or unavailable name, ipns content and feeds get their own status; a name's resolution is reused for a minute so one page does not resolve it once per resource. * Give the runtime component the app's HTTP client for .kurd content The site server fetches CARs over the shared client, so gateway requests use the same DNS-over-HTTPS-first resolver as the rest of the app. * Hear the DApp bridge only from the top frame of the page shown The polkadot-js and MetaMask bridges were exposed with addJavascriptInterface, which every frame of a page can call. A third-party frame inside an authorised DApp -- an ad, an embed -- could ask for the account list or a signature, and the request was shown in the DApp's name, because authorisation follows the page the tab shows. The bridges now use a web message listener: the WebView reports each message's origin and frame, and only a message from the top frame whose origin is the page shown is heard. On a WebView too old to report them, the bridge stays off instead of trusting the page. The bridge is also added before the tab's first load, since it reaches only documents loaded after it. * Let .kurd pages reach the chain through the wallet's connection A .kurd page may only connect to its own name, so it cannot open a node connection of its own. The provider half of the polkadot-js extension API (pub(rpc.listProviders, startProvider, send, subscribe, subscribeConnected)) now answers it over the wallet's connection to Pezkuwi and Zagros relay, Asset Hub and People, which falls back to the light client. Offered only when the tab shows a .kurd page, judged by the WebView's page rather than the message. Only calls that read state, estimate fees or submit an extrinsic the user already signed pass; key, peer and offchain methods do not. A subscription ends when the tab leaves the page's origin. Calls are answered off the request queue so a slow node does not hold up the page, and params are forwarded as the page wrote them rather than reparsed (a block number must not become 123.0). * Offer a typed .kurd name in DApp search as the name itself Typing a valid .kurd name now shows it under its own heading, with the shield and "resolved on chain, never sent to a search engine", and opens https://<name>/ in the browser. An invalid one is offered nowhere: not as a web address, not as a search. * Let runtime unit tests log a warning with its cause The test stand-in for android.util.Log had no w(tag, msg, throwable), so any code under test that logged a failure that way stopped with NoSuchMethodError instead of carrying on: the .kurd fetcher logs each gateway it skips. * Show what was verified about a .kurd page, and stop at what was not The address bar of a .kurd page carries a badge in place of the padlock: Official for a name Parliament gave, Registered for a bought one, Not verified for one the reader chose to open on two RPC nodes' word. Tapping it shows the block the name was proven at, the owner (a state institution or an account), the content CID, and a button to clear the site's storage, cookies and permissions. A page that did not open is replaced by a notice instead of a blank page: an official name that cannot be verified now (retry, never open), a name read through RPC nodes only (go back, or open anyway), an unregistered name, a name without a site, and content no mirror could deliver verifiably. Behind it the site server keeps each name's page state, set only by the page's own document, and holds back a name read through RPC nodes until the reader chooses to open it. Texts in Kurmanji, English and Turkish. * Warn before opening a .kurd name that imitates an official one Zone names are institutional by construction, and the commonest imitation folds the zone into the label: serok-gov.kurd or serokgov.kurd for serok.gov.kurd. When a typed name has such a candidate and the candidate resolves, proven, as an official name, search asks first: go to the official name, or open the typed one anyway. The check runs only for names with a candidate and gives up after a few seconds; the opened page still shows by its badge whether it is official. * Say on the signing screen what kind of .kurd name asks A signature requested from a .kurd page now names the page by its .kurd name with its kind: Official, Bought (not official) or Not verified. For a name that is not official, the reader is told to check the full name, since the state did not give it; for one opened without proof, to sign only when sure whose site it is. * Judge a DApp request by the page that sent it, not the page shown by then Bridge requests are handled one at a time, after they arrive. A page could send a request and navigate at once, and its request was then authorised, and named on the signing screen, as the next page's: a .kurd page could have its signature request shown as Official by moving to an official name. Every request now carries the origin the WebView reported for its message (the polkadot-js url the page writes is no longer read). A request whose origin is not the page shown when it is handled is refused, and the signing screen is built from the asking origin's own .kurd state, refusing as well if the tab has moved on. * Serve .kurd feeds from their publisher's newest signed release A feed name (a site that changes many times a day) carries its publisher's key and an anchor: the newest release the chain was told of. The wallet asks the gateways for the publisher's IPNS record, verifies each against the key the chain gives (never the key in the record or its name), refuses expired ones, V1-only ones and ones whose legacy fields contradict the signed data, and serves the newest release at or past the anchor. When none is confirmed, it serves the anchor itself and the browser says that a newer version could not be found; the release the chain already names is always served from the chain's root. Verification is tested against records Kubo signed, taken unchanged from ipfs/gateway-conformance (MIT / Apache-2.0). |
||
|
|
cf74df7cf4 |
Ship third-party licences and point to the exact source of each build (#36)
* Ship third-party licences and point to the exact source of each build The light client links smoldot (GPL-3.0-or-later WITH Classpath-exception-2.0), and the app shipped no third-party notices at all. Releases are not tagged, so nothing told a user which source a given APK was built from. - Settings > About gets an "Open source licenses" row. It opens the licences page with the commit the build was made from (BuildConfig.LICENCES_URL, from git rev-parse HEAD). - assets/licences/rust-crates.txt lists the 430 Rust crates linked into the four native libraries, with their licence texts. scripts/licences/rust_notices.py writes it from the lockfiles, and a Code Quality job fails when it is stale. - assets/licences/native-libraries.txt covers the prebuilt libsqlcipher.so and libsr25519java.so. - The licensee plugin bundles the Android library list into the APK and fails the build on a licence outside the allowed set. - NOTICE names the Pezkuwi Wallet copyright and where these notices live. * Check Android library licences in Code Quality and keep the report The build job fails on a disallowed licence but does not say which library, and its workflow is taken from main. This job runs only the licence check on the PR branch and uploads the report naming each library and its licence. * Replace the GPL-3.0 NovaCrypto libraries and allow the reviewed licences substrate-sdk-android brings in NovaCrypto BIP39, Sha256, ToRuntime and SecureString, all GPL-3.0 without exception, which made the APK a GPL-3.0 combined work alongside Google's proprietary SDKs. The SDK uses four of their types, only in MnemonicCreator and EnglishWordList. common now provides those types under Apache-2.0 with the binary interface the SDK is compiled against (taken from its bytecode), and every configuration excludes the NovaCrypto groups. Bip39VectorsTest runs the SDK's MnemonicCreator on them against all 24 English BIP-0039 vectors, both directions, plus a round trip of each random mnemonic length. Checked outside Gradle against the SDK 2.11.0 classes: 24/24, and red when the checksum is broken. The licence policy now names each remaining library licensee rejected: permissive licences declared by URL, POMs without a licence (checked against each project's repository), Google's SDK terms for the Play build, and the EPL libraries one by one. |
||
|
|
5c13c84eca |
Polkadot-js requests reach the wallet: bridge calls the registered interface (#35)
The WebView registers the polkadot-js interface as Pezkuwi_PolkadotJs, but the bridge script still called Nova_PolkadotJs. That call threw inside the page's message listener, so enable, account and signing requests never reached the app and every Substrate dApp waited forever with nothing on screen. Measured on a phone running 1.3.0: the request logged nothing on the native side. Both bridges now build their interface name from one function, and a test pins the bundled bridge script to the name the injector registers. |
||
|
|
295a0df17d |
Test root keys handed to new holders; sr25519 signing context vectors (#34)
- Interceptor test: a root that gives the root keys to new holders is followed only with two signatures from the old root keys and two from the new ones; with the old ones alone it is refused and nothing is stored. - Device test with fixed vectors: the signed config check accepts an sr25519 signature over <Bytes>message</Bytes> made under the substrate signing context and refuses one made under bizinikiwi. The utils root check and signing page count only substrate signatures because of this; sr25519 is native code, so only a device can confirm it. |
||
|
|
58ef588261 |
Log Wallet Connect init failures; give empty errors a text; retranslate Kurmanji (#33)
* Log Wallet Connect init failures; give empty network errors a text - Wallet Connect core and Web3Wallet initialization errors were swallowed silently; log them. A retry is not added: initialization fails only on bad configuration, and the relay connects later on demand. - NovaException.networkError carried an empty message; it now uses the existing translated connection error text. The unused NovaException.unexpectedError is removed. - BaseException.unexpectedError fell back to an empty message when the exception had none; HttpExceptionHandler now passes the translated common error text as the fallback. - Remove the unused AccountRepository.getMyAccounts stub. * Retranslate the Kurmanji strings The values-ku file was word-by-word machine output that mixed English and Kurmanji (1709 of 2080 strings had English left in, 620 were English verbatim). Rebuild it from the English source with a fixed wallet glossary: every translatable string and plural is translated, 18 strings that were missing are added, and strings marked translatable="false" or no longer in the English source are dropped. * Skip commented-out strings in the Kurmanji file Two English strings have an older, commented-out copy; reading the comments emitted each of them twice and failed resource merging. |
||
|
|
de826acc70 |
Keystore AES-GCM for stored secrets; biometric unlock bound to a keystore key (#32)
* Encrypt stored secrets with a keystore AES-GCM key and migrate old values on read Secrets and the PIN were AES-CBC without authentication, under a random key kept in shared preferences and wrapped by a keystore RSA key with PKCS#1 v1.5 padding. They are now AES-256-GCM under a key that never leaves the Android keystore, stored as "v2:" + Base64. Old values stay readable through a read-only decrypter of the previous scheme; nothing is written in it any more and no new RSA key is created. A legacy value is re-encrypted when it is read, and replaced only once the new copy decrypts to the same text. A value that cannot be decrypted now reads as absent and is left untouched, where decrypt() used to return "" and let a caller treat it as a value. * Bind biometric unlock to a keystore key A biometric success was taken from the prompt callback alone. With strong biometrics the prompt now carries a cipher of a keystore key that requires user authentication and is invalidated when biometrics are enrolled: the first prompt seals a random token, later ones must open it, and only an opened token unlocks. If biometrics changed, biometry is turned off and the PIN is asked for. Weak biometrics (most face unlock) cannot use a keystore key and keep the plain prompt. androidx.biometric goes to 1.1.0 for the authenticator classes. * Log the light client under a fixed tag; LOG_TAG in a coroutine named the coroutine |
||
|
|
35c71062f0 |
Strip native libraries; XCM by genesis; CodeQL for Kotlin; bridge credits in history (#31)
* Strip native libraries in the app and keep light client line tables
The app module named no NDK, so AGP expected its default 27.0 against the 26.1 that CI installs,
could not strip any native library and made no native-debug-symbols.zip for Play. Pin 26.1 in the
app. The light client now keeps line tables for that symbol file; the packaged library is still
stripped to 8.6 MB.
Also adds an XCM encoding test for PezkuwiChain networks. This commit points WESTEND at Zagros
to check that the test fails against that change.
* Fix the encoding test's read of the interior field
* Encode PezkuwiChain networks by genesis in XCM
WESTEND held a stale genesis labelled Zagros. The runtimes declare ThisNetwork as ByGenesis and
the XCM v5 NetworkId has no Westend or Zagros variant, so the named mapping is removed and every
PezkuwiChain network is encoded as ByGenesis.
* Run CodeQL for every language on hosted runners, Kotlin with a build
Default setup analyses Java without a build and leaves out every Kotlin file, and the Java job on the
self-hosted runner stopped at the NDK install because sudo asks for a password, so Kotlin had not been
analysed since February. One matrix job covers actions, JavaScript/TypeScript, Rust and Java/Kotlin.
* Use CodeQL Action v4, v3 is deprecated in December 2026
* Build for CodeQL without Gradle and Kotlin daemons so the analysis has the memory
* Show incoming USDT bridge credits in history without a refresh
The realtime transfer extractor for assets pallets knew only transfer and transfer_keep_alive. The
bridge credits with transfer_approved, spending the multisig's allowance, so a credit appeared only
after the indexer caught up and the user refreshed. transfer_approved is now a transfer from owner to
destination; the signing delegate is not the sender.
* Stop the light client five minutes after RPC is back
A chain registered with the light client kept syncing for as long as the process lived. Measured on
the emulator over 5-minute windows, that was about 14 MB of data an hour and 2% of a core while the
wallet read nothing from it.
Once RPC has stayed connected for five minutes after a fallback, the connection releases the light
client: LightClients unregisters the chain, a relay chain only after its teyrchains. The engine gains
remove_chain. Its database saver now checks, under the registry lock, that the chain is still
registered: smoldot panics on a request to a removed chain. The next fallback starts cold from the
saved database.
* Refresh light client specifications from the signed config while RPC works
The light client started from the checkpoint the APK was built with, so a first fallback months after
a release warp-synced from months back, and on a phone that never fell back there is no saved database
to help. The fallback is wanted when RPC is blocked, and then the config repository may be blocked too.
On the first RPC connection of the process, each chain's specification is fetched from the config
repository through the app's HTTP client, which checks it against the signed targets and falls back to
the mirrors. It is kept when it is the same chain (id and genesis state root) with a later checkpoint;
an older file never rolls the checkpoint back. Registration uses the kept file when it is later than the
APK's own.
* Close the light client's peer connections once its last chain is removed
smoldot keeps its peer-to-peer network service, with the connections in it, for as long as the client
lives, so removing every chain left them open: on the emulator, four libp2p connections were still up
eleven minutes after the release, and data use stayed above the RPC-only level. The engine now
replaces the client once no chain and no loopback connection is left; the connections close about 20 s
later, when the attempts under way finish.
The database saver now checks a per-registration number instead of the smoldot chain id, which smoldot
reuses after a removal: a saver of a removed chain could otherwise keep running for the next chain
that got the same id. A connection whose chain is removed between the handshake and its setup now
ends instead of panicking.
* Obfuscate the app's own classes and build the R8 variant in pull requests
-keep class io.novafoundation.nova.** { *; } with -keepnames left 2.6% of the app's 26,602 classes
renamed in the 1.3.0 Play build (15.6% of all classes). It is replaced by keeping only the field names
of the app's classes, which Gson reads by name where a class has no @SerializedName, so class and method
names are obfuscated. No persisted value or reflective lookup in the app depends on a class or method
name: class names appear only in logs and in an in-memory cache key.
@JavascriptInterface methods had no rule of their own; the blanket keep covered the DApp browser's web3
bridge, its integrity check and the Transak bridge. They are kept explicitly.
Pull requests built only the unminified develop variant, so an R8 break would first show in the Play
build. A second job builds releaseTest (the release rules, debug-signed) and uploads its APK and mapping.
* Give the releaseTest build the debug package, which the CI Firebase config knows
* Build releaseTest under the production package, the one its Firebase config has
* Stop keeping every app class under the JNI rule
-keep class io.novafoundation.nova.** { native <methods>; } keeps every class the pattern matches,
whether or not it has a native method, so the app's class names stayed unobfuscated after the blanket
keep went: 2.6% of its classes were renamed in the R8 build. The rule under it already keeps the names
of classes with native methods and of those methods, which is what JNI binds by name; the Rust
bindings look up no other app class.
* Keep TypeToken and Retrofit generic signatures under R8 full mode
The R8 build failed to map every chain from the local database: R8 full mode keeps generic signatures
only on kept classes, and the app's anonymous TypeToken subclasses had been kept by the blanket rule.
These are the rules Gson 2.11 and Retrofit 2.10 ship; the app is on Gson 2.10.1 and Retrofit 2.9.0.
* Keep constructors of the app's classes so Gson can instantiate its models
The R8 build failed to read the DApp list: R8 full mode had made DappMetadataResponse abstract because
nothing in the code instantiates it, and Gson does so reflectively. It matches none of the name
patterns the rules keep models by. Keeping constructors costs no obfuscation, since they are all named
<init>.
* Keep the type argument of web3j TypeReference subclasses under R8 full mode
* Run R8 in compatibility mode
After the app's own classes became obfuscatable, the full-mode R8 build kept breaking reflective
decoding in new places: TypeToken and TypeReference subclasses lost their type argument, a Gson model
was made abstract, and SubQueryResponse<T> lost its class signature so a proxy query decoded to a
LinkedTreeMap. Full mode keeps generic signatures only on explicitly kept classes, and this code base
has many generic models outside any name pattern. Compatibility mode keeps them everywhere under
-keepattributes Signature and does not make uninstantiated classes abstract; obfuscation is unchanged.
* Allow the java.beans classes Jackson's Java 7 support refers to, missing on Android
|
||
|
|
8549501a62 |
Embedded PezkuwiChain light client with RPC fallback (Zagros) (#30)
* Add pezkuwi-light: embedded PezkuwiChain light client binding A JNI binding around the PezkuwiChain fork of smoldot (pezkuwichain/smoldot), which verifies PezkuwiChain blocks under the chain's sovereign constants. Upstream smoldot cannot. The wallet reaches its chains through JSON-RPC WebSockets, so the light client is served the same way: a WebSocket server bound to 127.0.0.1 on a random port. Every path carries a random per-process token: ws://127.0.0.1:<port>/<token>/<chain key>. - A wrong token, a missing token or an unregistered chain is refused during the handshake with 404. - Each connection adds its own smoldot chain instance. smoldot shares the sync between instances of the same chain. - Each registered chain's finalized state is written to disk every minute, through a temporary file and a rename. The next start resumes from it. Kotlin surface: PezkuwiLight.start(dir), addChain(key, spec, relayKey), chainUrl(base, key). The module is not yet a dependency of the app. Tested against the live Zagros testnet, with the relay chain and People specs: - dks.kurd resolves through NavnisanApi_resolve to the same bytes the full node returns. - An unregistered name returns 0x00. - The saved state lets a new client resolve. - Reverting the token check turns the routing test red. The library builds for arm, arm64, x86 and x86_64 with 16 KB aligned LOAD segments (0x4000). * pezkuwi-light: secure WebSockets and the app's resolver for peers smoldot's DefaultPlatform cannot open wss connections and resolves names through the system resolver. Where our domains are blocked, both fail: a poisoned DNS answer decides where the client connects, and plain libp2p TCP is recognisable on the wire. PezkuwiPlatform replaces it: - Opens /dns/<host>/tcp/<port>/wss over TLS, using rustls with the ring provider and the Mozilla roots, so a connection looks like any HTTPS WebSocket. - Resolves every name through a Resolve trait. On Android this is the app's HostResolver, called over JNI, so the light client follows the same DNS policy as the rest of the app (EncryptedFirstDns: DoH first, system resolver last). - Tries IPv4 before IPv6, and gives up on an address after 10 s. - With setSecureOnly(true) it opens nothing but secure WebSockets. Peers found through the DHT advertise plain TCP too, and none of them is used. The peer's identity is still checked end to end by libp2p Noise. Tested against live Zagros with only the /wss boot nodes in the specs and secure-only on: relay and People sync and dks.kurd resolves to the full node's bytes. Nail: with secure-only on and the specs' plain TCP boot nodes, nothing syncs and the test times out red. * pezkuwi-light: measure a start from the saved database in its own process An app launch resumes from the database in a fresh process. The in-process warm measurement ran beside a client that was still syncing, so it did not show that case. The new ignored test resolves dks.kurd after a start from the database in PEZKUWI_LIGHT_DB_DIR. On the first run, when no database exists yet, it syncs and waits for a save. The tests also log through env_logger, so RUST_LOG shows smoldot's own timeline when a measurement needs explaining. * Fall back to the embedded light client when every Zagros RPC node fails ChainConnection stays on RPC first. A light client loads the peer-to-peer nodes, and those nodes have a fixed number of light client slots, so RPC is the default. When every RPC node of a supported chain has failed in a row, the connection moves to the light client, served at ws://127.0.0.1:<port>/<token>/<genesis>. RPC is retried after one minute. The wait doubles up to 15 minutes while RPC keeps failing. The connection returns to RPC as soon as a retry connects. If the light client cannot start, or its own connection fails, the connection stays on RPC. LightFallbackPolicy holds these rules. Its tests cover each one, and five mutations of the policy each turn a test red. ChainConnection handles RPC node changes, socket states and a 15 s tick as one event stream, one event at a time, so a node change and a fallback cannot race. LightClients starts the client on first use. A wallet whose RPC answers never runs it. LightClients registers Zagros and Zagros People, the chains the fork can verify, from specifications bundled at build time from pezkuwi-wallet-utils light-client/: the genesis state root, the /wss boot nodes on 443 first, and the relay checkpoint. Peer names resolve through EncryptedFirstDns, which CommonApi now exposes to the runtime module. * pezkuwi-light: strip in the cargo profile The Android Gradle plugin packages a native library it cannot strip as it is. With debug info, libpezkuwi_light.so is 147 MB per ABI. Stripped it is 8.6 MB. The first CI build of this library ran out of disk: four targets with debug info filled the runner. Stripping in the release profile, with debug info off, fixes both: - The library is 8.6 MB for arm64 and keeps its three JNI symbols. - The build directory is 389 MB per target. * Log the light client fallback's decisions Each RPC failure the fallback sees, the light client URL it got, and each RPC retry are logged under LightFallback. The first device run on a blocked Zagros RPC showed no fallback and no trace of where it stopped. |
||
|
|
7b8fd731f8 |
Release 1.3.0: DKS hub tiles open each app's own domain (#29)
* DKS hub: open each app on its own domain Seven tiles opened app.pezkuwichain.io routes or a front page while the app has a domain of its own. Each now opens that domain, even where the site is still a "coming soon" page, so the tile keeps its address when the site arrives: Wallet explorer front page -> cuzdan.pex.network P2P / Buy-Sell app/p2p -> buy-sell.pezkiwi.app B2B app/bereketli -> bereketli.pezkiwi.app Vote app/elections -> governance.pezkuwichain.io Proposals app/citizens/government-> governance.pezkuwichain.io Identity app/identity -> be-citizen.pezkiwi.app Forum app/forum -> forum.pezkuwichain.io B2B went through a sign-in bridge that only helps a user signed in to the web app, which the wallet's DApp browser never is: it loaded the whole web app, then forwarded to bereketli.pezkiwi.app anyway. * Release 1.3.0 Version 1.2.0 -> 1.3.0, with release notes in English, Turkish and Kurmanci for the Ecosystem Hub, the config that keeps working when GitHub is blocked, and the splash and deep link fixes. |
||
|
|
781b713257 |
Config keeps working when GitHub is unreachable: mirrors and a bundled chain list (#28)
* feat(network): fetch config from jsDelivr when raw.githubusercontent.com fails Every config file the app reads -- chains, assets, DApps, XCM, banners, token icons -- comes from raw.githubusercontent.com with no other source, so when that host cannot be reached a fresh install has no chains at all. ConfigMirrorInterceptor retries the same file on cdn.jsdelivr.net and then fastly.jsdelivr.net when the primary fails to connect or answers 403, 429, 451 or 5xx. A 404 is an answer and is returned as is. A host that failed is skipped for ten minutes so later requests do not each wait for its timeout. Mirror requests revalidate, so a mirror's long max-age cannot pin a copy in the HTTP cache after the primary is back. The shared OkHttp client and Coil's image client both carry it. * feat(runtime): start a first install from the chain list the APK was built with A first install has no chains until chains.json is fetched, and the fetch retries forever: with GitHub and its mirrors unreachable the wallet stays empty. The runtime module now bundles the live chains.json at build time (bundleChainsConfig, run before preBuild, falling back to jsDelivr and refusing anything that is not a non-empty JSON array). When the local database is empty, ChainSyncService tries the network once and, if that fails, applies the bundled list so the wallet opens; the fetched list then replaces it through the usual diff as soon as it arrives. * feat(dapps): show the bundled DApps catalog until one can be fetched The DApps catalog lived only in memory and every read waited on first(), so with the catalog URL unreachable the DApps screen waited forever. feature-dapp-impl now bundles dapps_full.json at build time. On the first sync the repository tries the network once and, if that fails, publishes the bundled catalog so every read returns; the fetched catalog replaces it as soon as it arrives. The download task moves to scripts/bundled-config.gradle and serves both the chain list and the DApps catalog. runtime and feature-dapp-impl unit tests return defaults for android.util.Log, which the fallback calls. * feat(network): resolve names over DNS-over-HTTPS first, system DNS as fallback A network that answers plain DNS with a wrong address decides where the app connects. The shared OkHttp client and Coil's client now resolve through EncryptedFirstDns: Google, Cloudflare and Quad9 over HTTPS, each reached by IP, then the system resolver if all of them fail, so no network is worse off. - A resolver whose request failed is skipped for ten minutes, so a network that blocks DoH pays the four-second timeout once. NXDOMAIN and SERVFAIL do not count as failures. - IPv4 addresses are returned first: DoH answers IPv6 whether or not the network has it, and OkHttp tries addresses in order. - IP literals and localhost never leave the device. WebSocket RPC (nv-websocket) still resolves through the system. * feat(config): verify signed config metadata, TUF style The rules the app will apply to config it fetches, not wired yet: - A root, signed by a threshold of root keys, names the keys that may sign the targets list and how many must. The APK carries the first root. - A new root is accepted one version at a time, signed by a threshold of the old root's keys and of its own, so keys can be replaced without a release and a lost targets key can be revoked. - The targets list gives the sha256 of each config file; it cannot go back a version, cannot jump more than 10,000 at once, and is refused once it or its root has expired. - Ed25519 over the payload bytes exactly as published (BouncyCastle, already a dependency); a key signing twice counts once; a key must match its id. * fix(config): parse metadata with the Gson API the app resolves JsonParser.parseString is not in the Gson version on the app's classpath; the instance parse method is, and behaves the same here. * test(runtime): add the Log.e overload with a throwable to the test shim The first-install fallback logs the failed fetch with its exception, and the shim only had the two-argument form, so the test hit NoSuchMethodError. * feat(config): refuse config files the signed list does not give SignedConfigInterceptor checks every JSON file from pezkuwi-wallet-utils against signed/targets.json, whichever host the mirrors got it from. A file the list does not give, or one without a verified list behind it, comes back as a 502, so callers keep the stored chains and bundled lists as they do when the source is unreachable. Newer roots are followed from signed/root.N.json; the targets version and the latest time seen are stored, so an older list cannot be replayed. Root keys may now be sr25519 wallet accounts: they sign through the wallet's message signing, which wraps the bytes in <Bytes>, and the SDK's schnorrkel verifies them. The APK carries root 1 as an asset, trusted as the APK is. |
||
|
|
2d5d8bec49 |
fix(deeplink): stop links that fail for good from replaying on every launch (#27)
* test(deeplink): pin terminal-failure replay and referendum path matching These fail on main: a link that fails for good is kept as pending and replayed on every launch, and /open/governance matches the referendum handler. * fix(deeplink): drop a pending link once it fails for good RootDeepLinkHandler cleared the persisted pending link only on success or when no handler matched. A link that reached a handler and failed with a DeepLinkHandlingException stayed in preferences and was replayed on every launch. Clear it on terminal handling failures in both the fresh and pending paths; this also recovers installs already stuck on update. Other failures keep the link pending for a retry. * fix(deeplink): match the referendum path exactly ReferendumDeepLinkHandler matched any path starting with /open/gov, so the governance banner link /open/governance went to the referendum screen and failed with ReferendumIsNotSpecified. |
||
|
|
5a6eb62a1b |
ci(release): smoke-test the release APK on an emulator, drop the BrowserStack trigger (#25)
* ci(release): smoke-test the release APK on an emulator, drop the BrowserStack trigger
The release workflow ended by triggering BrowserStack tests in
appium-mobile-tests with a personal token. The token expired on 2026-10-17, so
every release build since is red, and the BrowserStack run behind it had never
produced a result (it fails uploading the app, KeyError 'app_url', since
2026-08-03). Its tests mostly asserted nothing.
In its place, every release build now installs the APK on an x86_64 API 34
emulator on a GitHub-hosted runner, launches it, and fails unless the
first-run welcome screen appears with both its create and restore buttons and
the app has neither crashed nor exited. The screen is matched by view id, so
it holds in any locale. A screenshot, the view tree and logcat are kept as an
artifact. It needs no account and no stored secret, and it can be run by hand
against the APK of an earlier run.
* ci: run the emulator smoke test on pull requests that change it, against main's latest release APK
* TEMP: nail check, expect red
* Revert "TEMP: nail check, expect red"
This reverts commit
|
||
|
|
5f96f63330 |
fix(splash): navigate to the first screen once, so a recreated activity cannot crash the app (#26)
* test(splash): the initial destination is navigated to once * fix(splash): navigate to the first screen once The splash screen asks for the initial destination on every onResume, which runs again when the activity is recreated during startup while the view model survives. The second navigation found the first already on the welcome screen, with no route from there, and crashed the app with 'Unknown case for welcomeFragment'. The view model now starts it once. |
||
|
|
280ccc3fd6 |
DApps: the Dijital Kurdistan Ecosystem Hub, a native screen (#24)
* DApps: the Dijital Kurdistan Ecosystem Hub, a native screen Tapping "Dijital Kurdistan" in the DApps tab used to open pezkuwichain.io in the browser. It now opens the hub first, inside the DApps tab so the wallet's bottom bar stays in view; the user picks an app there and it opens in the DApp browser. - Four sections: Finance (8), Governance (9), Education (4), Social (8). Each is a card with a glowing border in its colour (green, red, amber, blue), a header band with its name and app count, and a four-column grid of apps. - Apps open the same pages the web app's mobile home links to, at app.pezkuwichain.io, or their own sites: Wallet and Validators the explorer, Exchange pex.network, Delegation wekil.pex.mom, KurdAI kurdishtts.dks.news, Games games.pex.mom, Rewshenbir rewshenbir.pezkiwi.app. Music has no page yet: it is shown dimmed and does nothing when tapped. - The entry is recognised by its URL (pezkuwichain.io root, from wallet-utils dapps_full.json), so favourites open the hub too. Back, from the arrow or the system, closes the hub before it leaves the tab. - Strings in English, Turkish and Kurmanji, worded as the web app words them; other languages fall back to English. * DApps hub: open Music at music.dks.news Every app in the hub now has an address, so the dimmed, inert state for an app without one is gone along with its string. * DApps hub: open KurdMedia at dks.news --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
2629cf8da9 |
ci(security): scan new commits on push/PR and the current tree weekly (#23)
* ci(security): scan new commits on push/PR and the current tree weekly `base: main` made every push to main rescan the whole history, where Nova's own Infura keys are still live, so Secret Scan was red on every push and a new leak would have read as the same old red. - push and pull_request: no `base`, so the action scans only the commits the event brings - schedule: scan a `git archive HEAD` copy of today's tree - pin the action to v3.99.2 by commit and the image to 3.99.2 (was @main and latest) * ci(security): exempt the TruffleHog action from the AGPL licence denial Pinning the action made dependency review evaluate it for the first time. It runs unmodified in CI and is not linked into or shipped with anything. |
||
|
|
d953058d24 |
chore: remove the unused pezkuwi-config/chains.json copy (#22)
Nothing in the build, the code or the workflows reads this file; the app fetches chains from pezkuwi-wallet-utils (CHAINS_URL in runtime/build.gradle). The copy had not changed since February and still carried Nova's Infura project keys in its Ethereum node URLs. |
||
|
|
46d7e66f99 |
Fix open Dependabot and code scanning alerts (#21)
* build(rust): bump vulnerable crates in native binding lockfiles - rand 0.8.5 -> 0.8.6 (GHSA-cq8v-f236-94qc) in hydra-dx-math and sr25519-bizinikiwi - keccak 0.1.5 -> 0.1.6 (GHSA-3288-p39f-rqpv) in hydra-dx-math and sr25519-bizinikiwi - bytes -> 1.11.1 (GHSA-434x-w66g-qw3r) in hydra-dx-math and metadata_shortener - time 0.3.41 -> 0.3.47 (GHSA-r6v5-fh4h-64xc) in hydra-dx-math - tracing-subscriber 0.3.19 -> 0.3.20 (GHSA-xwfj-jgwm-7wp5) in hydra-dx-math Lockfile-only updates via cargo update --precise; Cargo.toml requirements are unchanged. time 0.3.47 pulls serde 1.0.229/serde_core and requires rustc 1.88, which the stable toolchain used by CI satisfies. * ci: restrict default GITHUB_TOKEN permissions to contents: read None of these workflows write through GITHUB_TOKEN: artifact upload, Firebase, S3, Play Store, gh-pages and the Appium dispatch all use their own credentials. Reusable workflows they call inherit the same cap. * fix(dapp): send only fixed, JSON-quoted error messages to dApp pages The polkadot.js responder forwarded Throwable.message of any rejection error to the page and both responders interpolated the message into JavaScript without escaping. Map polkadot.js rejections to a fixed public message (unknown errors become "Request failed"), give MetamaskError an explicit publicMessage, and quote both with JSONObject.quote so a message can no longer break out of the string literal. * ci: stop installing the removed legacy SDK 'tools' package android-actions/setup-android installs 'tools platform-tools' by default. sdkmanager now fails with "Failed to find package 'tools'", which aborts dependency installation for every build and lint job. Only platform-tools is needed; nothing in the workflows uses the legacy tools directory. |
||
|
|
d8b31739e7 |
ci: fail the build when a 64-bit native library is not 16 KB aligned (#20)
* ci: fail the build when a 64-bit native library is not 16 KB aligned Play rejects updates whose 64-bit native libraries are not aligned for 16 KB memory pages, but nothing in the build says so. A misaligned .so surfaces only as a policy issue in Play Console, days after a release has gone out — which is how one reached production here unnoticed. The check reads what the build actually produced rather than trusting the dependency list, because a single transitive dependency shipping an unaligned library is enough to fail the whole bundle. It walks every .aab and .apk under app/build/outputs, pulls each arm64-v8a and x86_64 .so, and compares its largest LOAD segment alignment against 16384. 32-bit ABIs are skipped: those devices use 4 KB pages. Verified against the v1.2.0 release bundle before it was cleaned up: 14 libraries scanned, and it caught libpl_droidsonroids_gif.so at 0x1000 — the one library Play flagged. A check that cannot fail on known-bad input is not a check. * test: make the tamper-detection test actually tamper checkTamperedDataFails wrote to encoded[lastIndex - 1] but computed the new value from encoded.last(). Whenever those two bytes already differed by exactly 0x01 the write was a no-op, the ciphertext stayed valid, decryption succeeded, and the expected AEADBadTagException never arrived — so the test failed for reasons unrelated to what it checks. One run in 256. Flip a bit in the byte being written instead, which changes the ciphertext every time. |
||
|
|
39dd67ba94 |
fix: drop the unused GIF library that blocks 16 KB page size support (#19)
Play rejects updates whose native libraries are not aligned for 16 KB memory pages, enforced since Nov 1 2025. Measuring the released bundle showed exactly one library short, and only on one ABI: arm64-v8a 7/7 aligned at 0x4000 x86_64 6/7 aligned; libpl_droidsonroids_gif.so at 0x1000 That library comes from pl.droidsonroids.gif:android-gif-drawable 1.2.19, inherited from upstream and never used here: no GifDrawable, GifImageView, GifTextView or pl.droidsonroids reference exists in any Kotlin, Java or XML file in the project. Removing it beats upgrading to 1.2.32 — an unused dependency should not be carried at any version, and this also drops roughly 175 KB of dead native code across four ABIs. Everything else in the bundle was already aligned, and jniLibs.useLegacyPackaging is already false, so nothing more is needed for the requirement. |
||
|
|
27aff873a6 |
feat: tell users a new version exists, and let them rate the wallet from inside it (#17)
Two gaps, both invisible until you look for them. There was no update mechanism at all. Someone on an old build stayed on it until they happened to open the Play Store on their own. For a wallet that is worse than an inconvenience: today's multisig signing fix would have reached nobody who was not already looking. InAppUpdates asks Play on every foreground. A user a few days behind gets the flexible flow — the download runs in the background and the wallet stays usable, because interrupting someone mid-transfer to force an update is its own kind of harm. Past fourteen days of staleness, or on a release marked priority 4+ in Play Console, it switches to immediate. onResume finishes an interrupted immediate update and installs a flexible one that completed while the app was backgrounded; without that the first leaves a user stuck and the second never installs. Ratings had the same shape of gap: people who would happily rate the wallet never do, because nothing ever asks. Play's in-app card asks without sending them to the store. Play answers neither "has this user rated" nor "what did they choose" — by design. It also throttles to a handful of showings a year and silently drops the rest. So the gates in AppReviewTracker are not there to avoid nagging, which Play already handles; they exist to spend those few real chances well: three successful operations, three days since first use, ninety since the last ask, and not within two days of an error. Recording sits in RealExtrinsicService, the single point every on-chain action passes through, so transfers and staking are covered without a hook per screen. The tracker swallows everything it touches — a rating counter must never be able to fail a transfer. Both features no-op outside a Play install, so neither can be verified from a Firebase build; that needs an internal testing track. Version 1.2.0. |
||
|
|
56c37615a0 |
fix(multisig): approve operations on Pezkuwi chains again by dropping the custom era extension (#16)
* diag: probe both era encodings when building the multisig weight-estimation extrinsic
Approving a multisig operation on Pezkuwi Asset Hub fails with "Failed to encode
extension CheckMortality". The on-device stack puts it in wrapInFakeExtrinsic,
reached only from estimateCallWeight — asMulti needs a max_weight, so a throwaway
signed extrinsic is built to measure the inner call. Plain transfers never reach
that path, which is why sending HEZ works while approving does not.
The same failure on Polkadot Asset Hub was fixed by gating the era encoding on
chain identity, and Pezkuwi Asset Hub satisfies that gate: its genesis hash matches
the constant, so PezkuwiCheckImmortal should already be in use. Reading the code
cannot say which side actually fails.
So build the extrinsic both ways and report each outcome with its full cause chain.
One reproduction then names the encoding the chain accepts, and the permanent fix
follows from that rather than from another guess.
Diagnostic only — the probe and the DIAG constant come out with the real fix.
* style: drop the blank line ktlint flags before the closing brace
* fix(multisig): approve operations on Pezkuwi chains again by dropping the custom era extension
Approving a multisig operation on Pezkuwi Asset Hub failed with "Failed to encode
extension CheckMortality", so no signatory could approve from the wallet — the
bridge treasury included. Initiating an operation worked, which made the break look
narrower than it was.
Only multisig reaches the failing code. asMulti needs a max_weight, so
estimateCallWeight builds a throwaway signed extrinsic to measure the inner call.
Plain transfers never build one, which is why sending HEZ kept working.
PezkuwiCheckImmortal was the cause, not the cure. It passes a raw
DictEnum.Entry("Immortal", null) as the era, and the SDK rejects it:
EncodeDecodeException: Entry(name=Immortal, value=null) (Entry)
is not a valid instance of Era (EraType)
The premise it was written on — that Pezkuwi's pezsp_runtime Era breaks the standard
codec — does not hold. Measured on device against Pezkuwi Asset Hub, the standard
CheckMortality(Era.Immortal) encodes without complaint, and ExtrinsicBuilderFactory
has been signing every ordinary transfer through it with a mortal era all along. The
era type resolves from metadata by index, so the renamed module path never mattered.
So the chain gate goes and both custom extensions go with it: PezkuwiCheckImmortal
had one caller, PezkuwiCheckMortality had none. One path for every chain.
Verified on device (Pezkuwi Asset Hub, versionCode 340): a build that tried both
encodings logged the custom one failing and the standard one succeeding, then
carried a real 3-of-5 approval through to MultisigExecuted with the inner call Ok
and 10 HEZ leaving the multisig.
|
||
|
|
b616ca23d6 |
Merge pull request #15 from pezkuwichain/fix/fcm-token-retry
fix(push): retry FCM token requests instead of failing on the first timeout |
||
|
|
8c4550780e |
fix(push): retry FCM token requests instead of failing on the first timeout
Enabling notifications started failing with java.util.concurrent.ExecutionException: java.io.IOException: SERVICE_NOT_AVAILABLE SERVICE_NOT_AVAILABLE is Firebase saying its endpoint is momentarily unreachable. It is transient, and Firebase's own guidance is to retry with backoff. requestToken() made a single attempt with no catch, so a few seconds of that ended the flow and put a raw stack trace in front of the user. Nothing about the app or its Firebase project changed — the project is healthy and the API key still authenticates. The app simply had no tolerance for a service that is documented as intermittently unavailable, so it worked until the first time Google was slow to answer. Now four attempts with 1s/2s/4s backoff. The wrapping matters: the IOException arrives inside an ExecutionException, so catching IOException directly would never have matched and the retry would have been dead code. The check walks the cause chain instead. Failures that are not network-related — a wrong google-services.json, a missing Play Services install — are rethrown on the first attempt, since retrying those only delays the same error. |
||
|
|
df745e9147 |
fix: point CHAINS_URL/EVM_ASSETS_URL/etc back at wallet-utils master
wallet-utils master now has the coordinated Bitcoin/Tron/Solana chain config content (its own compat-revert was reverted back and merged with pending/post-fix-release now that this app version can parse it) - drop the temporary pending/post-fix-release override used during development. |
||
|
|
0603e079e2 |
Merge PR #14: Support first-signer case for /open/multisigOperation deep link
Support first-signer case for /open/multisigOperation deep link |
||
|
|
d999f48891 |
fix: gate PezkuwiCheckImmortal on chain identity, not extension presence
Confirmed via on-device logcat trace: approving a multisig operation on Polkadot Asset Hub failed with "Failed to encode extension CheckMortality" because isPezkuwi checked for the "AuthorizeCall" signed extension, which Polkadot Asset Hub also declares - so PezkuwiCheckImmortal's raw DictEnum value was used there too, and it isn't a valid instance of Polkadot's own Era type codec. Switched the gate to the existing chain.isPezkuwiChain (genesis-hash based) check already used for the bizinikiwi signing context split. Also removes the temporary diagnostic logging added while tracing this bug and the earlier deep-link routing fix. |
||
|
|
e0feb9581b |
feat: route USDT buy/sell to Bridge flow when no provider is available
USDT has no buy/sell provider on either bridge leg (Pezkuwi wUSDT / Polkadot USDT); Bridge is the actual way to acquire it there, so route straight to it instead of a dead-end "not supported" message. |
||
|
|
3f6e6441c6 |
debug: trace isPezkuwi detection and CheckMortality encoding failure
Real on-device failure while approving a multisig operation on Polkadot Asset
Hub: 'Failed to encode extension CheckMortality'. isPezkuwi is detected via
signedExtensions.any { it.id == "AuthorizeCall" } - confirmed via direct
metadata inspection that AuthorizeCall exists on BOTH Polkadot Asset Hub and
Pezkuwi Asset Hub (both on Metadata V16), so this heuristic can't actually
distinguish the two chains. Need to confirm what isPezkuwi evaluates to at
the moment of the real failure, and exactly where the throw happens
(setTransactionExtension vs buildExtrinsic), before proposing a fix.
|
||
|
|
b700637d3d |
debug: trace RootViewModel.handleDeepLink top-level entry; add PEZ Airdrop label + trust-score gate to Mining Simulation
Deep link debug: DeepLinkModule wiring at app/root/di/deeplink/DeepLinksModule.kt confirmed MultisigDeepLinks IS included in the assembled handler list (ruling that out), yet the earlier MultisigOperationDetailsDeepLinkHandler-level Log.e calls never fired at all - not even the very first one in matches(). Logging one level up, at the true entry point, to see the raw Uri/scheme/authority/path as parsed and the final Result, before guessing further. Mining Simulation: adds a 'PEZ Airdrop' label above the square (user request), and refuses to activate + shows an explicit error if trust score is 0, instead of silently starting a permanently-zero-rate session. |
||
|
|
fe8f907c12 |
debug: add temporary Log.e tracing to multisig deep link handler
The manifest fix (
|
||
|
|
84bbff68ba |
fix: use literal scheme/host in the /open/... deep link intent-filter
android:scheme="@string/deep_linking_scheme"/android:host="@string/deep_linking_host" compiled fine but never resolved at runtime - confirmed by decoding the actual built APK's binary manifest, which showed the raw unresolved resource ids (@7F13034E/@7F13034A) instead of literal values, unlike every sibling intent-filter in this same manifest (buy-success, request, wc, https), which all use literal strings and work correctly. PackageManager can't match a <data> scheme/host that never resolves, so this intent-filter - covering every /open/... deep link, including the just-added first-signer multisig operation case (PR #14) - has never been reachable on any real device since it was written, regardless of the correctness of the Kotlin handling code behind it. Confirmed by attempting the actual deep link on-device (ADB VIEW intent, unresolved) before finding this. |
||
|
|
f83c3549b0 | fix: point Mining Simulation info button at the correct Telegram invite link | ||
|
|
d4da42c07d |
feat: add Mining Simulation card to fill empty space in Pezkuwi Trust Score card
Cosmetic, client-side-only preview of a trust-score-weighted PEZ emission share, meant to incentivize referral usage (higher trust score -> visibly faster mining). Not tied to any real distribution mechanism or backend. - MiningSimulationFormula: pure calc. Rate per minute = (92.5M PEZ / 43200 min era) * (trustScore / 500,000 reference total) - trust score is a direct multiplier so zero trust score always yields zero rate. Diamonds only accrue while a 24h session is active. - MiningSimulationRepository: local-only persistence via the existing Preferences wrapper (same pattern as BannerVisibilityRepository), keyed per accountId. Tapping the square freezes the live total as the new base and starts a fresh 24h session - never resets progress on tap. A full 43200-minute era rolling over resets the total to 0 (that era's pool is considered distributed) independently of session taps. - UI: square button in the dashboard card's previously-empty right column, red when inactive (needs a tap), gold (#FDB813, matching the existing Trust Score color) while actively mining. Small Telegram icon opens https://t.me/DKSKurdistanBot via the existing Browserable mixin. |
||
|
|
40f8db48bc |
fix: resolve asset by on-chain Statemine id, not local Chain.Asset.id
Root cause found via device-side Log.e tracing (now removed): the on-chain query, off-chain call-data fetch, and call decode all worked correctly - a real pending approval was found and its call decoded - but chain.assetsById is keyed by this app's own local Chain.Asset.id, which is NOT the same as the raw pallet_assets id these constants hold (e.g. USDT is local id 1 but on-chain id 1984 on Polkadot Asset Hub - they only happened to match by coincidence on Pezkuwi Asset Hub, masking the bug there). Every result was silently dropped at this single lookup. Fixed by reverse-resolving through findAssetByStatemineAssetId instead of indexing assetsById directly. |
||
|
|
63dd3e2d03 |
debug: add temporary Log.e tracing to Pending Signatures pipeline
Nothing renders on-device despite the multisigsApiUrl fix and a confirmed real pending approval on-chain, with zero exceptions surfacing anywhere - every runCatching in this path swallows silently with no logging. Adding Log.e at each step (account resolution, signatory gate, on-chain keys/entries, off-chain fetch, call decode, transfer parse) to find where it actually drops the result. To be removed once the real cause is found. |
||
|
|
e716e6e277 |
Fix Pending Signatures: query the bridge's own hardcoded multisig, not the generic multisig-account feature
The previous commit reused MultisigPendingOperationsService, but that service only syncs accounts formally registered as a MultisigMetaAccount in this wallet - it silently returns an empty NoOpSyncer for every other account type. The bridge's 5 signatories (Serok etc.) use their own regular wallets to approve calls against the bridge's separate, hardcoded multisig (BridgeMultisigConstants) - they never "are" that multisig account, so the feature was structurally guaranteed to show nothing, not just empty by coincidence. Fix queries the bridge's own multisig accounts directly, mirroring the exact pattern this screen's existing renewal-signing code already uses (BridgeMultisigRuntimeApi's runtime-metadata accessors, a local mirror of feature-account-impl's off-chain call-data indexer client - same module-boundary reasoning already documented in that file) rather than the generic, differently-scoped service: - BridgeMultisigInteractor.getPendingApprovals(): enumerates Multisig.Multisigs entries for both bridge multisig accounts via QueryableStorageEntry2.keys()/entries() (a general runtime-storage capability, not multisig-feature-specific), fetches real call content from the same off-chain indexer the generic feature uses (also general-purpose, keyed by address+hashes - never required the account to be a MultisigMetaAccount either), and filters to calls this signatory hasn't approved yet. - BridgeMultisigInteractor.submitApproval(): reuses composeBridgeMultisigAsMulti generalized to an arbitrary call+ timepoint (previously only used for the renewal call) - refuses to proceed if the call content is unknown, never blind-signs. - BridgeViewModel formats the real parsed transfer (amount+destination) via AssetSourceRegistry.tryParseTransfer, already used elsewhere for the exact same "decode a transfer call" job - no fabricated preview data. Reverts the feature-multisig:operations cross-feature dependency and FeatureApi wiring added in the previous commit - no longer needed since everything now lives in this screen's own existing self-contained domain layer, matching how the rest of BridgeMultisigInteractor already works (and already explains, in its own doc comments, why a synthetic MultisigMetaAccount was deliberately avoided for exactly this reason). |
||
|
|
6f14c8bf05 |
Move Pending Signatures from the wallet home screen to the Bridge screen
Wrong screen in the previous commit - moved it to sit right below the existing per-leg renewal sign buttons on the Bridge input screen, which is where it was actually asked for: a signatory renewing their own wUSDT/Polkadot USDT allowance there should also see (and be able to jump to) other pending multisig operations - e.g. someone else's large bridge swap - waiting on their signature, without navigating elsewhere. BalanceListFragment/ViewModel/Module are reverted to their prior state. The reusable pieces (PendingSignatureModel, item_pending_signature_row layout) are kept and repurposed for the Bridge screen; the RecyclerView SingleItemAdapter/card layout built for the home screen are removed since Bridge is a plain (non-RecyclerView) fragment - rows are inflated directly into a LinearLayout container instead, same underlying data and MultisigCallFormatter reuse as before. The feature-assets -> feature-multisig:operations dependency and the FeatureApi wiring (AssetsFeatureComponent/Dependencies/Holder) from the previous commit stay as-is - Bridge is the same Gradle module, so no change needed there. |
||
|
|
707d1baba4 |
Add a Pending Signatures card to the wallet home screen
Surfaces multisig operations awaiting the current signatory's own approval directly on the main balance screen, instead of requiring navigation to the separate pending-operations list. Each row shows the formatted amount, destination, chain, and approval progress, with a red Sign button that opens the existing operation-details/approve flow (fee estimation, signatory balance check, and validation are all already handled there - not reimplemented here). Reuses the already-tested MultisigCallFormatter from feature-multisig:operations (added as a new feature-assets dependency, exposed via the standard FeatureApi/FeatureContainer pattern - see AssetsFeatureHolder/AssetsFeatureComponent/AssetsFeatureDependencies) rather than re-deriving call-preview formatting independently. The card follows the same SingleItemAdapter + ConcatAdapter pattern as the existing Pezkuwi Dashboard card on the same screen. Once a pending operation is actually signed, it naturally drops off this list on the next sync (no separate client-side "signed" state is tracked in parallel with the real on-chain approval status). String only added to the base (English) strings.xml for now - not yet translated into the other ~14 locales this app otherwise maintains. |
||
|
|
e1a010b779 |
Fix: keep net.i2p.crypto.eddsa classes from being stripped by R8
Signer.kt/SignatureVerifier.kt in substrate-sdk-android look up the "EdDSA" JCA provider by name at runtime (Signature.getInstance(..., "EdDSA")), backed by net.i2p.crypto:eddsa's EdDSASecurityProvider. With no keep rule, R8 stripped/renamed its classes in the minified release build, so the provider's own registered service implementation could no longer be found - "class configured for Signature (provider: EdDSA) cannot be found", reproduced on-device sending SOL (every Solana transaction signs with Ed25519, so this path is always hit). |
||
|
|
b09ba4c303 |
Remove dead, non-functional BizinikiwSr25519Signer stub
Never referenced anywhere (self-declaration only, confirmed via grep), sitting since the initial commit. Its RistrettoPoint.multiply()/add() are both no-ops returning `this` unchanged, BASE is all-zero bytes, and keccakF1600() never writes output back into the Strobe state - none of this could ever produce a valid signature. The real, live bizinikiwi signing path is the native JNI binding in bindings/sr25519-bizinikiwi/ (PezkuwiKeyPairSigner -> BizinikiwSr25519), unaffected by this removal. Leaving broken placeholder crypto sitting in a wallet's signer package is its own audit red flag even when provably unused. |
||
|
|
16427654ae |
Remove CHANGELOG_PEZKUWI.md dev-notes file, not app source/APK-related
Was a context-recovery scratch doc from the initial rebrand port (Feb 2026): self-contradicted (top says debug cleanup done, bottom checklist still unchecked), and its only non-obvious content (SDK/runtime type-lookup gotchas) is already explained in the actual source docstrings (PezkuwiCheckMortality.kt, PezkuwiAddressConstructor.kt) or preserved in memory for future reference. |
||
|
|
fc6bfa2867 |
Revert "Gitignore scratch/planning-note naming patterns"
This reverts commit
|
||
|
|
335859c9a0 |
Gitignore scratch/planning-note naming patterns
Prevents a repeat of docs/PACKAGE_STRUCTURE_REBRAND.md (a never-executed planning draft that sat in the repo for months) - working notes belong in a scratchpad, not the tracked tree. Real docs (BRAND.md, README.md, docs/*) are unaffected. |
||
|
|
43af39bfe7 |
Remove stale, never-executed package-rebrand planning draft; gitignore this pattern
docs/PACKAGE_STRUCTURE_REBRAND.md was a 2026-01-23 planning note (status: BEKLEMEDE, never actioned, references a contributor's personal machine path) that had been sitting in the repo as dead weight since. Real, maintained docs (BRAND.md, README.md, docs/*) are unaffected. |
||
|
|
163e68dcd3 |
Correct the previous crash fix: revert schema, add a real tolerant reader instead
The previous commit's SafeOptional/custom() field wrapper was wrong and broke real tests (RealLocalAccountsCloudBackupFacadeTest, Solana/Tron backfill migration tests - Mockito WantedButNotInvoked, IllegalArgumentException). Root cause of that failure: EncodableStruct.get() (in the external substrate-sdk-android library) only returns null for an unset field when field.dataType is specifically an instance of the library's own `optional<*>` class - not any DataType that merely behaves like one. optional<T> is not open, so no wrapper class can satisfy that check; swapping in a custom DataType just moves the same crash from read-time to access-time. Correct fix: leave the MetaAccountSecrets schema exactly as it always was (plain `.optional()`, real library instances, so get() keeps working), and instead add readMetaAccountSecrets() - a resilient top-level reader that tries the normal Schema.read() first and, only if that throws, falls back to reading each field by hand in schema order, stopping at the first one whose bytes don't exist and leaving every field after it genuinely unset. Because those fields were never set, EncodableStruct.get()'s existing (correct) optional-field handling returns null for them exactly as it already does for any account that was never migrated - no library behavior is being routed around, just extended to tolerate a shorter/older stored blob. |
||
|
|
9a11dc2c3d |
Fix crash reading MetaAccountSecrets for accounts predating Tron/Bitcoin/Solana
Found on a real device: opening the backup/export screen for an existing wallet crashed with java.lang.IndexOutOfBoundsException: Cannot read 412 of 412 at .../scale/dataType/optional.read at .../scale/Schema.read (x3) at SecretStoreV2$getMetaAccountSecrets$2.invokeSuspend Root cause: MetaAccountSecrets is a positional (SCALE) binary schema. optional<T>.read() unconditionally reads a presence-flag byte with no EOF handling - reading a blob that predates a trailing field (written before that field existed) throws instead of yielding null. This is also why Solana's own address was never getting backfilled: the migration's own read of the account's stored secrets was throwing on every attempted run, silently caught by its own per-account try/catch. Confirmed via substrate-sdk-android's actual source (Dsl.kt/Delegate.kt) that Tron/Bitcoin's identical schema-growth pattern carried the exact same latent risk - it likely only avoided crashing so far by chance byte-alignment in previously-stored blobs, not because the format tolerates it. Fix: read Tron/Bitcoin/Solana's keypair/derivationPath fields (every field added after the original Substrate+Ethereum schema) through a SafeOptional DataType that catches a failed read and returns null, via the library's own custom() field-declaration escape hatch. Write behavior is byte-for-byte unchanged - only reading a shorter/older blob now correctly yields null for fields it doesn't have, instead of crashing every caller of getMetaAccountSecrets (balance sync, signing, backup/export, this Solana backfill migration itself). |
||
|
|
db9962a00e |
Add SOL to default token order, right after TRX
Mirrors how TRX/BTC were inserted into this list when they shipped ( |
||
|
|
71e4c8dc7a |
Fix CI: sender/recipient hex fixtures in Solana transaction tests were 1 hex digit short
Both SolanaTransactionTest and RealSolanaTransactionServiceTest carried a transcription error from the earlier solders cross-validation: the sender/recipient pubkey hex strings (and one of expectedMessageHex's concatenated chunks) were each missing their trailing hex digit, producing odd-length hex that BouncyCastle's decoder throws on (StringIndexOutOfBoundsException) - all 5 SolanaTransactionTest cases failed at field-init time as a result. Re-derived every fixture programmatically from the same solders-verified reference message (rather than hand-splitting the hex string again) and confirmed the full round trip (build -> compare) matches byte-for-byte. |