remove restore from date for haven restore form

This commit is contained in:
Serhii-Borodenko 2022-06-10 17:15:53 +03:00
parent b58b0002b0
commit 997e960a0b
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,5 @@
import 'package:cake_wallet/view_model/wallet_restore_view_model.dart';
import 'package:cw_core/wallet_type.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -10,10 +12,11 @@ import 'package:cake_wallet/core/validator.dart';
import 'package:cake_wallet/entities/generate_name.dart'; import 'package:cake_wallet/entities/generate_name.dart';
class WalletRestoreFromKeysFrom extends StatefulWidget { class WalletRestoreFromKeysFrom extends StatefulWidget {
WalletRestoreFromKeysFrom({Key key, this.onHeightOrDateEntered}) WalletRestoreFromKeysFrom({Key key, this.onHeightOrDateEntered, this.walletRestoreViewModel})
: super(key: key); : super(key: key);
final Function(bool) onHeightOrDateEntered; final Function(bool) onHeightOrDateEntered;
final WalletRestoreViewModel walletRestoreViewModel;
@override @override
WalletRestoreFromKeysFromState createState() => WalletRestoreFromKeysFromState createState() =>
@ -113,6 +116,7 @@ class WalletRestoreFromKeysFromState extends State<WalletRestoreFromKeysFrom> {
maxLines: null)), maxLines: null)),
BlockchainHeightWidget( BlockchainHeightWidget(
key: blockchainHeightKey, key: blockchainHeightKey,
hasDatePicker: widget.walletRestoreViewModel.type != WalletType.haven,
onHeightChange: (_) => null, onHeightChange: (_) => null,
onHeightOrDateEntered: widget.onHeightOrDateEntered) onHeightOrDateEntered: widget.onHeightOrDateEntered)
]), ]),

View file

@ -83,6 +83,7 @@ class WalletRestorePage extends BasePage {
case WalletRestoreMode.keys: case WalletRestoreMode.keys:
_pages.add(WalletRestoreFromKeysFrom( _pages.add(WalletRestoreFromKeysFrom(
key: walletRestoreFromKeysFormKey, key: walletRestoreFromKeysFormKey,
walletRestoreViewModel: walletRestoreViewModel,
onHeightOrDateEntered: (value) => onHeightOrDateEntered: (value) =>
walletRestoreViewModel.isButtonEnabled = value)); walletRestoreViewModel.isButtonEnabled = value));
break; break;