Skip to content

Commit

Permalink
Add minrelayfee to payjoin request
Browse files Browse the repository at this point in the history
fixes #4689
  • Loading branch information
Kukks committed May 22, 2023
1 parent 44aaf7a commit 97e7e60
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Expand Up @@ -585,6 +585,7 @@ public async Task<IActionResult> GetOnChainWalletUTXOs(string storeId, string cr
{
await _delayedTransactionBroadcaster.Schedule(DateTimeOffset.UtcNow + TimeSpan.FromMinutes(2.0),
transaction, network);
_payjoinClient.MinimumFeeRate = minRelayFee;
var payjoinPSBT = await _payjoinClient.RequestPayjoin(
new BitcoinUrlBuilder(signingContext.PayJoinBIP21, network.NBitcoinNetwork),
new PayjoinWallet(derivationScheme),
Expand Down
2 changes: 2 additions & 0 deletions BTCPayServer/Controllers/UIWalletsController.PSBT.cs
Expand Up @@ -318,6 +318,8 @@ private async Task<PSBT> GetPayjoinProposedTX(BitcoinUrlBuilder bip21, PSBT psbt
await _broadcaster.Schedule(DateTimeOffset.UtcNow + TimeSpan.FromMinutes(2.0), cloned.ExtractTransaction(), btcPayNetwork);
using var cts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken);
cts.CancelAfter(TimeSpan.FromSeconds(30));
var minRelayFee = _dashboard.Get(btcPayNetwork.CryptoCode).Status.BitcoinStatus?.MinRelayTxFee;
_payjoinClient.MinimumFeeRate = minRelayFee;
return await _payjoinClient.RequestPayjoin(bip21, new PayjoinWallet(derivationSchemeSettings), psbt, cts.Token);
}

Expand Down

1 comment on commit 97e7e60

@DanGould
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for grabbing this fix ❤️

Please sign in to comment.