What changed, and why it matters
This commit is a routine code refactor for how the app retrieves the version string of the Mimblewimble Coin (MWC) library. It moves the version lookup behind a generated interface so the app can check the plugin version consistently whether or not MWC support is enabled. There is no visible security relevance.
No security action required. Review as normal code-quality change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change removes a direct import of flutter_libmwc/git_versions.dart from lib/utilities/git_status.dart and instead routes the call through the generated libMwc interface (libMwc.getPluginVersion()). The interface gains a new getPluginVersion() method, and the MWC implementation template provides the concrete implementation by importing and delegating to mimblewimblecoin_versions.getPluginVersion(). This is an architectural/interface refactor with no functional change to version values or cryptographic/wallet logic.
Changed components
lib/utilities/git_status.dartlib/wl_gen/interfaces/libmwc_interface.darttool/wl_templates/MWC_libmwc_interface_impl.template.dartInspect captured patch +8 / −4
diff --git a/lib/utilities/git_status.dart b/lib/utilities/git_status.dart
index 2b19e33..9efade7 100644
--- a/lib/utilities/git_status.dart
+++ b/lib/utilities/git_status.dart
@@ -2,13 +2,13 @@ import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:flutter_libepiccash/git_versions.dart' as epic_versions;
-import 'package:flutter_libmwc/git_versions.dart' as mimblewimblecoin_versions;
import 'package:http/http.dart';
import '../../../themes/stack_colors.dart';
import '../../../utilities/logger.dart';
import '../../../utilities/text_styles.dart';
import '../app_config.dart';
+import '../wl_gen/interfaces/libmwc_interface.dart';
const kGithubAPI = "https://api.github.com";
const kGithubSearch = "/search/commits";
@@ -19,8 +19,7 @@ enum CommitStatus { isHead, isOldCommit, notACommit, notLoaded }
abstract class GitStatus {
static String get epicCashCommit => epic_versions.getPluginVersion();
// static String get moneroCommit => monero_versions.getPluginVersion();
- static String get mimblewimblecoinCommit =>
- mimblewimblecoin_versions.getPluginVersion();
+ static String get mimblewimblecoinCommit => libMwc.getPluginVersion();
static String get appCommitHash => AppConfig.commitHash;
diff --git a/lib/wl_gen/interfaces/libmwc_interface.dart b/lib/wl_gen/interfaces/libmwc_interface.dart
index 60536cf..acd5b2d 100644
--- a/lib/wl_gen/interfaces/libmwc_interface.dart
+++ b/lib/wl_gen/interfaces/libmwc_interface.dart
@@ -139,6 +139,8 @@ abstract class LibMwcInterface {
Future<int> getChainHeight({required String config});
Future<String> deleteWallet({required String wallet, required String config});
+
+ String getPluginVersion();
}
class MwcTransaction {
diff --git a/tool/wl_templates/MWC_libmwc_interface_impl.template.dart b/tool/wl_templates/MWC_libmwc_interface_impl.template.dart
index 356c071..0262cc5 100644
--- a/tool/wl_templates/MWC_libmwc_interface_impl.template.dart
+++ b/tool/wl_templates/MWC_libmwc_interface_impl.template.dart
@@ -1,4 +1,5 @@
//ON
+import 'package:flutter_libmwc/git_versions.dart' as mimblewimblecoin_versions;
import 'package:flutter_libmwc/lib.dart' as mimblewimblecoin;
import 'package:flutter_libmwc/models/transaction.dart'
as mimblewimblecoin_models;
@@ -12,7 +13,6 @@ LibMwcInterface get libMwc => _getLibMwc();
LibMwcInterface _getLibMwc() => throw Exception("MWC not enabled!");
//END_OFF
-
//ON
LibMwcInterface _getLibMwc() => const _LibMwcInterfaceImpl();
@@ -343,6 +343,9 @@ final class _LibMwcInterfaceImpl extends LibMwcInterface {
bool validateSendAddress({required String address}) {
return mimblewimblecoin.Libmwc.validateSendAddress(address: address);
}
+
+ @override
+ String getPluginVersion() => mimblewimblecoin_versions.getPluginVersion();
}
//END_ON
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.