mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-11 05:14:46 +00:00
save
This commit is contained in:
parent
82c7648897
commit
35deea5e17
2 changed files with 15 additions and 34 deletions
|
@ -22,6 +22,7 @@ import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/desktop_wallet
|
|||
import 'package:cake_wallet/src/screens/dashboard/edit_token_page.dart';
|
||||
import 'package:cake_wallet/src/screens/dashboard/home_settings_page.dart';
|
||||
import 'package:cake_wallet/src/screens/dashboard/widgets/transactions_page.dart';
|
||||
import 'package:cake_wallet/src/screens/nano/nano_change_rep_page.dart';
|
||||
import 'package:cake_wallet/src/screens/receive/anonpay_invoice_page.dart';
|
||||
import 'package:cake_wallet/src/screens/receive/anonpay_receive_page.dart';
|
||||
import 'package:cake_wallet/src/screens/settings/display_settings_page.dart';
|
||||
|
@ -69,6 +70,7 @@ import 'package:cake_wallet/view_model/ionia/ionia_gift_cards_list_view_model.da
|
|||
import 'package:cake_wallet/view_model/ionia/ionia_purchase_merch_view_model.dart';
|
||||
import 'package:cake_wallet/view_model/set_up_2fa_viewmodel.dart';
|
||||
import 'package:cake_wallet/view_model/restore/restore_from_qr_vm.dart';
|
||||
import 'package:cake_wallet/view_model/settings/change_rep_view_model.dart';
|
||||
import 'package:cake_wallet/view_model/settings/display_settings_view_model.dart';
|
||||
import 'package:cake_wallet/view_model/settings/other_settings_view_model.dart';
|
||||
import 'package:cake_wallet/view_model/settings/privacy_settings_view_model.dart';
|
||||
|
@ -657,6 +659,10 @@ Future setup({
|
|||
return OtherSettingsViewModel(getIt.get<SettingsStore>(), getIt.get<AppStore>().wallet!);
|
||||
});
|
||||
|
||||
getIt.registerFactory(() {
|
||||
return ChangeRepViewModel(getIt.get<SettingsStore>(), getIt.get<AppStore>().wallet!);
|
||||
});
|
||||
|
||||
getIt.registerFactory(() {
|
||||
return SecuritySettingsViewModel(getIt.get<SettingsStore>(), getIt.get<AuthService>());
|
||||
});
|
||||
|
@ -699,6 +705,8 @@ Future setup({
|
|||
|
||||
getIt.registerFactory(() => OtherSettingsPage(getIt.get<OtherSettingsViewModel>()));
|
||||
|
||||
getIt.registerFactory(() => NanoChangeRepPage(getIt.get<ChangeRepViewModel>()));
|
||||
|
||||
getIt.registerFactoryParam<NodeCreateOrEditViewModel, WalletType?, void>((WalletType? type, _) =>
|
||||
NodeCreateOrEditViewModel(
|
||||
_nodeSource, type ?? getIt.get<AppStore>().wallet!.type, getIt.get<SettingsStore>()));
|
||||
|
|
|
@ -4,6 +4,7 @@ import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
|
|||
import 'package:cake_wallet/src/widgets/base_text_form_field.dart';
|
||||
import 'package:cake_wallet/store/app_store.dart';
|
||||
import 'package:cake_wallet/utils/show_pop_up.dart';
|
||||
import 'package:cake_wallet/view_model/settings/change_rep_view_model.dart';
|
||||
import 'package:cw_core/crypto_currency.dart';
|
||||
import 'package:cw_nano/nano_wallet.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
@ -14,43 +15,15 @@ import 'package:cake_wallet/src/screens/base_page.dart';
|
|||
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
|
||||
|
||||
class NanoChangeRepPage extends BasePage {
|
||||
|
||||
NanoChangeRepPage()
|
||||
: _formKey = GlobalKey<FormState>(),
|
||||
_addressController = TextEditingController() {
|
||||
// reaction((_) => nodeCreateOrEditViewModel.address, (String address) {
|
||||
// if (address != _addressController.text) {
|
||||
// _addressController.text = address;
|
||||
// }
|
||||
// });
|
||||
|
||||
// reaction((_) => nodeCreateOrEditViewModel.port, (String port) {
|
||||
// if (port != _portController.text) {
|
||||
// _portController.text = port;
|
||||
// }
|
||||
// });
|
||||
|
||||
// if (nodeCreateOrEditViewModel.hasAuthCredentials) {
|
||||
// reaction((_) => nodeCreateOrEditViewModel.login, (String login) {
|
||||
// if (login != _loginController.text) {
|
||||
// _loginController.text = login;
|
||||
// }
|
||||
// });
|
||||
|
||||
// reaction((_) => nodeCreateOrEditViewModel.password, (String password) {
|
||||
// if (password != _passwordController.text) {
|
||||
// _passwordController.text = password;
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
// _addressController.addListener(
|
||||
// () => repViewModel.address = _addressController.text);
|
||||
// _portController.addListener(
|
||||
// () => nodeCreateOrEditViewModel.port = _portController.text);
|
||||
// _loginController.addListener(
|
||||
// () => nodeCreateOrEditViewModel.login = _loginController.text);
|
||||
// _passwordController.addListener(
|
||||
// () => nodeCreateOrEditViewModel.password = _passwordController.text);
|
||||
var wallet = getIt.get<AppStore>().wallet!;
|
||||
if (wallet is NanoWallet /*|| wallet is BananoWallet*/) {
|
||||
print(wallet.representative);
|
||||
_addressController.text = wallet.representative;
|
||||
}
|
||||
}
|
||||
|
||||
final GlobalKey<FormState> _formKey;
|
||||
|
|
Loading…
Reference in a new issue