Exemplo n.º 1
0
        public ConnectHardwareWalletViewModel(string walletName, Network network, WalletManager walletManager)
        {
            Title      = "Hardware Wallet";
            _message   = "";
            IsBusy     = true;
            WalletName = walletName;
            HardwareWalletOperations = new HardwareWalletOperations(walletManager, network);
            HardwareWalletOperations.NoHardwareWalletFound += OnNoHardwareWalletFound;

            BackCommand = ReactiveCommand.Create(() =>
            {
                HardwareWalletOperations.Dispose();
                Navigate().Back();
            });

            CancelCommand = ReactiveCommand.Create(() =>
            {
                HardwareWalletOperations.Dispose();
                Navigate().Clear();
            });

            NextCommand = ReactiveCommand.Create(() =>
            {
                HardwareWalletOperations.StartDetection();
                ContinueButtonEnable = false;
                Message = "";
            });

            // TODO: Create an up-to-date article
            OpenBrowserCommand = ReactiveCommand.CreateFromTask(async() =>
                                                                await IoHelpers.OpenBrowserAsync("https://docs.wasabiwallet.io/using-wasabi/ColdWasabi.html#using-hardware-wallet-step-by-step"));
        }
Exemplo n.º 2
0
        public ConnectHardwareWalletViewModel(string walletName, Network network, WalletManager walletManager)
        {
            IsBusy = true;

            WalletName = walletName;
            HardwareWalletOperations = new HardwareWalletOperations(walletManager, network);
            HardwareWalletOperations.NoHardwareWalletFound += OnNoHardwareWalletFound;

            BackCommand = ReactiveCommand.Create(() =>
            {
                HardwareWalletOperations.Dispose();
                Navigate().Back();
            });

            CancelCommand = ReactiveCommand.Create(() =>
            {
                HardwareWalletOperations.Dispose();
                Navigate().Clear();
            });

            NextCommand = ReactiveCommand.Create(() =>
            {
                HardwareWalletOperations.StartDetection();
                ContinueButtonEnable = false;
                Message = "";
            });

            _message = "";
        }