Compare commits
22 Commits
sync-modal
...
v1.0.5.9
Author | SHA1 | Date | |
---|---|---|---|
816e96f157 | |||
4be49f7dba | |||
9a3a6c8be0 | |||
236ad40a60 | |||
a0dfe5bce9 | |||
0ca7f4678a | |||
74370c70a6 | |||
908398de2e | |||
27c3a34263 | |||
a4d76fb33b | |||
12f525ebd8 | |||
8a9b04c2cf | |||
853558c9a1 | |||
c02a88837f | |||
db2a71b055 | |||
3e22ec7627 | |||
f011df1081 | |||
b1fbbb5193 | |||
0773a0ace5 | |||
3a8a7fe43f | |||
29399026e3 | |||
f1cd763873 |
8
.github/ISSUE_TEMPLATE/bug-report.md
vendored
8
.github/ISSUE_TEMPLATE/bug-report.md
vendored
@ -24,15 +24,15 @@ A clear and concise description of what you expected to happen.
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Your BTCPay Environment (please complete the following information):**
|
||||
- BTCPay Server Version [available in the right bottom corner of footer]
|
||||
- Deployment Method: [e.g. Docker, Manual, Third-Party-hoist]
|
||||
- Browser [e.g. chrome, safari]
|
||||
- BTCPay Server Version: [available in the right bottom corner of footer]
|
||||
- Deployment Method: [e.g. Docker, Manual, Third-Party-host]
|
||||
- Browser: [e.g. Chrome, Safari]
|
||||
|
||||
**Logs (if applicable)**
|
||||
Basic logs can be found in Server Settings > Logs. More logs https://docs.btcpayserver.org/Troubleshooting/#2-looking-through-the-logs
|
||||
|
||||
**Setup Parameters**
|
||||
If you're reporting a deployment issue run `. btcpay-setup.sh -i` and paste your the parameters by obscuring private information.
|
||||
If you're reporting a deployment issue run `. btcpay-setup.sh -i` and paste the setup parameters here with your private information removed or obscured.
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
|
@ -27,7 +27,7 @@
|
||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="NBitcoin" Version="5.0.51" />
|
||||
<PackageReference Include="NBitcoin" Version="5.0.60" />
|
||||
<PackageReference Include="BTCPayServer.Lightning.Common" Version="1.2.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
||||
</ItemGroup>
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<FrameworkReference Include="Microsoft.AspNetCore.App" />
|
||||
<PackageReference Include="NBXplorer.Client" Version="3.0.18" />
|
||||
<PackageReference Include="NBXplorer.Client" Version="3.0.19" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(Altcoins)' != 'true'">
|
||||
<Compile Remove="Altcoins\**\*.cs"></Compile>
|
||||
|
@ -6,7 +6,7 @@
|
||||
<FrameworkReference Include="Microsoft.AspNetCore.App" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.6.0" />
|
||||
<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="5.2.7" />
|
||||
<PackageReference Include="NBitcoin" Version="5.0.51" />
|
||||
<PackageReference Include="NBitcoin" Version="5.0.60" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
||||
<PackageReference Include="DigitalRuby.ExchangeSharp" Version="0.6.3" />
|
||||
</ItemGroup>
|
||||
|
@ -82,7 +82,7 @@ services:
|
||||
- customer_lnd
|
||||
- merchant_lnd
|
||||
nbxplorer:
|
||||
image: nicolasdorier/nbxplorer:2.1.42
|
||||
image: nicolasdorier/nbxplorer:2.1.45
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "32838:32838"
|
||||
|
@ -79,7 +79,7 @@ services:
|
||||
- customer_lnd
|
||||
- merchant_lnd
|
||||
nbxplorer:
|
||||
image: nicolasdorier/nbxplorer:2.1.42
|
||||
image: nicolasdorier/nbxplorer:2.1.45
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "32838:32838"
|
||||
|
@ -1,4 +1,4 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Import Project="../Build/Version.csproj" Condition="Exists('../Build/Version.csproj')" />
|
||||
<Import Project="../Build/Common.csproj" />
|
||||
|
||||
|
@ -606,7 +606,7 @@ namespace BTCPayServer.Controllers
|
||||
}
|
||||
|
||||
AddErrors(result);
|
||||
return View();
|
||||
return View(model);
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
|
@ -262,6 +262,8 @@ namespace BTCPayServer.Controllers
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> Policies(PoliciesSettings settings, string command = "")
|
||||
{
|
||||
|
||||
ViewBag.UpdateUrlPresent = _Options.UpdateUrl != null;
|
||||
ViewBag.AppsList = await GetAppSelectList();
|
||||
if (command == "add-domain")
|
||||
{
|
||||
|
@ -112,12 +112,12 @@ namespace BTCPayServer.Hosting
|
||||
ApplicationDbContextFactory dbContext = null;
|
||||
if (!String.IsNullOrEmpty(opts.PostgresConnectionString))
|
||||
{
|
||||
Logs.Configuration.LogInformation($"Postgres DB used ({opts.PostgresConnectionString})");
|
||||
Logs.Configuration.LogInformation($"Postgres DB used");
|
||||
dbContext = new ApplicationDbContextFactory(DatabaseType.Postgres, opts.PostgresConnectionString);
|
||||
}
|
||||
else if (!String.IsNullOrEmpty(opts.MySQLConnectionString))
|
||||
{
|
||||
Logs.Configuration.LogInformation($"MySQL DB used ({opts.MySQLConnectionString})");
|
||||
Logs.Configuration.LogInformation($"MySQL DB used");
|
||||
Logs.Configuration.LogWarning("MySQL is not widely tested and should be considered experimental, we advise you to use postgres instead.");
|
||||
dbContext = new ApplicationDbContextFactory(DatabaseType.MySQL, opts.MySQLConnectionString);
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ namespace BTCPayServer.Models.WalletViewModels
|
||||
public string RateError { get; set; }
|
||||
public bool SupportRBF { get; set; }
|
||||
[Display(Name = "Always include non-witness UTXO if available")]
|
||||
public bool AlwaysIncludeNonWitnessUTXO { get; set; } = true;
|
||||
public bool AlwaysIncludeNonWitnessUTXO { get; set; }
|
||||
[Display(Name = "Allow fee increase (RBF)")]
|
||||
public ThreeStateBool AllowFeeBump { get; set; }
|
||||
|
||||
|
@ -138,9 +138,7 @@ namespace BTCPayServer.Payments.Bitcoin
|
||||
switch (newEvent)
|
||||
{
|
||||
case NBXplorer.Models.NewBlockEvent evt:
|
||||
await Task.WhenAll((await _InvoiceRepository.GetPendingInvoices())
|
||||
.Select(invoiceId => UpdatePaymentStates(wallet, invoiceId))
|
||||
.ToArray());
|
||||
await UpdatePaymentStates(wallet, await _InvoiceRepository.GetPendingInvoices());
|
||||
_Aggregator.Publish(new Events.NewBlockEvent() { CryptoCode = evt.CryptoCode });
|
||||
break;
|
||||
case NBXplorer.Models.NewTransactionEvent evt:
|
||||
@ -206,11 +204,21 @@ namespace BTCPayServer.Payments.Bitcoin
|
||||
}
|
||||
}
|
||||
|
||||
async Task UpdatePaymentStates(BTCPayWallet wallet, string[] invoiceIds)
|
||||
{
|
||||
var invoices = await _InvoiceRepository.GetInvoices(invoiceIds);
|
||||
await Task.WhenAll(invoices.Select(i => UpdatePaymentStates(wallet, i)).ToArray());
|
||||
}
|
||||
async Task<InvoiceEntity> UpdatePaymentStates(BTCPayWallet wallet, string invoiceId)
|
||||
{
|
||||
var invoice = await _InvoiceRepository.GetInvoice(invoiceId, false);
|
||||
if (invoice == null)
|
||||
return null;
|
||||
return await UpdatePaymentStates(wallet, invoice);
|
||||
}
|
||||
async Task<InvoiceEntity> UpdatePaymentStates(BTCPayWallet wallet, InvoiceEntity invoice)
|
||||
{
|
||||
|
||||
List<PaymentEntity> updatedPaymentEntities = new List<PaymentEntity>();
|
||||
var transactions = await wallet.GetTransactions(invoice.GetAllBitcoinPaymentData()
|
||||
.Select(p => p.Outpoint.Hash)
|
||||
@ -363,7 +371,7 @@ namespace BTCPayServer.Payments.Bitcoin
|
||||
var address = network.NBXplorerNetwork.CreateAddress(strategy, coin.KeyPath, coin.ScriptPubKey);
|
||||
|
||||
var paymentData = new BitcoinLikePaymentData(address, coin.Value, coin.OutPoint,
|
||||
transaction.Transaction.RBF, coin.KeyPath);
|
||||
transaction?.Transaction is null ? true : transaction.Transaction.RBF, coin.KeyPath);
|
||||
|
||||
var payment = await _InvoiceRepository.AddPayment(invoice.Id, coin.Timestamp, paymentData, network).ConfigureAwait(false);
|
||||
alreadyAccounted.Add(coin.OutPoint);
|
||||
|
@ -127,6 +127,7 @@ retry:
|
||||
if (invoiceData.CustomerEmail == null && data.Email != null)
|
||||
{
|
||||
invoiceData.CustomerEmail = data.Email;
|
||||
AddToTextSearch(invoiceId, invoiceData.CustomerEmail);
|
||||
}
|
||||
await ctx.SaveChangesAsync().ConfigureAwait(false);
|
||||
}
|
||||
@ -204,7 +205,7 @@ retry:
|
||||
textSearch.Add(invoice.Metadata.OrderId);
|
||||
textSearch.Add(ToString(invoice.Metadata, null));
|
||||
textSearch.Add(invoice.StoreId);
|
||||
|
||||
textSearch.Add(invoice.Metadata.BuyerEmail);
|
||||
AddToTextSearch(invoice.Id, textSearch.ToArray());
|
||||
return invoice;
|
||||
}
|
||||
@ -374,7 +375,7 @@ retry:
|
||||
{
|
||||
using (var tx = _Engine.GetTransaction())
|
||||
{
|
||||
tx.TextAppend("InvoiceSearch", Encoders.Base58.DecodeData(invoiceId), string.Join(" ", terms.Where(t => !String.IsNullOrWhiteSpace(t))));
|
||||
tx.TextAppend("InvoiceSearch", Encoders.Base58.DecodeData(invoiceId), string.Join(" ", terms.Where(t => !string.IsNullOrWhiteSpace(t))));
|
||||
tx.Commit();
|
||||
}
|
||||
});
|
||||
@ -471,6 +472,20 @@ retry:
|
||||
var res = await GetInvoiceRaw(id, inludeAddressData);
|
||||
return res == null ? null : ToEntity(res);
|
||||
}
|
||||
public async Task<InvoiceEntity[]> GetInvoices(string[] invoiceIds)
|
||||
{
|
||||
var invoiceIdSet = invoiceIds.ToHashSet();
|
||||
using (var context = _ContextFactory.CreateContext())
|
||||
{
|
||||
IQueryable<Data.InvoiceData> query =
|
||||
context
|
||||
.Invoices
|
||||
.Include(o => o.Payments)
|
||||
.Where(o => invoiceIdSet.Contains(o.Id));
|
||||
|
||||
return (await query.ToListAsync()).Select(o => ToEntity(o)).ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
private async Task<InvoiceData> GetInvoiceRaw(string id, bool inludeAddressData = false)
|
||||
{
|
||||
|
@ -109,10 +109,11 @@ namespace BTCPayServer.Services
|
||||
if (!signedPSBT.TryGetEstimatedFeeRate(out var originalFeeRate))
|
||||
throw new ArgumentException("signedPSBT should have utxo information", nameof(signedPSBT));
|
||||
var originalFee = signedPSBT.GetFee();
|
||||
optionalParameters.MaxAdditionalFeeContribution = MaxFeeBumpContribution is null ?
|
||||
// By default, we want to keep same fee rate and a single additional input
|
||||
originalFeeRate.GetFee(GetVirtualSize(inputScriptType)) :
|
||||
MaxFeeBumpContribution;
|
||||
if (changeOutput is PSBTOutput)
|
||||
optionalParameters.MaxAdditionalFeeContribution = MaxFeeBumpContribution is null ?
|
||||
// By default, we want to keep same fee rate and a single additional input
|
||||
originalFeeRate.GetFee(GetVirtualSize(inputScriptType)) :
|
||||
MaxFeeBumpContribution;
|
||||
if (MinimumFeeRate is FeeRate v)
|
||||
optionalParameters.MinFeeRate = v;
|
||||
|
||||
@ -314,7 +315,7 @@ namespace BTCPayServer.Services
|
||||
using (HttpClient client = CreateHttpClient(endpoint))
|
||||
{
|
||||
var bpuresponse = await client.PostAsync(endpoint,
|
||||
new StringContent(originalTx.ToHex(), Encoding.UTF8, "text/plain"), cancellationToken);
|
||||
new StringContent(originalTx.ToBase64(), Encoding.UTF8, "text/plain"), cancellationToken);
|
||||
if (!bpuresponse.IsSuccessStatusCode)
|
||||
{
|
||||
var errorStr = await bpuresponse.Content.ReadAsStringAsync();
|
||||
|
@ -329,11 +329,15 @@
|
||||
this.endDate = newEnd;
|
||||
// updating ui
|
||||
this.srvModel = jsonData;
|
||||
if (this.invoicePaid && !jsonData.isModal && jsonData.redirectAutomatically && jsonData.merchantRefLink) {
|
||||
if (this.invoicePaid && jsonData.redirectAutomatically && jsonData.merchantRefLink) {
|
||||
this.loading = true;
|
||||
setTimeout(function () {
|
||||
window.location = jsonData.merchantRefLink;
|
||||
}, 2000);
|
||||
if (this.isModal && window.top.location == jsonData.merchantRefLink){
|
||||
this.close();
|
||||
} else {
|
||||
window.top.location = jsonData.merchantRefLink;
|
||||
}
|
||||
}.bind(this), 2000);
|
||||
}
|
||||
},
|
||||
onEmailChange: function(){
|
||||
|
@ -153,6 +153,9 @@
|
||||
<div class="col-lg-5">
|
||||
<h4>Preview</h4>
|
||||
<div id="preview"></div>
|
||||
<h4 class="mt-2">Link</h4>
|
||||
<span>Alternatively, you can share this link or encode it in a QR code</span>
|
||||
<div id="preview-link"></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
|
@ -49,7 +49,7 @@ var vaultui = (function () {
|
||||
needPassphrase: new VaultFeedback("?", "Enter the passphrase.", "vault-feedback3", "need-passphrase"),
|
||||
needPassphraseOnDevice: new VaultFeedback("?", "Please, enter the passphrase on the device.", "vault-feedback3", "need-passphrase-on-device"),
|
||||
signingTransaction: new VaultFeedback("?", "Please review and confirm the transaction on your device...", "vault-feedback3", "ask-signing"),
|
||||
reviewAddress: new VaultFeedback("?", "Please review the address on your device...", "vault-feedback3", "ask-signing"),
|
||||
reviewAddress: new VaultFeedback("?", "Sending... Please review the address on your device...", "vault-feedback3", "ask-signing"),
|
||||
signingRejected: new VaultFeedback("failed", "The user refused to sign the transaction", "vault-feedback3", "user-reject"),
|
||||
};
|
||||
|
||||
|
@ -188,7 +188,17 @@ function inputChanges(event, buttonSize) {
|
||||
|
||||
$("#mainCode").text(html).html();
|
||||
$("#preview").html(html);
|
||||
|
||||
var form = document.querySelector("#preview form");
|
||||
var url = new URL(form.getAttribute("action"));
|
||||
var formData = new FormData(form);
|
||||
formData.forEach((value, key) => {
|
||||
if(key !== "jsonResponse"){
|
||||
url.searchParams.append(key, value);
|
||||
}
|
||||
});
|
||||
url = url.href;
|
||||
$("#preview-link").append(`<a href="${url}">${url}</a>`)
|
||||
|
||||
$('pre code').each(function (i, block) {
|
||||
hljs.highlightBlock(block);
|
||||
});
|
||||
|
@ -1,5 +1,5 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<Version>1.0.5.7</Version>
|
||||
<Version>1.0.5.9</Version>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
28
Changelog.md
28
Changelog.md
@ -1,5 +1,33 @@
|
||||
# Changelog
|
||||
|
||||
## 1.0.5.9:
|
||||
|
||||
### Bug fixes:
|
||||
|
||||
* If there was too many pending invoice, postgres would be overwhelmed and freeze some requests (Igor Rylko)
|
||||
* Emails were not included in the text search anymore @Kukks
|
||||
* Payjoin: Do not include maxadditionalfeecontribution if there is no change. @NicolasDorier
|
||||
|
||||
## 1.0.5.8:
|
||||
|
||||
### Bug fixes:
|
||||
|
||||
* Fix payjoin client implementation (was sending hex instead of base64) @Kukks
|
||||
* Fix: The send wallet, by default, should not include the previous transaction (timeouts issue with some hardware wallets) @NicolasDorier
|
||||
* Do not log the database connection string @Kukks
|
||||
* If a password fail to be reset by mail, show proper error @NicolasDorier
|
||||
* When you map a specific domain to an app, when there's no app created there's a blank page @Kukks
|
||||
|
||||
### Bug fixes:
|
||||
|
||||
* Mark Shopify orders paid on invoice payment confirmed @rockstardev
|
||||
* Fix: notification of new BTCPay Server not showing properly @rockstardev
|
||||
* Fix: When collapsed, the sync window blocks the version text in the footer #1941 @Kukks
|
||||
* Fix: Not possible to delete a user if U2F is enabled. @Kukks
|
||||
* Fix onion location not always working #1947 @Kukks
|
||||
* Fix invoice exception status not displaying in list #1963 @Kukks
|
||||
* Fix: Is administrator checkbox does not work on create user page @NicolasDorier
|
||||
|
||||
## 1.0.5.7:
|
||||
|
||||
### Bug fixes:
|
||||
|
Reference in New Issue
Block a user