init during txn building if needed
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionPreviewViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionPreviewViewModel.cs
@@ -105,7 +105,6 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
if (result.Kind == DialogResultKind.Normal)
{
- await InitialiseTransactionAsync();
await BuildAndUpdateAsync();
}
}
@@ -202,6 +201,11 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
private async Task<BuildTransactionResult?> BuildTransactionAsync()
{
+ if (!await InitialiseTransactionAsync())
+ {
+ return null;
+ }
+
try
{
IsBusy = true;
@@ -336,15 +340,10 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
{
RxApp.MainThreadScheduler.Schedule(async () =>
{
- if (await InitialiseTransactionAsync())
- {
- var initialTransaction = await BuildTransactionAsync();
-
- if (initialTransaction is { })
+ if (await BuildTransactionAsync() is { } initialTransaction)
{
UpdateTransaction(initialTransaction);
}
- }
else
{
Navigate().Back();

init during txn building if needed