Exemplo n.º 1
0
        internal async void CreateWallet(WalletCreationViewModel walletCreationViewModel)
        {
            WalletCreation creation = walletCreationViewModel.CreateWalletCreation();

            Message = "Creating wallet...";
            Wallet wallet = await CreateWallet(creation);

            Message = "Wallet created";
            var walletVm = new WalletViewModel(wallet, walletCreationViewModel);

            Wallets.Add(walletVm);
            if (SelectedWallet == null)
            {
                SelectedWallet = walletVm;
            }
            walletVm.Save();
            if (_ConnectionParameters != null)
            {
                wallet.Configure(_ConnectionParameters);
                wallet.Connect();
            }
        }
Exemplo n.º 2
0
 public WalletViewModel(Wallet wallet, WalletCreationViewModel creation)
 {
     this._Wallet = wallet;
     Name         = creation.Name;
     PrivateKeys  = creation.Keys.Where(k => k.PrivateKey != null).Select(k => k.PrivateKey).ToArray();
 }
Exemplo n.º 3
0
 public WalletKeyViewModel(WalletCreationViewModel parent)
 {
     this.parent = parent;
 }