From 997e960a0b924a0b5f9dbe7b5077bfdf9d570c77 Mon Sep 17 00:00:00 2001 From: Serhii-Borodenko Date: Fri, 10 Jun 2022 17:15:53 +0300 Subject: [PATCH] remove restore from date for haven restore form --- lib/src/screens/restore/wallet_restore_from_keys_form.dart | 6 +++++- lib/src/screens/restore/wallet_restore_page.dart | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/src/screens/restore/wallet_restore_from_keys_form.dart b/lib/src/screens/restore/wallet_restore_from_keys_form.dart index 3f8d122d1..d6f637422 100644 --- a/lib/src/screens/restore/wallet_restore_from_keys_form.dart +++ b/lib/src/screens/restore/wallet_restore_from_keys_form.dart @@ -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 { maxLines: null)), BlockchainHeightWidget( key: blockchainHeightKey, + hasDatePicker: widget.walletRestoreViewModel.type != WalletType.haven, onHeightChange: (_) => null, onHeightOrDateEntered: widget.onHeightOrDateEntered) ]), diff --git a/lib/src/screens/restore/wallet_restore_page.dart b/lib/src/screens/restore/wallet_restore_page.dart index 65b6c03ec..708d3cc81 100644 --- a/lib/src/screens/restore/wallet_restore_page.dart +++ b/lib/src/screens/restore/wallet_restore_page.dart @@ -83,6 +83,7 @@ class WalletRestorePage extends BasePage { case WalletRestoreMode.keys: _pages.add(WalletRestoreFromKeysFrom( key: walletRestoreFromKeysFormKey, + walletRestoreViewModel: walletRestoreViewModel, onHeightOrDateEntered: (value) => walletRestoreViewModel.isButtonEnabled = value)); break;