Skip to content

01a08fbb - Add allowlisted WalletConnect for Aktionariat and Frankencoin - #984

Open
TaprootFreakAI wants to merge 73 commits into
stagingfrom
feature/01a08fbb-walletconnect-allowlist
Open

TaprootFreakAI wants to merge 73 commits into
stagingfrom
feature/01a08fbb-walletconnect-allowlist

Conversation

@TaprootFreakAI

@TaprootFreakAI TaprootFreakAI commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

EN:
The RealUnit wallet can now pair with WalletConnect QR codes and deeplinks, but only for Aktionariat and Frankencoin origins.
Any other provider (for example Etherscan) is rejected with a message that WalletConnect is not supported for that provider.
Login on the Aktionariat investor page uses personal_sign; the app does not broadcast transactions over WalletConnect.
Visual-regression goldens cover the Settings dApp row, the scan page, and the session confirm states.

DE:
Die RealUnit-Wallet kann WalletConnect-QR-Codes und Deeplinks paaren, aber nur für Origins von Aktionariat und Frankencoin.
Jeder andere Anbieter (zum Beispiel Etherscan) wird mit dem Hinweis abgelehnt, dass WalletConnect für diesen Anbieter nicht unterstützt wird.
Der Login auf der Aktionariat-Investor-Page nutzt personal_sign; die App sendet über WalletConnect keine Transaktionen.
Die Visual-Regression-Goldens decken die dApp-Zeile in den Einstellungen, die Scan-Seite und die Session-Bestätigung ab.

Details

Wallet Cloud project id (public client id) is the default WALLETCONNECT_PROJECT_ID.
Allowlist: aktionariat.com / frankencoin.com including subdomains (tokeninfo.aktionariat.com), plus the Aktionariat tenant host shares.realunit.ch. Attested Verify origin only — metadata.url is never the allowlist input. HTTPS is required. Userinfo, mailto:, javascript:, and www.shares.realunit.ch are rejected. Verify VALID is required; UNKNOWN, INVALID, and isScam are rejected and the pairing is disconnected.
Entry points: Settings → Connect dApp (scanner), Pay/Send scanners intercept wc: URIs, custom scheme realunit-wallet://wc?uri=…, native wc: scheme, Android intent:// WalletConnect wrappers, and realunit-wallet://investorpage/… opens the scanner.
eth_sendTransaction and eth_signTransaction are rejected without a prompt (no broadcast path). personal_sign and typed data stay in scope with user confirmation; typed data with an unconfigured chain is rejected.
WalletKit is not initialized at boot. Production SecureStorage uses an isolated Android/iOS namespace so WalletKit cannot wipe PIN/mnemonic/DB keys; a one-shot migrate copies existing keys and rolls back a mismatched copy. Delete Wallet / Forgot PIN disconnects persisted sessions.
Second scoped network exception documented in CONTRIBUTING.md.

