Make tx label endpoint not error

This commit is contained in:
Kukks
2022-07-28 15:33:28 +02:00
parent 5ef31a96ea
commit 4be5eb39ff
4 changed files with 19 additions and 6 deletions

View File

@@ -254,7 +254,8 @@ namespace BTCPayServer.Controllers.Greenfield
string storeId,
string cryptoCode,
string transactionId,
[FromBody] PatchOnChainTransactionRequest request
[FromBody] PatchOnChainTransactionRequest request,
bool force = false
)
{
if (IsInvalidWalletRequest(cryptoCode, out var network,
@@ -263,7 +264,7 @@ namespace BTCPayServer.Controllers.Greenfield
var wallet = _btcPayWalletProvider.GetWallet(network);
var tx = await wallet.FetchTransaction(derivationScheme.AccountDerivation, uint256.Parse(transactionId));
if (tx is null)
if (!force && tx is null)
{
return this.CreateAPIError(404, "transaction-not-found", "The transaction was not found.");
}