fix spark names not showing as confirmed in names view
What changed, and why it matters
This commit fixes a display bug in the Stack Wallet app where Spark cryptocurrency names owned by the user were not showing as confirmed in the names view. The change simplifies how the wallet decides which Spark names belong to the user by removing a filter that excluded names already known locally. There is no indication this is a security vulnerability.
No security action required. Treat as a normal bug fix. If desired, verify that removing the duplicate-name filter does not cause duplicate entries in the local database, though the surrounding insert/update logic appears to handle this.
Security signals we found
No security-relevant signals observed in the diff
Change is a UI/state synchronization fix for Spark name confirmation display
No input validation, authentication, cryptography, or network boundary changes
Evidence from the diff
In lib/wallets/wallet/wallet_mixin_interfaces/spark_interface.dart, the Spark name refresh logic previously fetched the user’s locally stored Spark name strings and then filtered out any names returned by the ElectrumX client that matched those already-known names. This caused names to not be marked/updated as confirmed in the UI. The patch removes the local name-string query and the !myNameStrings.contains(e.name) exclusion, so the refresh now retains all names whose address belongs to the wallet. This is a UI/state synchronization fix, not a cryptographic or network security change.
Changed components
lib/wallets/wallet/wallet_mixin_interfaces/spark_interface.dartSpark name refresh/confirmation UI logicInspect captured patch +2 / −8
diff --git a/lib/wallets/wallet/wallet_mixin_interfaces/spark_interface.dart b/lib/wallets/wallet/wallet_mixin_interfaces/spark_interface.dart
index d9059a5..96dcb39 100644
--- a/lib/wallets/wallet/wallet_mixin_interfaces/spark_interface.dart
+++ b/lib/wallets/wallet/wallet_mixin_interfaces/spark_interface.dart
@@ -1236,9 +1236,6 @@ mixin SparkInterface<T extends ElectrumXCurrencyInterface>
Logging.instance.i("Refreshing spark names for $walletId ${info.name}");
final db = Drift.get(walletId);
- final myNameStrings = await db.managers.sparkNames
- .map((e) => e.name)
- .get();
final names = await electrumXClient.getSparkNames();
// start update shared cache of all names
@@ -1299,11 +1296,8 @@ mixin SparkInterface<T extends ElectrumXCurrencyInterface>
diversifier++;
}
- names.retainWhere(
- (e) =>
- myAddresses.contains(e.address) && !myNameStrings.contains(e.name),
- );
- Logging.instance.d("Found $names new spark names");
+ names.retainWhere((e) => myAddresses.contains(e.address));
+ Logging.instance.d("Found $names spark names");
if (names.isNotEmpty) {
final List<
Why this scored 17/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.