mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-23 12:09:43 +00:00
Allow null AccountListItem for create purpose not just editing (#558)
This commit is contained in:
parent
fb8017a93c
commit
d9415af4de
2 changed files with 5 additions and 5 deletions
|
@ -419,16 +419,16 @@ Future setup(
|
||||||
getIt.get<MoneroAccountEditOrCreateViewModel>()));*/
|
getIt.get<MoneroAccountEditOrCreateViewModel>()));*/
|
||||||
|
|
||||||
getIt.registerFactoryParam<MoneroAccountEditOrCreateViewModel,
|
getIt.registerFactoryParam<MoneroAccountEditOrCreateViewModel,
|
||||||
AccountListItem, void>(
|
AccountListItem?, void>(
|
||||||
(AccountListItem account, _) => MoneroAccountEditOrCreateViewModel(
|
(AccountListItem? account, _) => MoneroAccountEditOrCreateViewModel(
|
||||||
monero!.getAccountList(getIt.get<AppStore>().wallet!),
|
monero!.getAccountList(getIt.get<AppStore>().wallet!),
|
||||||
haven?.getAccountList(getIt.get<AppStore>().wallet!),
|
haven?.getAccountList(getIt.get<AppStore>().wallet!),
|
||||||
wallet: getIt.get<AppStore>().wallet!,
|
wallet: getIt.get<AppStore>().wallet!,
|
||||||
accountListItem: account));
|
accountListItem: account));
|
||||||
|
|
||||||
getIt.registerFactoryParam<MoneroAccountEditOrCreatePage, AccountListItem,
|
getIt.registerFactoryParam<MoneroAccountEditOrCreatePage, AccountListItem?,
|
||||||
void>(
|
void>(
|
||||||
(AccountListItem account, _) => MoneroAccountEditOrCreatePage(
|
(AccountListItem? account, _) => MoneroAccountEditOrCreatePage(
|
||||||
moneroAccountCreationViewModel:
|
moneroAccountCreationViewModel:
|
||||||
getIt.get<MoneroAccountEditOrCreateViewModel>(param1: account)));
|
getIt.get<MoneroAccountEditOrCreateViewModel>(param1: account)));
|
||||||
|
|
||||||
|
|
|
@ -293,7 +293,7 @@ Route<dynamic> createRoute(RouteSettings settings) {
|
||||||
case Routes.accountCreation:
|
case Routes.accountCreation:
|
||||||
return CupertinoPageRoute<String>(
|
return CupertinoPageRoute<String>(
|
||||||
builder: (_) => getIt.get<MoneroAccountEditOrCreatePage>(
|
builder: (_) => getIt.get<MoneroAccountEditOrCreatePage>(
|
||||||
param1: settings.arguments as AccountListItem));
|
param1: settings.arguments as AccountListItem?));
|
||||||
|
|
||||||
case Routes.addressBook:
|
case Routes.addressBook:
|
||||||
return MaterialPageRoute<void>(
|
return MaterialPageRoute<void>(
|
||||||
|
|
Loading…
Reference in a new issue