diff --git a/src/Data/Repositories/WalletWithdrawalRequestRepository.cs b/src/Data/Repositories/WalletWithdrawalRequestRepository.cs index a458bf92..56c83bb4 100644 --- a/src/Data/Repositories/WalletWithdrawalRequestRepository.cs +++ b/src/Data/Repositories/WalletWithdrawalRequestRepository.cs @@ -135,6 +135,13 @@ public async Task> GetAllUnsignedPendingRequests() type.SetCreationDatetime(); type.SetUpdateDatetime(); + // Set the types for the destinations + type.WalletWithdrawalRequestDestinations?.ForEach(destination => + { + destination.SetCreationDatetime(); + destination.SetUpdateDatetime(); + }); + //Verify that the wallet has enough funds calling nbxplorer var wallet = await applicationDbContext.Wallets.Include(x => x.Keys).SingleOrDefaultAsync(x => x.Id == type.WalletId); diff --git a/src/Pages/Withdrawals.razor b/src/Pages/Withdrawals.razor index 830e8edc..8e01a68d 100644 --- a/src/Pages/Withdrawals.razor +++ b/src/Pages/Withdrawals.razor @@ -585,6 +585,14 @@ arg.Item.WithdrawAllFunds = _isCheckedAllFunds || _amount == _selectedRequestWalletBalance; arg.Item.MempoolRecommendedFeesType = _selectedMempoolRecommendedFeesType; arg.Item.CustomFeeRate = _customSatPerVbAmount; + arg.Item.WalletWithdrawalRequestDestinations = new List + { + new WalletWithdrawalRequestDestination + { + Address = arg.Item.WalletWithdrawalRequestDestinations?.FirstOrDefault()?.Address ?? "", + Amount = amount + } + }; if (arg.Item.Wallet.IsHotWallet) { @@ -1075,8 +1083,7 @@ private void OnDestinationAddressChanged(CellEditContext context, string text) { - var amount = _selectedUTXOs.Count > 0 ? SelectedUTXOsValue() : _amount; - context.CellValue = new List { new() { Address = text, Amount = amount } }; + context.CellValue = new List { new() { Address = text, Amount = 0m } }; } private string GetDestinationAddressFromCellValue(object cellValue)