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/cupertino.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';
class WalletRestoreFromKeysFrom extends StatefulWidget {
WalletRestoreFromKeysFrom({Key key, this.onHeightOrDateEntered})
WalletRestoreFromKeysFrom({Key key, this.onHeightOrDateEntered, this.walletRestoreViewModel})
: super(key: key);
final Function(bool) onHeightOrDateEntered;
final WalletRestoreViewModel walletRestoreViewModel;
@override
WalletRestoreFromKeysFromState createState() =>
@ -113,6 +116,7 @@ class WalletRestoreFromKeysFromState extends State<WalletRestoreFromKeysFrom> {
maxLines: null)),
BlockchainHeightWidget(
key: blockchainHeightKey,
hasDatePicker: widget.walletRestoreViewModel.type != WalletType.haven,
onHeightChange: (_) => null,
onHeightOrDateEntered: widget.onHeightOrDateEntered)
]),

View file

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