Show pinpad on hw wallet load.
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/PinPadViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/PinPadViewModel.cs
@@ -34,10 +34,8 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
public PinPadViewModel(WalletViewModel walletViewModel) : base("Pin Pad", walletViewModel)
{
- SendPinCommand = ReactiveCommand.CreateFromTask(async () =>
+ SendPinCommand = ReactiveCommand.Create(() =>
{
- var sendTab = IoC.Get<IShell>().Documents.OfType<SendTabViewModel>().FirstOrDefault();
- sendTab.DisplayActionTab();
OnClose();
},
this.WhenAny(x => x.MaskedPin, (maskedPin) => (!string.IsNullOrWhiteSpace(maskedPin.Value))));

MODIFY
WalletWasabi.Gui/Tabs/WalletManager/LoadWalletViewModel.cs
WalletWasabi.Gui/Tabs/WalletManager/LoadWalletViewModel.cs
@@ -416,6 +416,19 @@ namespace WalletWasabi.Gui.Tabs.WalletManager
{
throw new IOException("promptpin request failed.");
}
+ var pinpad = IoC.Get<IShell>().Documents.OfType<PinPadViewModel>().FirstOrDefault();
+ if (pinpad is null)
+ {
+ pinpad = new PinPadViewModel(null);
+ IoC.Get<IShell>().AddOrSelectDocument(pinpad);
+ }
+ pinpad.DisplayActionTab();
+ while (pinpad.IsSelected)
+ {
+ await Task.Delay(100);
+ }
+ var maskedPin = pinpad.MaskedPin;
+ await HwiProcessManager.SendPinAsync(selectedWallet.HardwareWalletInfo, int.Parse(maskedPin));
selectedWallet.HardwareWalletInfo.SetNeedPinFalse();
}

Show pinpad on hw wallet load.