01a08fbb - Add allowlisted WalletConnect for Aktionariat and Frankencoin - #984
TaprootFreakAI wants to merge 73 commits into
Conversation
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.
754242c to
68775c4
Compare
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.
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%).
|
EN: DE: DetailsHead Closed on the way here: coverage-ignore reasons that lcov honours; Rejected as already decided or not a defect: SessionView catalog wrapper; Column spacing; catch-all Comment gate at post time: no issue comments, no reviews, no inline review comments, no unresolved review threads. |
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.comincluding subdomains (tokeninfo.aktionariat.com), plus the Aktionariat tenant hostshares.realunit.ch. Attested Verify origin only —metadata.urlis never the allowlist input. HTTPS is required. Userinfo,mailto:,javascript:, andwww.shares.realunit.chare rejected. VerifyVALIDis required;UNKNOWN,INVALID, andisScamare rejected and the pairing is disconnected.Entry points: Settings → Connect dApp (scanner), Pay/Send scanners intercept
wc:URIs, custom schemerealunit-wallet://wc?uri=…, nativewc:scheme, Androidintent://WalletConnect wrappers, andrealunit-wallet://investorpage/…opens the scanner.eth_sendTransactionandeth_signTransactionare rejected without a prompt (no broadcast path).personal_signand typed data stay in scope with user confirmation; typed data with an unconfigured chain is rejected.WalletKit is not initialized at boot. Production
SecureStorageuses 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.