Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
e704b15
Share slatepack and relay server models between Epic and MWC
sneurlax Sep 7, 2026
fbf1f81
Share the native transaction model between libepiccash and libmwc
sneurlax Sep 7, 2026
68bf200
Add MimblewimbleWallet base for Epic Cash and MWC
sneurlax Sep 7, 2026
d06c6ae
Use one slatepack UI for Epic Cash and MWC
sneurlax Sep 8, 2026
025ce78
Point the wallet creation integration test at the shared slatepack to…
sneurlax Nov 7, 2026
9de79de
Show a message instead of a broken QR code when the data does not fit
sneurlax Nov 7, 2026
0506f1f
Add SlatepackInterface and route the slatepack screens through it
sneurlax Nov 7, 2026
734136b
Test slatepack routing, slate inspection and the QR length guard
sneurlax Nov 7, 2026
62291b0
style: format the shared slatepack refactor
sneurlax Nov 13, 2026
a1eaa92
test: model Epic slatepack capabilities
sneurlax Nov 13, 2026
87026cf
style: clean slatepack file headers
sneurlax Nov 13, 2026
fda3c1c
Keep local notes when creating a slatepack
sneurlax Nov 10, 2026
763d499
Ignore slatepack input results after the screen closes
sneurlax Nov 10, 2026
041703b
Use a readable color for the Slatepack screen's help text
sneurlax Nov 10, 2026
f014d7c
Check the created slatepack against the confirmed send
sneurlax Nov 11, 2026
88b0d47
Offer Finalize only for a send this wallet started
sneurlax Nov 11, 2026
0d1bb81
Draw a slatepack QR code whenever the data fits in one
sneurlax Nov 11, 2026
5e00116
Normalise slatepack text once before importing it
sneurlax Nov 11, 2026
0cc68fc
Keep Continue from starting a slatepack import twice
sneurlax Nov 11, 2026
3c8b7ae
Show a received slatepack's response after its screen closes
sneurlax Nov 11, 2026
bd03387
Anchor the slatepack share sheet to the Share button
sneurlax Nov 11, 2026
9247787
Close the sending dialog by its own route
sneurlax Nov 11, 2026
4b852ea
Take the slatepack loading overlay down after the screen closes
sneurlax Nov 11, 2026
d8e691a
Remove the unused note from the slatepack summary dialog
sneurlax Nov 11, 2026
c61a2a7
Hide cancel on slatepack wallet rows that have no slate
sneurlax Nov 7, 2026
d517fc3
fix: confirm slatepack cancellation
sneurlax Nov 13, 2026
ca9111d
build: pin fixed Epic wallet plugin
sneurlax Nov 14, 2026
abe4265
build: attest Epic Xcode compatibility
sneurlax Nov 14, 2026
ce56319
Merge branch 'staging' into feat/slatepack-interface
julian-CStack Nov 17, 2026
0eac970
Merge slatepack UI hardening into PR #1507
sneurlax Nov 17, 2026
26594cb
Revert "build: attest Epic Xcode compatibility"
sneurlax Nov 17, 2026
6c90f6f
Revert "build: pin fixed Epic wallet plugin"
sneurlax Nov 17, 2026
a9c0d0e
fix: address slatepack review regressions
sneurlax Nov 17, 2026
02deffa
Show the on-chain note from the participant who wrote one
sneurlax Nov 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions integration_test/wallet_creation/drivers/desktop_driver.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import 'package:stackwallet/pages_desktop_specific/my_stack_view/wallet_view/sub
import 'package:stackwallet/pages_desktop_specific/password/create_password_view.dart';
import 'package:stackwallet/pages_desktop_specific/password/desktop_login_view.dart';
import 'package:stackwallet/wallets/wallet/wallet.dart';
import 'package:stackwallet/widgets/mwc_txs_method_toggle.dart';
import 'package:stackwallet/widgets/slatepack_method_toggle.dart';
import 'package:stackwallet/widgets/toggle.dart';
import 'package:stackwallet/widgets/wallet_card.dart';