@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review September 12, 2026 09:18
@TaprootFreakAI
TaprootFreakAI marked this pull request as draft September 12, 2026 10:04
@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review September 14, 2026 07:57
@TaprootFreakAI
TaprootFreakAI marked this pull request as draft September 14, 2026 08:58
@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review September 14, 2026 09:43
@TaprootFreakAI
TaprootFreakAI marked this pull request as draft September 14, 2026 11:15
@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review September 14, 2026 11:28
@TaprootFreakAI
TaprootFreakAI marked this pull request as draft September 14, 2026 13:29
@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review September 14, 2026 14:12
@TaprootFreakAI
TaprootFreakAI marked this pull request as draft September 14, 2026 17:14
@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review September 14, 2026 18:36
@TaprootFreakAI
TaprootFreakAI marked this pull request as draft September 14, 2026 20:08
@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review September 14, 2026 20:19
@TaprootFreakAI
TaprootFreakAI marked this pull request as draft September 14, 2026 22:20
@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review September 14, 2026 23:09
@TaprootFreakAI
TaprootFreakAI marked this pull request as draft September 14, 2026 23:40
@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review September 14, 2026 23:54
@TaprootFreakAI
TaprootFreakAI marked this pull request as draft September 15, 2026 00:43
@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review September 15, 2026 01:00
@TaprootFreakAI
TaprootFreakAI marked this pull request as draft September 15, 2026 07:21
@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review September 15, 2026 07:47
@TaprootFreakAI
TaprootFreakAI marked this pull request as draft September 15, 2026 08:11
@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review September 15, 2026 09:21
@TaprootFreakAI
TaprootFreakAI marked this pull request as draft September 15, 2026 09:38
@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review September 15, 2026 09:48
@TaprootFreakAI
TaprootFreakAI marked this pull request as draft September 15, 2026 10:42
Add Reown WalletKit as a wallet so the app can pair from a WalletConnect
QR or deeplink, confirm personal_sign, and reject any other origin.
Reject UNKNOWN and INVALID verification so a dApp cannot spoof an
allowlisted metadata URL. Treat shares.realunit.ch as the Aktionariat
tenant host.
Namespace FlutterSecureStorage so WalletKit cannot wipe the PIN and
DB keys. Allowlist only Verify-attested origins, disconnect rejected
pairings, and add cubit plus deeplink tests for wc: intercepts.
1.5.x pulls pointycastle 4 and cannot resolve against the app pin.
Pass/fail is uninstrumented flutter test; coverage is collected only
on the floor surface.
Uninstrumented flutter test on macos-latest still ran past 90 minutes
before the floor-surface coverage step could start.
macos-latest cancelled the uninstrumented suite at 91 and 120 minutes.
The Visual Regression runner finishes the same tests in minutes; its
timeout is 30 so it can wait if Analyze holds the one slot first.
Visual Regression timeout stays 15 minutes (queue wait is not job
timeout). Comments now match both jobs using the one runner.
The job cancelled at 30 minutes once uninstrumented tests, floor-surface
coverage, and lcov filtering ran on the shared runner.
Self-hosted Analyze cancelled at 60 minutes. Reinstalling lcov every
run is wasted when the runner already has it.
Uninstrumented tests finished in two minutes. A second --coverage
invocation with an exploded file list produced no log for 87 minutes.
One instrumented flutter test on the self-hosted runner.
Uninstrumented tests finish in two minutes. Passing every cubit spec
as a file to flutter test --coverage produced no log for 87 minutes.
Coverage now runs on test/packages/ and unique cubit/bloc directories.
Tier 0/1 still run in the uninstrumented suite. lcov comes from
test/packages/ and cubit/bloc directories, not a second full invocation.
Tier 0/1 pass/fail is uninstrumented. Coverage is collected from
test/packages/ and cubit/bloc directories.
Uninstrumented tests still finish in two minutes. Coverage on
test/packages/ and cubit/bloc directories was still running at 28
minutes when the 30-minute job timeout cancelled Analyze.
Feature parent directories pulled widget tests into --coverage and
the job was still running at 58 minutes. Restrict the instrumented
run to test/packages/ and directories named cubit, cubits, or bloc.
Cubit tests that sit next to pages are not under a cubit/ folder.
Pass those files explicitly without taking the feature parent dir,
which would pull widget tests back into --coverage.
@TaprootFreakAI
TaprootFreakAI force-pushed the feature/01a08fbb-walletconnect-allowlist branch from 754242c to 68775c4 Compare September 15, 2026 10:59
Align README, testing.md, the Analyze timeout comment, and the
golden outage fallback with the packages + cubit-dir + sibling
coverage collect.
GitHub-hosted macOS cancelled the uninstrumented suite at 91 and 120
minutes. The self-hosted outage path must not keep timeout-minutes 30.
The hosted fallback raises timeout-minutes to 180. Put it back when
the self-hosted runner returns so the one slot is not held that long.
@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review September 15, 2026 12:02
@TaprootFreakAI
TaprootFreakAI marked this pull request as draft September 15, 2026 12:04
Rebase kept the staging PNG. The self-hosted Visual Regression run
rendered the WalletConnect settings row; take that test image.
Analyze & Test keeps the uninstrumented suite (timeout 15). Coverage
collect waits for Analyze and Visual, then runs the floor-surface
instrumented tests with a 90-minute budget so goldens are not queued
behind a hung lcov run.
A job-level if replaces GitHub's implicit skip-on-failed-needs. Add
success() so Coverage collect does not occupy the one runner slot after
a red Visual. Docs coverage command matches the expanded reporter.
success() on the required floor job would skip it after a failed
collect, and a skipped required check counts as passing. Run the floor
with always() and fail closed unless Coverage collect succeeded.
Extra text after coverage:ignore-start is not recognized, so the
matching ignore-end throws FormatException and flutter test --coverage
never finishes. Reason stays on the previous line.
Bare coverage:ignore-file so the Reown adapter is omitted from lcov.
Collect also runs *_states_test.dart. Ignore-start stays a bare token.
Unit tests cover remaining request-prompt, seed copyWith, send-amount
balance, registration titles, and settings-event constructors.
…orts

