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

View file

@ -596,6 +596,7 @@ mixin LelantusInterface on Bip39HDWallet, ElectrumXInterface {
.isLelantusEqualTo(false)
.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.
List<Transaction> editedTransactions = [];