internal static WalletViewModel[] Load(string directory) { List <WalletViewModel> wallets = new List <WalletViewModel>(); foreach (var child in new DirectoryInfo(directory).GetDirectories()) { WalletViewModel vm = new WalletViewModel(); vm.Name = child.Name; try { vm.PrivateKeys = File.ReadAllText(vm.PrivateKeyFile()) .Split(',') .Select(c => new BitcoinExtKey(c, App.Network)) .ToArray(); using (var fs = File.Open(vm.WalletFile(), FileMode.Open)) { vm._Wallet = Wallet.Load(fs); } wallets.Add(vm); } catch (IOException) { } } return(wallets.ToArray()); }