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;