Пример #1
0
        public async Task InitializeTrezorAsync()
        {
            //Get the first available device and connect to it
            var devices = await DeviceManager.Current.GetDevicesAsync(_DeviceDefinitions);

            TrezorDevice = devices.FirstOrDefault();
            await TrezorDevice.InitializeAsync();
        }
Пример #2
0
        public async Task InitializeTrezorAsync()
        {
            //Get the first available device and connect to it
            var devices = await DeviceManager.Current.GetDevicesAsync(_DeviceDefinitions);

            TrezorDevice = devices.FirstOrDefault();

            if (TrezorDevice == null)
            {
                throw new Exception("There were no devices found");
            }

            await TrezorDevice.InitializeAsync();
        }
Пример #3
0
        public async Task InitializeTrezorAsync()
        {
            //Get the first available device and connect to it
            var devices = await DeviceListener.DeviceFactory.GetConnectedDeviceDefinitionsAsync().ConfigureAwait(false);

            var firstConnectedDeviceDefinition = devices.FirstOrDefault();

            TrezorDevice = await DeviceListener.DeviceFactory.GetDeviceAsync(firstConnectedDeviceDefinition).ConfigureAwait(false);

            if (TrezorDevice == null)
            {
                throw new Exception("There were no devices found");
            }

            await TrezorDevice.InitializeAsync().ConfigureAwait(false);
        }