Fix electrum unspent coins error (#1912)

* Refresh unspent coins before creating a transaction

* disable seed verification in debug mode [skip ci]
This commit is contained in:
Omar Hatem
2024-12-29 23:48:53 +02:00
committed by GitHub
parent 4cdee649d1
commit 214fc7113c
4 changed files with 13 additions and 5 deletions
@@ -20,7 +20,8 @@ class SeedVerificationPage extends BasePage {
builder: (context) {
return Padding(
padding: const EdgeInsets.all(16.0),
child: walletSeedViewModel.isVerificationComplete
child: walletSeedViewModel.isVerificationComplete ||
walletSeedViewModel.verificationIndices.isEmpty
? SeedVerificationSuccessView(
imageColor: titleColor(context),
)
+3 -1
View File
@@ -1,7 +1,9 @@
import 'package:flutter/foundation.dart';
class FeatureFlag {
static const bool isCakePayEnabled = false;
static const bool isExolixEnabled = true;
static const bool isInAppTorEnabled = false;
static const bool isBackgroundSyncEnabled = false;
static const int verificationWordsCount = 2;
static const int verificationWordsCount = kDebugMode ? 0 : 2;
}
+5 -2
View File
@@ -29,6 +29,7 @@ abstract class WalletSeedViewModelBase with Store {
List<String> get seedSplit => seed.split(RegExp(r'\s+'));
int get columnCount => seedSplit.length <= 16 ? 2 : 3;
double get columnAspectRatio => seedSplit.length <= 16 ? 1.8 : 2.8;
/// The indices of the seed to be verified.
@@ -60,8 +61,10 @@ abstract class WalletSeedViewModelBase with Store {
bool isVerificationComplete = false;
void setupSeedVerification() {
generateRandomIndices();
generateOptions();
if (verificationWordCount != 0) {
generateRandomIndices();
generateOptions();
}
}
/// Generate the indices of the seeds to be verified.