Fix: DateTime passed to bitpay API weren't assumed UTC, remove DateTime.Now references (#3206)

This commit is contained in:
Nicolas Dorier
2021-12-17 15:31:06 +09:00
committed by GitHub
parent 6de4f6a3ac
commit 163d1a195d
12 changed files with 57 additions and 13 deletions

View File

@@ -1179,7 +1179,7 @@ namespace BTCPayServer.Tests
var bolt = (await s.Server.CustomerLightningD.CreateInvoice(
payoutAmount,
$"LN payout test {DateTime.Now.Ticks}",
$"LN payout test {DateTime.UtcNow.Ticks}",
TimeSpan.FromHours(1), CancellationToken.None)).BOLT11;
s.Driver.FindElement(By.Id("Destination")).SendKeys(bolt);
s.Driver.FindElement(By.Id("SelectedPaymentMethod")).Click();
@@ -1193,7 +1193,7 @@ namespace BTCPayServer.Tests
bolt = (await s.Server.CustomerLightningD.CreateInvoice(
payoutAmount,
$"LN payout test {DateTime.Now.Ticks}",
$"LN payout test {DateTime.UtcNow.Ticks}",
TimeSpan.FromDays(31), CancellationToken.None)).BOLT11;
s.Driver.FindElement(By.Id("Destination")).Clear();
s.Driver.FindElement(By.Id("Destination")).SendKeys(bolt);