const constructors do not count as coverage. Instantiate the event
non-const next to the other SettingsEvent subclasses. Flutter imports
come before other packages.
S.localizationsDelegates is not generated. Use pumpApp so analyze
sees S.delegate like the rest of the suite.
utf8.decode(allowMalformed: true) does not throw for the inputs we
can construct. The catch clause itself was the last DA:0 on the
floor surface (99.9%).
@TaprootFreakAI

Copy link
Copy Markdown
Collaborator Author

EN:
Ready after 21 review passes.
The RealUnit wallet pairs WalletConnect QR codes and deeplinks only with Aktionariat and Frankencoin origins.

DE:
Bereit nach 21 Review-Durchläufen.
Die RealUnit-Wallet paart WalletConnect-QR-Codes und Deeplinks nur mit Origins von Aktionariat und Frankencoin.

Details

Head 69ee8e3b6c242139ef1c005324d635ec8ac0e923 (verified). Four review lanes at this head: quality and logic both complete with zero remaining findings.

Closed on the way here: coverage-ignore reasons that lcov honours; coverage:ignore-start and coverage:ignore-file kept as bare tokens (reason on the previous line) so package:coverage does not hang collect; the unreachable hex-decode FormatException catch wrapped so the floor is 100%; visibility allow-list for const-only config and the Reown adapter; pair errors leave the session page; _sessionLive only after a successful pair and dropped while uninitialized; policy-fail paths always emit; request topic mapping kept until relay respond succeeds; empty BitBox 0x signatures reject instead of approving; device-cancel pops the confirm page; wipe latches the session dead before wallet delete; dest skip only when a namespaced key already matches legacy; Settings referral-eligible golden includes the WalletConnect row; Analyze & Test is the uninstrumented suite only; Coverage collect waits for Analyze and Visual; Coverage Floor Gate stays red when collect does not succeed; ClearAccountCurrencyEvent is constructed non-const so coverage hits the constructor; KYC registration titles pump through pumpApp.

Rejected as already decided or not a defect: SessionView catalog wrapper; Column spacing; catch-all Text('$error') on other approve errors; cubit folder split; cubit final class; hex personal_sign UTF-8 contract; bare-host https prepend; request-id map keyed by topic; reason text on the same token as coverage:ignore-line (breaks lcov); createInstance-on-wipe; epoch/generation beyond the _sessionLive latch; fake_async vs 10ms delay; Reown ignore-file allowlist; scan-page final class (siblings in the same files are class).

Comment gate at post time: no issue comments, no reviews, no inline review comments, no unresolved review threads.
Mergeability at post time: MERGEABLE.
Dispatch 34997476366 at this head: Analyze & Test, Visual Regression, Coverage collect, Coverage Floor Gate success.

@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review September 16, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant