mirror of
https://code.gri.mw/GUI/grim.git
synced 2026-07-09 16:37:28 +00:00
wallet: fix account loading
This commit is contained in:
@@ -1184,6 +1184,15 @@ fn sync_wallet_data(wallet: &Wallet, from_node: bool) {
|
||||
}
|
||||
}
|
||||
|
||||
// Setup accounts data.
|
||||
let last_height = info.1.last_confirmed_height;
|
||||
let spendable = if wallet.get_data().is_none() {
|
||||
None
|
||||
} else {
|
||||
Some(info.1.amount_currently_spendable)
|
||||
};
|
||||
update_accounts(wallet, last_height, spendable);
|
||||
|
||||
// Update wallet info.
|
||||
{
|
||||
let mut w_data = wallet.data.write();
|
||||
@@ -1195,15 +1204,6 @@ fn sync_wallet_data(wallet: &Wallet, from_node: bool) {
|
||||
*w_data = Some(WalletData { info: info.1.clone(), txs });
|
||||
}
|
||||
|
||||
// Setup accounts data.
|
||||
let last_height = info.1.last_confirmed_height;
|
||||
let spendable = if wallet.get_data().is_none() {
|
||||
None
|
||||
} else {
|
||||
Some(info.1.amount_currently_spendable)
|
||||
};
|
||||
update_accounts(wallet, last_height, spendable);
|
||||
|
||||
// Update txs sync progress at separate thread.
|
||||
let wallet_txs = wallet.clone();
|
||||
let (txs_tx, txs_rx) = mpsc::channel::<StatusMessage>();
|
||||
|
||||
Reference in New Issue
Block a user