wallet + ui: select wallet after creation, wallet panels dual mode refactoring

This commit is contained in:
ardocrat
2023-08-01 02:10:45 +03:00
parent 80a04596df
commit 08c202519e
2 changed files with 30 additions and 13 deletions
+4 -1
View File
@@ -74,7 +74,10 @@ impl Wallets {
)-> Result<(), Error> {
let wallet = Wallet::create(name, password, mnemonic, external_node_url)?;
let mut w_state = WALLETS_STATE.write().unwrap();
w_state.list.push(wallet);
let id = wallet.config.id;
w_state.opened_ids.insert(id);
w_state.selected_id = Some(id);
w_state.list.insert(0, wallet);
Ok(())
}