Expand Down Expand Up @@ -92,16 +92,17 @@ class DesktopDriver extends PlatformDriver {
);
final receive = find.byType(DesktopReceive);
await ui.waitFor(receive);
final mwcMode = find.descendant(
final slatepackMode = find.descendant(
of: receive,
matching: find.byType(MwcTxsMethodToggle),
matching: find.byType(SlatepackMethodToggle),
);
if (mwcMode.evaluate().isNotEmpty) {
if (slatepackMode.evaluate().isNotEmpty) {
final toggle = ui.tester.widget<Toggle>(
find.descendant(of: mwcMode, matching: find.byType(Toggle)),
find.descendant(of: slatepackMode, matching: find.byType(Toggle)),
);
// MWC defaults to Slatepack, which does not display the MQS address.
if (!toggle.isOn) await ui.tap(mwcMode);
// Epic Cash defaults to epicbox, so this is a no-op there.
if (!toggle.isOn) await ui.tap(slatepackMode);
}
await selectPrimaryAddress(wallet, receive);
final displayed = find.descendant(
Expand Down
2 changes: 1 addition & 1 deletion integration_test/wallet_creation/seed_validators.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Future<void> verifyOpenNativeWallet(Wallet wallet, String expected) async {
} else if (wallet is MimblewimblecoinWallet) {
actual = (await wallet.thisWalletAddress(
0,
await wallet.getMwcMqsConfig(),
await wallet.getRelayConfig(),
)).value;
} else if (wallet is LibXelisWallet) {
wallet.checkInitialized();
Expand Down
42 changes: 19 additions & 23 deletions lib/db/migrate_wallets_to_isar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import '../wallets/crypto_currency/crypto_currency.dart';
import '../wallets/isar/models/token_wallet_info.dart';
import '../wallets/isar/models/wallet_info.dart';
import '../wallets/isar/models/wallet_info_meta.dart';
import '../wallets/wallet/supporting/epiccash_wallet_info_extension.dart';
import '../wallets/wallet/supporting/mimblewimble_wallet_info_extension.dart';
import 'hive/db.dart';
import 'isar/main_db.dart';

Expand All @@ -28,9 +28,10 @@ Future<void> migrateWalletsToIsar({
DB.boxNameAllWalletsData,
);

final names =
DB.instance.get<dynamic>(boxName: DB.boxNameAllWalletsData, key: 'names')
as Map?;
final names = DB.instance.get<dynamic>(
boxName: DB.boxNameAllWalletsData,
key: 'names',
) as Map?;

if (names == null) {
// no wallets to migrate
Expand All @@ -53,10 +54,9 @@ Future<void> migrateWalletsToIsar({
//
// Get current ordered list of favourite wallet Ids
//
final List<String> favourites =
(await DB.instance.hive.openBox<String>(
DB.boxNameFavoriteWallets,
)).values.toList();
final List<String> favourites = (await DB.instance.hive.openBox<String>(
DB.boxNameFavoriteWallets,
)).values.toList();

final List<(WalletInfo, WalletInfoMeta)> newInfo = [];
final List<TokenWalletInfo> tokenInfo = [];
Expand All @@ -71,11 +71,10 @@ Future<void> migrateWalletsToIsar({
//
// First handle transaction notes
//
final newNoteCount =
await MainDB.instance.isar.transactionNotes
.where()
.walletIdEqualTo(old.walletId)
.count();
final newNoteCount = await MainDB.instance.isar.transactionNotes
.where()
.walletIdEqualTo(old.walletId)
.count();
if (newNoteCount == 0) {
final map = walletBox.get('notes') as Map?;

Expand Down Expand Up @@ -115,11 +114,10 @@ Future<void> migrateWalletsToIsar({
otherData[WalletInfoKeys.tokenContractAddresses] = tokenContractAddresses;

for (final address in tokenContractAddresses!) {
final contract =
await MainDB.instance.isar.ethContracts
.where()
.addressEqualTo(address)
.findFirst();
final contract = await MainDB.instance.isar.ethContracts
.where()
.addressEqualTo(address)
.findFirst();
if (contract != null) {
tokenInfo.add(
TokenWalletInfo(
Expand All @@ -134,7 +132,7 @@ Future<void> migrateWalletsToIsar({

// epiccash specifics
if (old.coinIdentifier == Epiccash(CryptoCurrencyNetwork.main).identifier) {
final epicWalletInfo = ExtraEpiccashWalletInfo.fromMap({
final epicWalletInfo = ExtraMimblewimbleWalletInfo.fromMap({
"receivingIndex": walletBox.get("receivingIndex") as int? ?? 0,
"changeIndex": walletBox.get("changeIndex") as int? ?? 0,
"slatesToAddresses": walletBox.get("slate_to_address") as Map? ?? {},
Expand Down Expand Up @@ -165,10 +163,8 @@ Future<void> migrateWalletsToIsar({
coinName: old.coinIdentifier,
walletId: old.walletId,
name: old.name,
mainAddressType:
AppConfig.getCryptoCurrencyFor(
old.coinIdentifier,
)!.defaultAddressType,
mainAddressType: AppConfig.getCryptoCurrencyFor(old.coinIdentifier)!
.defaultAddressType,
favouriteOrderIndex: favourites.indexOf(old.walletId),
cachedChainHeight: walletBox.get(DBKeys.storedChainHeight) as int? ?? 0,
cachedBalanceString: walletBox.get(DBKeys.cachedBalance) as String?,
Expand Down
116 changes: 0 additions & 116 deletions lib/models/epic_slatepack_models.dart

This file was deleted.

32 changes: 7 additions & 25 deletions lib/models/epicbox_config_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,12 @@ import 'dart:convert';
import 'package:hive_ce/hive.dart';

import 'epicbox_server_model.dart';
import 'relay_config_model.dart';

part 'type_adaptors/epicbox_config_model.g.dart';

// @HiveType(typeId: 72)
class EpicBoxConfigModel {
// @HiveField(1)
final String host;
// @HiveField(2)
final int? port;
class EpicBoxConfigModel extends RelayConfigModel {
// @HiveField(3)
final bool? protocolInsecure;
// @HiveField(4)
Expand All @@ -31,9 +28,9 @@ class EpicBoxConfigModel {
// // @HiveField(6)
// final String? name;

EpicBoxConfigModel({
required this.host,
this.port,
const EpicBoxConfigModel({
required super.host,
super.port,
this.protocolInsecure,
this.addressIndex,
// this.id,
Expand All @@ -57,19 +54,9 @@ class EpicBoxConfigModel {
);
}

Map<String, dynamic> toMap() {
final Map<String, dynamic> map = {};
map['epicbox_domain'] = host;
map['epicbox_port'] = port;
map['epicbox_protocol_insecure'] = protocolInsecure;
map['epicbox_address_index'] = addressIndex;
// map['id'] = id;
// map['name'] = name;
return map;
}

@override
Map<String, dynamic> toJson() {
return {
return <String, dynamic>{
'epicbox_domain': host,
'epicbox_port': port,
'epicbox_protocol_insecure': protocolInsecure,
Expand All @@ -79,11 +66,6 @@ class EpicBoxConfigModel {
};
}

@override
String toString() {
return json.encode(toJson());
}

static EpicBoxConfigModel fromString(String epicBoxConfigString) {
final dynamic _epicBox = json.decode(epicBoxConfigString);

Expand Down
68 changes: 13 additions & 55 deletions lib/models/epicbox_server_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,38 +10,24 @@

import 'package:hive_ce/hive.dart';

import 'relay_server_model.dart';

part 'type_adaptors/epicbox_server_model.g.dart';

// @HiveType(typeId: 71)
class EpicBoxServerModel {
// @HiveField(0)
final String id;
// @HiveField(1)
final String host;
// @HiveField(2)
final int? port;
// @HiveField(3)
final String name;
// @HiveField(4)
final bool? useSSL;
// @HiveField(5)
final bool? enabled;
// @HiveField(6)
final bool? isFailover;
// @HiveField(7)
final bool? isDown;

EpicBoxServerModel({
required this.id,
required this.host,
this.port,
required this.name,
this.useSSL,
this.enabled,
this.isFailover,
this.isDown,
class EpicBoxServerModel extends RelayServerModel {
const EpicBoxServerModel({
required super.id,
required super.host,
super.port,
required super.name,
super.useSSL,
super.enabled,
super.isFailover,
super.isDown,
});

@override
EpicBoxServerModel copyWith({
String? host,
int? port,
Expand All @@ -62,32 +48,4 @@ class EpicBoxServerModel {
isDown: isDown ?? this.isDown,
);
}

Map<String, dynamic> toMap() {
final Map<String, dynamic> map = {};
map['id'] = id;
map['host'] = host;
map['port'] = port;
map['name'] = name;
map['useSSL'] = useSSL;
map['enabled'] = enabled;
map['isFailover'] = isFailover;
map['isDown'] = isDown;
return map;
}

bool get isDefault => id.startsWith("default_");

Map<String, dynamic> toJson() {
return {
'id': id,
'host': host,
'port': port,
'name': name,
'useSSL': useSSL,
'enabled': enabled,
'isFailover': isFailover,
'isDown': isDown,
};
}
}
Loading
Loading