feat: zashi zkool sweep, and minor fixes (#2838)

feat: restore from keys zcash
fix: don't display empty keys
This commit is contained in:
cyan
2026-02-06 02:39:19 +01:00
committed by GitHub
parent 4ae94db3ee
commit d8a6766090
59 changed files with 886 additions and 93 deletions
+3 -2
View File
@@ -1608,7 +1608,7 @@ abstract class Zcash {
String? passphrase,
required int? height});
WalletCredentials createZcashRestoreWalletFromPrivateKey(
{required String name, required String privateKey, required String password});
{required String name, required String privateKey, required String password, required int height});
String getAddress(WalletBase wallet);
String getPrivateKey(WalletBase wallet);
String getPublicKey(WalletBase wallet);
@@ -1643,8 +1643,9 @@ abstract class Zcash {
dynamic getOptionToType(ReceivePageOption option);
void unlockDatabase(String password);
Future<int> getHeightByDate(DateTime date);
bool showMissingFundsCard(WalletBase wallet);
Future<void> rescanInternalChange(WalletBase wallet);
}
""";
const zcashEmptyDefinition = 'Zcash? zcash;\n';
@@ -1,5 +1,6 @@
import 'package:translator/translator.dart';
import '../../print_verbose_dummy.dart';
import 'arb_file_utils.dart';
import 'translation_constants.dart';
@@ -33,8 +34,12 @@ Future<String> getTranslation(String text, String lang) async {
final placeholder =
regExp.allMatches(text).map((e) => text.substring(e.start, e.end)).toList().asMap();
var translation = (await translator.translate(text, from: defaultLang, to: lang)).text;
String translation = text;
try {
translation = (await translator.translate(text, from: defaultLang, to: lang)).text;
} catch (e) {
printV("$lang, $text, $e");
}
placeholder.forEach((index, value) {
final translatedPlaceholder = regExp.allMatches(translation).toList()[index];
translation =