Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/Data/Repositories/WalletWithdrawalRequestRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,13 @@ public async Task<List<WalletWithdrawalRequest>> 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);

Expand Down
11 changes: 9 additions & 2 deletions src/Pages/Withdrawals.razor
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@
TemplatePsbtString="@_templatePsbtString"
ApproveRequestDelegate="async () => await ApproveRequestDelegate()"/>

<CancelOrRejectPopup

Check warning on line 419 in src/Pages/Withdrawals.razor

View workflow job for this annotation

GitHub Actions / build-and-test

Component 'CancelOrRejectPopup' expects a value for the parameter 'Reason', but a value may not have been provided.
@ref="@_rejectCancelModalRef"
Title='@("Wallet withdrawal:" + _selectedRequest?.Id)'
Validator="@RejectReasonValidator"
Expand Down Expand Up @@ -585,6 +585,14 @@
arg.Item.WithdrawAllFunds = _isCheckedAllFunds || _amount == _selectedRequestWalletBalance;
arg.Item.MempoolRecommendedFeesType = _selectedMempoolRecommendedFeesType;
arg.Item.CustomFeeRate = _customSatPerVbAmount;
arg.Item.WalletWithdrawalRequestDestinations = new List<WalletWithdrawalRequestDestination>
{
new WalletWithdrawalRequestDestination
{
Address = arg.Item.WalletWithdrawalRequestDestinations?.FirstOrDefault()?.Address ?? "",
Amount = amount
}
};

if (arg.Item.Wallet.IsHotWallet)
{
Expand Down Expand Up @@ -1075,8 +1083,7 @@

private void OnDestinationAddressChanged(CellEditContext<WalletWithdrawalRequest> context, string text)
{
var amount = _selectedUTXOs.Count > 0 ? SelectedUTXOsValue() : _amount;
context.CellValue = new List<WalletWithdrawalRequestDestination> { new() { Address = text, Amount = amount } };
context.CellValue = new List<WalletWithdrawalRequestDestination> { new() { Address = text, Amount = 0m } };
Comment thread
Jossec101 marked this conversation as resolved.
}

private string GetDestinationAddressFromCellValue(object cellValue)
Expand Down
Loading