mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-21 06:18:42 +02:00
CAKE-343 | added wallet_addresses.dart, monero_wallet_addresses.dart, electrum_wallet_addresses.dart, wallet_addresses_credentials.dart, monero_wallet_addresses_credentials.dart and electrum_wallet_addresses_credentials.dart to the app; applied ElectrumWalletAddresses to electrum_wallet.dart and MoneroWalletAddresses to monero_wallet.dart; fixed contact_list_view_model.dart, other view models and services
This commit is contained in:
@@ -18,18 +18,17 @@ abstract class ContactListViewModelBase with Store {
|
||||
: contacts = ObservableList<ContactRecord>(),
|
||||
walletContacts = [] {
|
||||
walletInfoSource.values.forEach((info) {
|
||||
if (info.address?.isNotEmpty ?? false) {
|
||||
if (info.addresses != null) {
|
||||
info.addresses?.forEach((address, label) {
|
||||
walletContacts.add(WalletContact(
|
||||
address,
|
||||
info.name + ' ($label)',
|
||||
walletTypeToCryptoCurrency(info.type)));
|
||||
});
|
||||
} else {
|
||||
walletContacts.add(WalletContact(info.address, info.name,
|
||||
if (info.addresses?.isNotEmpty ?? false) {
|
||||
info.addresses?.forEach((address, label) {
|
||||
final name = label.isNotEmpty
|
||||
? info.name + ' ($label)'
|
||||
: info.name;
|
||||
|
||||
walletContacts.add(WalletContact(
|
||||
address,
|
||||
name,
|
||||
walletTypeToCryptoCurrency(info.type)));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -42,8 +42,7 @@ abstract class MoneroAccountEditOrCreateViewModelBase with Store {
|
||||
await _moneroAccountList.addAccount(label: label);
|
||||
}
|
||||
|
||||
await _wallet.updateAddressesInfo();
|
||||
|
||||
await _wallet.save();
|
||||
state = ExecutedSuccessfullyState();
|
||||
} catch (e) {
|
||||
state = FailureState(e.toString());
|
||||
|
||||
@@ -54,8 +54,6 @@ abstract class WalletAddressEditOrCreateViewModelBase with Store {
|
||||
await _createNew();
|
||||
}
|
||||
|
||||
await _wallet.updateAddressesInfo();
|
||||
|
||||
state = AddressSavedSuccessfully();
|
||||
} catch (e) {
|
||||
state = AddressEditOrCreateStateFailure(error: e.toString());
|
||||
|
||||
@@ -54,7 +54,6 @@ abstract class WalletCreationVMBase with Store {
|
||||
await _walletInfoSource.add(walletInfo);
|
||||
_appStore.changeCurrentWallet(wallet);
|
||||
_appStore.authenticationStore.allowed();
|
||||
await wallet.updateAddressesInfo();
|
||||
state = ExecutedSuccessfullyState();
|
||||
} catch (e) {
|
||||
state = FailureState(e.toString());
|
||||
|
||||
Reference in New Issue
Block a user