mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 22:25:28 +01:00
Fix payjoin tests
This commit is contained in:
parent
b1cc30d25d
commit
b203d369fb
2 changed files with 4 additions and 2 deletions
|
@ -152,7 +152,7 @@ namespace BTCPayServer.Controllers
|
|||
var cloned = psbt.Clone();
|
||||
cloned = cloned.Finalize();
|
||||
await _broadcaster.Schedule(DateTimeOffset.UtcNow + TimeSpan.FromMinutes(1.0), cloned.ExtractTransaction(), btcPayNetwork);
|
||||
return await _payjoinClient.RequestPayjoin(endpoint, derivationSchemeSettings, cloned, cancellationToken);
|
||||
return await _payjoinClient.RequestPayjoin(endpoint, derivationSchemeSettings, psbt, cancellationToken);
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
|
|
|
@ -32,6 +32,8 @@ namespace BTCPayServer.Services
|
|||
if (endpoint == null) throw new ArgumentNullException(nameof(endpoint));
|
||||
if (derivationSchemeSettings == null) throw new ArgumentNullException(nameof(derivationSchemeSettings));
|
||||
if (originalTx == null) throw new ArgumentNullException(nameof(originalTx));
|
||||
if (originalTx.IsAllFinalized())
|
||||
throw new InvalidOperationException("The original PSBT should not be finalized.");
|
||||
|
||||
var signingAccount = derivationSchemeSettings.GetSigningAccountKeySettings();
|
||||
var sentBefore = -originalTx.GetBalance(derivationSchemeSettings.AccountDerivation,
|
||||
|
@ -42,7 +44,7 @@ namespace BTCPayServer.Services
|
|||
throw new ArgumentException("originalTx should have utxo information", nameof(originalTx));
|
||||
var originalFee = originalTx.GetFee();
|
||||
var cloned = originalTx.Clone();
|
||||
if (!cloned.IsAllFinalized() && !cloned.TryFinalize(out var errors))
|
||||
if (!cloned.TryFinalize(out var errors))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue