Add minrelayfee to payjoin request

fixes #4689
This commit is contained in:
Kukks
2023-05-22 14:56:02 +02:00
parent 44aaf7acbb
commit 97e7e60cea
2 changed files with 3 additions and 0 deletions

View File

@@ -318,6 +318,8 @@ namespace BTCPayServer.Controllers
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);
}