Skip to content

Share the Epic Cash and MWC Slatepack UI - #1507

Open
sneurlax wants to merge 3 commits into
stagingfrom
feat/slatepack-interface
Open

sneurlax wants to merge 3 commits into
stagingfrom
feat/slatepack-interface

Conversation

@sneurlax

@sneurlax sneurlax commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Summary

Epic Cash and MWC share one Slatepack UI for method selection, manual send creation/results, import/receive/finalize, QR/input dialogs, and transaction cancellation presentation. Their wallet engines, lifecycle, synchronization, listener, restore/rescan, configuration, history merge, and native adapters remain coin-specific.

  • staging: 05b0ad33bbfa5fe8da9073241562bb5461b8ad8d
  • PR head: 0850e7d15c30d1612009067a49e54215b2b38179

Scope boundaries

  • No pubspec.yaml, pubspec.lock, lib/wl_gen/, or tool/wl_templates/ changes.
  • No Epic or MWC plugin pin changes.
  • No shared wallet-engine superclass.
  • No database/schema/migration, wallet-screen lifecycle, listener, sync/rescan, restore, exit, or native FFI lifecycle refactor.
  • Coin differences are expressed through the small SlatepackInterface UI contract and coin-specific adapters.

Correctness

  • Manual Slate/Slatepack sends bypass the normal fee-estimate/confirmation/PIN path and show the wallet's actual amount and fee after creation.
  • Local slate ownership is recorded at creation (and on failed MWC encode rollback failure), removing the self-import window before history refresh; local DB lookup unavailability fails closed instead of allowing duplicate/self-receives.
  • Nested navigators (desktop/iPad myStackViewNav) are traversed via ancestor NavigatorState lookup without looping, and progress overlays wait for full route presentation and hide behind lock screens.
  • Broadcast reporting matches each pinned plugin's real contract:
    • Epic's pinned plugin broadcasts inside tx_finalize (posted: true -> "Transaction finalized and broadcast").
    • MWC's pinned plugin swallows post_tx errors inside _tx_finalize_core, so MWC reports posted: null and shows a neutral "Transaction finalized" toast without claiming broadcast.
    • Explicit posted: false shows a "Finalized, not broadcast" modal.
  • Receive/finalize paths do not start a wallet refresh, avoiding the MWC listener-stop UI stall; DesktopReceive preserves pasted slatepack text across method toggles; multi-frame MWC pastes explain that multiple slatepacks were found.
  • Cancellation preserves each coin's pre-refactor rule behind a shared confirmation dialog and progress overlay.

Verification

At commit 0850e7d15c30d1612009067a49e54215b2b38179:

  • dart format --output=none --set-exit-if-changed across all 49 changed/added Dart files: 0 changes needed; git diff --check 05b0ad33bb: clean.
  • flutter analyze --no-pub on the 15 new/test Slatepack & route-presentation targets: No issues found!; 0 errors across all 49 PR Dart files.
  • Full test suite (LD_LIBRARY_PATH=... flutter test --no-pub): 1340 passed, 8 skipped, 0 failed.
  • All 8 CI Dart script suites (scripts/tests/*.dart): all passed.

@sneurlax

Copy link
Copy Markdown
Member Author

See staging...refactor/epic-mwc-unify-rebased for an easier-to-review core of this functionality

@sneurlax sneurlax changed the title Unified Slatepack interface for MimbleWimble coins Unify the Epic Cash and MWC wallets and slatepack UI Nov 11, 2026
@sneurlax
sneurlax marked this pull request as ready for review November 11, 2026 02:29
@sneurlax

Copy link
Copy Markdown
Member Author

See that last note:

Known issue, fixed separately:

We will want to update this after those merge

@codecov

codecov Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 70.95238% with 488 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.99%. Comparing base (ba44e64) to head (0850e7d).
⚠️ Report is 12 commits behind head on staging.

Files with missing lines Patch % Lines
lib/pages/slatepack/slatepack_input_field.dart 49.65% 72 Missing ⚠️
...b/wallets/wallet/impl/mimblewimblecoin_wallet.dart 15.00% 68 Missing ⚠️
lib/models/slatepack_models.dart 15.90% 37 Missing ⚠️
...ew/transaction_views/transaction_details_view.dart 14.63% 35 Missing ⚠️
lib/pages/receive_view/receive_view.dart 0.00% 33 Missing ⚠️
lib/wallets/wallet/impl/epiccash_wallet.dart 13.88% 31 Missing ⚠️
...t/wallet_mixin_interfaces/slatepack_interface.dart 83.87% 30 Missing ⚠️
lib/pages/slatepack/slatepack_dialog.dart 83.62% 28 Missing ⚠️
...ction_views/tx_v2/transaction_v2_details_view.dart 0.00% 24 Missing ⚠️
..._view/wallet_view/sub_widgets/desktop_receive.dart 66.17% 23 Missing ⚠️
... and 14 more
Additional details and impacted files
@@             Coverage Diff             @@
##           staging    #1507      +/-   ##
===========================================
+ Coverage    16.67%   17.99%   +1.31%     
===========================================
  Files         1145     1148       +3     
  Lines       114436   114364      -72     
===========================================
+ Hits         19086    20576    +1490     
+ Misses       95350    93788    -1562     

☔ 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

Copy link
Copy Markdown
Member Author

Pin-scope fix verified on head 2d67f21be2ce3d5d80b9860c0a35f2dabf176bbd.

@sneurlax
sneurlax force-pushed the feat/slatepack-interface branch from 2d67f21 to c9338d5 Compare November 20, 2026 20:34
@sneurlax sneurlax changed the title Unify the Epic Cash and MWC wallets and Slatepack UI Share the Epic Cash and MWC Slatepack UI Nov 20, 2026
@sneurlax
sneurlax force-pushed the feat/slatepack-interface branch from c9338d5 to 31224b6 Compare November 21, 2026 03:46
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