fetch params from download.z.cash on demand to reduce app size (#2879)

add restore height to seed screen
This commit is contained in:
cyan
2026-02-10 00:44:58 +01:00
committed by GitHub
parent 143ce84504
commit 6b458e8a3b
4 changed files with 52 additions and 6 deletions
@@ -183,7 +183,7 @@ class _WalletKeysPageBodyState extends State<WalletKeysPageBody>
Widget _buildSeedTab(BuildContext context, bool isLegacySeed) {
return Column(
children: [
if (isLegacySeedOnly || isLegacySeed || widget.walletKeysViewModel.isBitcoin) ...[
if (isLegacySeedOnly || isLegacySeed ||widget.walletKeysViewModel.shouldShowHeightBox) ...[
_buildHeightBox(),
const SizedBox(height: 20),
],
+6 -1
View File
@@ -62,7 +62,9 @@ abstract class WalletKeysViewModelBase with Store {
}
bool get isBitcoin => _wallet.type == WalletType.bitcoin;
// this is incomplete, needs legacy seed toggle for XMR
bool get shouldShowHeightBox => [WalletType.bitcoin, WalletType.zcash].contains(_wallet.type);
final ObservableList<StandartListItem> items;
@observable
@@ -318,6 +320,9 @@ abstract class WalletKeysViewModelBase with Store {
if (_wallet.type == WalletType.wownero) {
return wownero!.getRestoreHeight(_wallet)?.toString();
}
if (_wallet.type == WalletType.zcash) {
return zcash!.getKeys(_wallet)["restoreHeight"]?.toString();
}
if (_restoreHeightByTransactions != 0)
return getRoundedRestoreHeight(_restoreHeightByTransactions);
if (_restoreHeight != 0) return _restoreHeight.toString();