mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-01 12:04:21 +01:00
fix lag on saving frozen coin status (#3164)
* fix lag on saving frozen coin status * wrap saveUnspentCoinInfo in @action * revert fix + safeguard coin control page
This commit is contained in:
@@ -116,6 +116,7 @@ abstract class UnspentCoinsListViewModelBase with Store {
|
||||
|
||||
bool get hasAdjustableFieldChanged => items.any(_hasAdjustableFieldChanged);
|
||||
|
||||
@action
|
||||
Future<void> saveUnspentCoinInfo(UnspentCoinsItem item) async {
|
||||
try {
|
||||
item.isBeingSaved = true;
|
||||
@@ -129,8 +130,6 @@ abstract class UnspentCoinsListViewModelBase with Store {
|
||||
existingInfo.note = item.note;
|
||||
|
||||
await existingInfo.save();
|
||||
await _updateUnspents();
|
||||
await wallet.updateBalance();
|
||||
item.isBeingSaved = false;
|
||||
isSavingItems = false;
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user