Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
a9e3c59
Share slatepack and relay server models between Epic and MWC
sneurlax Sep 7, 2026
ea154c9
Share the native transaction model between libepiccash and libmwc
sneurlax Sep 7, 2026
4757d21
Add MimblewimbleWallet base for Epic Cash and MWC
sneurlax Sep 7, 2026
3eca358
Use one slatepack UI for Epic Cash and MWC
sneurlax Sep 8, 2026
981f4e8
Use MWC's own genesis time when estimating a creation height
sneurlax Sep 8, 2026
cbe4368
Point the wallet creation integration test at the shared slatepack to…
sneurlax Nov 7, 2026
64201e5
Show a message instead of a broken QR code when the data does not fit
sneurlax Nov 7, 2026
64b9629
Add SlatepackInterface and route the slatepack screens through it
sneurlax Nov 7, 2026
05863bc
Test slatepack routing, slate inspection and the QR length guard
sneurlax Nov 7, 2026
1fa7aca
Keep local notes when creating a slatepack
sneurlax Nov 10, 2026
4d0adec
Ignore slatepack input results after the screen closes
sneurlax Nov 10, 2026
dde3a99
Show an error when the Epicbox relay cannot be reached
sneurlax Nov 10, 2026
29f45a9
Show the on-chain note from the participant who wrote one
sneurlax Nov 10, 2026
1c7ed4d
Store the Epicbox insecure flag under the plugin's key
sneurlax Nov 10, 2026
0607f96
Use a readable color for the Slatepack screen's help text
sneurlax Nov 10, 2026
b2f5653
Merge branch 'review/refactor/epic-mwc-unify-rebased' into review/fea…
sneurlax Nov 10, 2026
ba94277
Let a typed http(s) send address stay in the field
sneurlax Nov 11, 2026
9da7ba6
Merge branch 'review/refactor/epic-mwc-unify-rebased' into review/fea…
sneurlax Nov 11, 2026
c4ac964
Keep typed Epic Cash and MWC send addresses intact
sneurlax Nov 11, 2026
2d8b0e0
Merge branch 'review/refactor/epic-mwc-unify-rebased' into review/fea…
sneurlax Nov 11, 2026
518eb4f
Skip MWC fee estimation when there is nothing to spend
sneurlax Nov 11, 2026
83e94aa
Merge branch 'review/refactor/epic-mwc-unify-rebased' into review/fea…
sneurlax Nov 11, 2026
b3bd3b9
Strip relay prefixes from scanned Epic Cash and MWC addresses
sneurlax Nov 11, 2026
e36aa67
Leave coins without a block explorer out of the explorer settings
sneurlax Nov 11, 2026
829effa
Merge branch 'review/refactor/epic-mwc-unify-rebased' into review/fea…
sneurlax Nov 11, 2026
8c77c0f
Check the created slatepack against the confirmed send
sneurlax Nov 11, 2026
bc2677d
Offer Finalize only for a send this wallet started
sneurlax Nov 11, 2026
e16ccff
Draw a slatepack QR code whenever the data fits in one
sneurlax Nov 11, 2026
b6cb75a
Normalise slatepack text once before importing it
sneurlax Nov 11, 2026
2564c07
Keep Continue from starting a slatepack import twice
sneurlax Nov 11, 2026
febcf36
Show a received slatepack's response after its screen closes
sneurlax Nov 11, 2026
cfd161e
Anchor the slatepack share sheet to the Share button
sneurlax Nov 11, 2026
20a5057
Close the sending dialog by its own route
sneurlax Nov 11, 2026
8bace85
Take the slatepack loading overlay down after the screen closes
sneurlax Nov 11, 2026
1a9d15b
Remove the unused note from the slatepack summary dialog
sneurlax Nov 11, 2026
db2b1a2
Merge remote-tracking branch 'github-cs/staging' into review/refactor…
sneurlax Nov 11, 2026
8840310
Merge branch 'review/refactor/epic-mwc-unify-rebased' into review/fea…
sneurlax Nov 11, 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
36 changes: 16 additions & 20 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 Down Expand Up @@ -53,10 +53,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 +70,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 +113,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 +131,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 +162,9 @@ 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.

53 changes: 18 additions & 35 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 @@ -49,41 +46,27 @@ class EpicBoxConfigModel {
}) {
return EpicBoxConfigModel(
host: host,
port: this.port ?? 443,
protocolInsecure: this.protocolInsecure ?? false,
addressIndex: this.addressIndex ?? 0,
port: port ?? this.port ?? 443,
protocolInsecure: protocolInsecure ?? this.protocolInsecure ?? false,
addressIndex: addressIndex ?? this.addressIndex ?? 0,
// id: id ?? this.id,
// name: name ?? this.name,
);
}

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,
// The plugin's EpicboxConfig field is spelled "unsecure".
'epicbox_protocol_unsecure': protocolInsecure,
'epicbox_address_index': addressIndex,
// 'id': id,
// 'name': name,
};
}

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

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

Expand All @@ -96,22 +79,22 @@ class EpicBoxConfigModel {
if (oldPort != "empty") {
_epicBox['epicbox_port'] = _epicBox['port'];
}
final oldProtocolInsecure = _epicBox["protocol_insecure"] ?? "empty";
if (oldProtocolInsecure != "empty") {
_epicBox['epicbox_protocol_insecure'] = _epicBox['protocol_insecure'];
}
// Configs saved before the key matched the plugin's use
// "epicbox_protocol_insecure", and older ones "protocol_insecure".
_epicBox['epicbox_protocol_unsecure'] ??=
_epicBox['epicbox_protocol_insecure'] ?? _epicBox['protocol_insecure'];
final oldAddressIndex = _epicBox["address_index"] ?? "empty";
if (oldAddressIndex != "empty") {
_epicBox['epicbox_address_index'] = _epicBox['address_index'];
}

_epicBox['epicbox_protocol_insecure'] ??= false;
_epicBox['epicbox_protocol_unsecure'] ??= false;
_epicBox['epicbox_address_index'] ??= 0;

return EpicBoxConfigModel(
host: _epicBox['epicbox_domain'] as String,
port: _epicBox['epicbox_port'] as int,
protocolInsecure: _epicBox['epicbox_protocol_insecure'] as bool,
protocolInsecure: _epicBox['epicbox_protocol_unsecure'] as bool,
addressIndex: _epicBox['epicbox_address_index'] as int,
// name: fields[5] as String,
// id: fields[6] as String,
Expand Down
Loading
Loading