Skip to content

Integrate Grin with the shared Slatepack UI - #1540

Draft
sneurlax wants to merge 1 commit into
feat/grin-e2efrom
feat/grin-ui
Draft

sneurlax wants to merge 1 commit into
feat/grin-e2efrom
feat/grin-ui

Conversation

@sneurlax

@sneurlax sneurlax commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Summary

Integrate Grin with #1507's shared Slatepack UI: manual send/receive, invoices, finalize/repost/cancel, transaction details, payment proofs, recipient encryption, Grin transport/address behavior, theme/explorer entries, and wallet lifecycle UI. Grin-specific wallet behavior remains behind SlatepackInterface; Epic and MWC keep their existing engines and policies.

Stack

  1. staging 05b0ad33bbfa5fe8da9073241562bb5461b8ad8d
  2. Share the Epic Cash and MWC Slatepack UI #1507 31224b637f96f995ff1508db5961e12c17721f78
  3. Add Grin wallet core integration #1538 026287986a4eccdd0ab8b2a453a40274da512ea7
  4. Add Grin native end-to-end test coverage #1539 7b439b79407db524cf71843a6274fcaa53f4ac4f
  5. this PR fe1c3a306fde3a29bb6f19c8eeeeed821486410c

Merge and retarget in that order. Keep this PR draft until its prerequisites merge and every resulting CI run remains green.

Review fixes in this stack

  • successful Epic finalize with the pinned plugin is treated as broadcast; MWC retains its explicit broadcast result;
  • successful Grin finalize uses the native posted result; only an observed posted=false permits cancelling a finalized transaction, while successful/unknown broadcasts cannot be cancelled;
  • successful repost persists posted=true, updates a per-wallet in-memory observation before best-effort persistence, and immediately removes the unsafe Cancel action even if Isar replacement leaves stale live metadata or persistence throws;
  • manual Epic/MWC/Grin Slatepack sends bypass mismatched fee estimation and the normal confirmation/PIN flow, then show the wallet-created fee;
  • send/receive/invoice ownership is persisted immediately, closing self-import and self-invoice races before native history reaches Isar;
  • receive/finalize/invoice operations do not start a node refresh or the MWC listener-stop path;
  • native work starts only after its loading route is fully visible;
  • Grin close/delete wakes Tor waits and joins active scans before Isar/native teardown, preserving scan resume height and suppressing false unableToSync on intentional close;
  • abandoned higher-fee invoice payments are cancelled safely;
  • invoice and cancellation dialogs fit narrow mobile layouts;
  • raw Grin address pastes do not enter the payment-URI exception path;
  • Epic/MWC wallet engines, listeners, rescans, history merge, and lifecycle remain coin-specific.

Verification at this exact head

  • Independent M2 Max review of the complete stack plus a focused re-review of 63b36cc6…fe1c3a30: no blocker or remaining concern.
  • Final changed suite: 40 files, 470/470 passed, zero failures, independently on macOS; focused cache/persistence 15/15, repost-details UI 1/1, scan 12/12.
  • Real native Grin in-process chain at this exact head: 8/8 passed, including S1/S2/S3, I1/I2/I3, cancel/unlock, finalized-unposted repost, payment proof, restore/resume, reopen, and delete.
  • Exact-head macOS debug build succeeded (Stack Wallet.app, 515 MB); exact production-equivalent Linux debug build also succeeded.
  • Real Linux app via run-stack-wallet: created and synchronized an actual Grin wallet on desktop; exercised desktop Send/Receive/Slatepack; exercised mobile layout through Grin selection/add plus the shared mobile Slatepack flows on the previous production-equivalent head.
  • Both focused and full-stack git diff --check passed; tracked trees were clean. Analyzer diagnostics on touched legacy files predate this stack; the new lines introduce no warning/error diagnostics.
  • GitHub CI is green at this exact head, including both triggered runs, tests, Windows build scripts, Linux release bundle, Codecov patch, and Codecov project (run 44889144549, run 44889144561).

Dependency boundary

Stack depends only on https://github.com/cypherstack/grin_native at 5b56ce4f90b50be67154797cbfc1a401bd9ab778. There is no bare grin Dart dependency. Epic and MWC pins remain exactly those inherited from #1507.

Not covered by this acceptance run: physical Android/iOS devices, a public-mainnet transfer with real funds, real Grin Tor transport, MWCMQS, hardware wallets, or release signing. Mobile testing used Stack Wallet's real Linux app in its mobile layout plus widget tests down to 320 px.

@codecov

codecov Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 79.57938% with 301 lines in your changes missing coverage. Please review.
✅ Project coverage is 19.83%. Comparing base (7b439b7) to head (fe1c3a3).

Files with missing lines Patch % Lines
lib/pages/slatepack/request_invoice_view.dart 59.50% 66 Missing ⚠️
...wallet_view/sub_widgets/wallet_options_button.dart 0.00% 26 Missing ⚠️
...t/wallet_mixin_interfaces/slatepack_interface.dart 56.36% 24 Missing ⚠️
lib/pages/slatepack/verify_payment_proof_view.dart 76.84% 22 Missing ⚠️
lib/wallets/wallet/impl/grin_wallet.dart 93.50% 20 Missing ⚠️
..._view/sub_widgets/wallet_balance_toggle_sheet.dart 0.00% 19 Missing ⚠️
.../transaction_views/tx_v2/slatepack_tx_details.dart 85.71% 17 Missing ⚠️
...settings/wallet_settings_wallet_settings_view.dart 0.00% 14 Missing ⚠️
lib/pages/send_view/confirm_transaction_view.dart 86.17% 13 Missing ⚠️
...allet_view/sub_widgets/desktop_wallet_summary.dart 0.00% 13 Missing ⚠️
... and 13 more
Additional details and impacted files
@@                Coverage Diff                @@
##           feat/grin-e2e    #1540      +/-   ##
=================================================
+ Coverage          18.33%   19.83%   +1.49%     
=================================================
  Files               1159     1167       +8     
  Lines             115341   116564    +1223     
=================================================
+ Hits               21152    23117    +1965     
+ Misses             94189    93447     -742     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sneurlax
sneurlax force-pushed the feat/grin-ui branch 2 times, most recently from 8363f36 to 849b6a0 Compare November 17, 2026 20:06
Expose Grin through the shared Slatepack flows, transaction details, themes, and wallet screens while importing its API solely from grin_native.
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