mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-04 12:34:14 +01:00
Fixes and improvments.
This commit is contained in:
@@ -16,7 +16,7 @@ abstract class NodeListViewModelBase with Store {
|
||||
NodeListViewModelBase(this._nodeSource, this._wallet, this.settingsStore)
|
||||
: nodes = ObservableList<Node>() {
|
||||
_nodeSource.bindToList(nodes,
|
||||
filter: (Node val) => val.type == _wallet.type, initialFire: true);
|
||||
filter: (Node val) => val?.type == _wallet.type, initialFire: true);
|
||||
}
|
||||
|
||||
final ObservableList<Node> nodes;
|
||||
@@ -46,7 +46,8 @@ abstract class NodeListViewModelBase with Store {
|
||||
await setAsCurrent(node);
|
||||
}
|
||||
|
||||
Future<void> delete(Node node) async => _nodeSource.delete(node.key);
|
||||
@action
|
||||
Future<void> delete(Node node) async => node.delete();
|
||||
|
||||
Future<void> setAsCurrent(Node node) async =>
|
||||
settingsStore.currentNode = node;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:cake_wallet/entities/openalias_record.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:mobx/mobx.dart';
|
||||
import 'package:cake_wallet/core/template_validator.dart';
|
||||
@@ -144,6 +145,13 @@ abstract class SendViewModelBase with Store {
|
||||
void setTransactionPriority(TransactionPriority priority) =>
|
||||
_settingsStore.transactionPriority = priority;
|
||||
|
||||
Future<OpenaliasRecord> decodeOpenaliasRecord(String name) async {
|
||||
final record = await OpenaliasRecord
|
||||
.fetchAddressAndName(OpenaliasRecord.formatDomainName(name));
|
||||
|
||||
return record.name != name ? record : null;
|
||||
}
|
||||
|
||||
@action
|
||||
void _updateFiatAmount() {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user