What changed, and why it matters
This commit is a small cleanup of a code template used for the Salvium cryptocurrency integration. It updates an error message, removes some unnecessary fallback values, and fixes how transaction 'type' data is passed by using the underlying value instead of an object. There is no clear security problem visible in the diff itself.
No security action required. Treat as normal maintenance. If reviewing more broadly, verify that the underlying wallet interface methods (isSynced, rescanBlockchain, isConnectedToDaemon, getAllTxs) now truly never return null, since the removed fallbacks assume that contract.
Security signals we found
No obvious security-sensitive change (no cryptographic operations, input validation, authentication, or network handling altered).
Removal of null fallbacks could theoretically expose callers to null/exception propagation if underlying assumptions are wrong, but this is a code-quality/template-consistency issue rather than an exploitable vulnerability.
Change from e.type to e.type.value is a type-compatibility fix, not a security boundary change.
Evidence from the diff
The patch modifies tool/wl_templates/SAL_cs_salvium_interface_impl.template.dart. Changes include: (1) updating the disabled-interface exception message from ‘XMR/WOW not enabled!’ to ‘Sal not enabled!’; (2) removing null-coalescing fallbacks (?? Future.value(false)) on isSynced, rescanBlockchain, and isConnectedToDaemon, implying the underlying methods now return non-null Futures; (3) removing a null-check guard before mapping getAllTxs results; and (4) changing salviumData.type from e.type to e.type.value in two places, likely matching a change in the underlying model where type is now an enum wrapper. These appear to be routine template synchronization/cleanup changes.
Changed components
tool/wl_templates/SAL_cs_salvium_interface_impl.template.dartSalvium (SAL) wallet interface templateInspect captured patch +6 / −8
diff --git a/tool/wl_templates/SAL_cs_salvium_interface_impl.template.dart b/tool/wl_templates/SAL_cs_salvium_interface_impl.template.dart
index d86c41e..dd6f398 100644
--- a/tool/wl_templates/SAL_cs_salvium_interface_impl.template.dart
+++ b/tool/wl_templates/SAL_cs_salvium_interface_impl.template.dart
@@ -13,7 +13,7 @@ import '../interfaces/cs_salvium_interface.dart';
CsSalviumInterface get csSalvium => _getInterface();
//OFF
-CsSalviumInterface _getInterface() => throw Exception("XMR/WOW not enabled!");
+CsSalviumInterface _getInterface() => throw Exception("Sal not enabled!");
//END_OFF
//ON
@@ -181,8 +181,7 @@ class _CsSalviumInterfaceImpl extends CsSalviumInterface {
wallet.actual.getPrivateSpendKey();
@override
- Future<bool> isSynced(WrappedWallet wallet) =>
- wallet.actual.isSynced() ?? Future.value(false);
+ Future<bool> isSynced(WrappedWallet wallet) => wallet.actual.isSynced();
@override
void startSyncing(WrappedWallet wallet) => wallet.actual.startSyncing();
@@ -227,11 +226,11 @@ class _CsSalviumInterfaceImpl extends CsSalviumInterface {
@override
Future<bool> rescanBlockchain(WrappedWallet wallet) =>
- wallet.actual.rescanBlockchain() ?? Future.value(false);
+ wallet.actual.rescanBlockchain();
@override
Future<bool> isConnectedToDaemon(WrappedWallet wallet) =>
- wallet.actual.isConnectedToDaemon() ?? Future.value(false);
+ wallet.actual.isConnectedToDaemon();
@override
Future<void> connect(
@@ -275,7 +274,6 @@ class _CsSalviumInterfaceImpl extends CsSalviumInterface {
bool refresh = false,
}) async {
final transactions = await wallet.actual.getAllTxs(refresh: refresh);
- if (transactions == null) return [];
return transactions
.map(
(e) => CsTransaction(
@@ -293,7 +291,7 @@ class _CsSalviumInterfaceImpl extends CsSalviumInterface {
key: e.key,
timeStamp: e.timeStamp,
minConfirms: e.minConfirms.value,
- salviumData: (asset: e.asset, type: e.type),
+ salviumData: (asset: e.asset, type: e.type.value),
),
)
.toList();
@@ -327,7 +325,7 @@ class _CsSalviumInterfaceImpl extends CsSalviumInterface {
key: e.key,
timeStamp: e.timeStamp,
minConfirms: e.minConfirms.value,
- salviumData: (asset: e.asset, type: e.type),
+ salviumData: (asset: e.asset, type: e.type.value),
),
)
.toList();
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.