protected override async Task BuildTransaction(string password, PaymentIntent payments, FeeStrategy feeStrategy, bool allowUnconfirmed = false, IEnumerable <OutPoint> allowedInputs = null) { BuildTransactionResult result = await Task.Run(() => Wallet.BuildTransaction(Password, payments, feeStrategy, allowUnconfirmed: true, allowedInputs: allowedInputs)); var txviewer = new TransactionViewerViewModel(); IoC.Get <IShell>().AddDocument(txviewer); IoC.Get <IShell>().Select(txviewer); txviewer.Update(result); ResetUi(); NotificationHelpers.Success("Transaction was built."); }
protected override Task DoAfterBuildTransaction(BuildTransactionResult result) { try { var txviewer = new TransactionViewerViewModel(); IoC.Get <IShell>().AddDocument(txviewer); IoC.Get <IShell>().Select(txviewer); txviewer.Update(result); ResetUi(); NotificationHelpers.Success("Transaction was built."); } catch (Exception ex) { return(Task.FromException(ex)); } return(Task.CompletedTask); }