firo tweaks

This commit is contained in:
julian 2024-01-17 08:33:23 -06:00
parent 5fa58342e0
commit becebf37c3
2 changed files with 21 additions and 7 deletions

View file

@ -1,3 +1,4 @@
import 'dart:async';
import 'dart:convert'; import 'dart:convert';
import 'dart:math'; import 'dart:math';
@ -740,6 +741,7 @@ class FiroWallet extends Bip39HDWallet
final sparkAnonymitySet = futureResults[2] as Map<String, dynamic>; final sparkAnonymitySet = futureResults[2] as Map<String, dynamic>;
final sparkSpentCoinTags = futureResults[3] as Set<String>; final sparkSpentCoinTags = futureResults[3] as Set<String>;
if (Util.isDesktop) {
await Future.wait([ await Future.wait([
recoverLelantusWallet( recoverLelantusWallet(
latestSetId: latestSetId, latestSetId: latestSetId,
@ -751,9 +753,20 @@ class FiroWallet extends Bip39HDWallet
spentCoinTags: sparkSpentCoinTags, spentCoinTags: sparkSpentCoinTags,
), ),
]); ]);
} else {
await recoverLelantusWallet(
latestSetId: latestSetId,
usedSerialNumbers: usedSerialsSet,
setDataMap: setDataMap,
);
await recoverSparkWallet(
anonymitySet: sparkAnonymitySet,
spentCoinTags: sparkSpentCoinTags,
);
}
}); });
await refresh(); unawaited(refresh());
} catch (e, s) { } catch (e, s) {
Logging.instance.log( Logging.instance.log(
"Exception rethrown from electrumx_mixin recover(): $e\n$s", "Exception rethrown from electrumx_mixin recover(): $e\n$s",

View file

@ -596,6 +596,7 @@ mixin LelantusInterface on Bip39HDWallet, ElectrumXInterface {
.isLelantusEqualTo(false) .isLelantusEqualTo(false)
.findAll(); .findAll();
// TODO: [prio=high] shouldn't these be v2? If it doesn't matter than we can get rid of this logic
// Edit the receive transactions with the mint fees. // Edit the receive transactions with the mint fees.
List<Transaction> editedTransactions = []; List<Transaction> editedTransactions = [];