diff --git a/BTCPayApp.Tests/CoreTests.cs b/BTCPayApp.Tests/CoreTests.cs index 3d535b4..e0cf31e 100644 --- a/BTCPayApp.Tests/CoreTests.cs +++ b/BTCPayApp.Tests/CoreTests.cs @@ -194,7 +194,14 @@ await TestUtils.EventuallyAsync(async () => Assert.Equal(Money.Coins(3).Satoshi, utxos.Sum(coin => (Money) coin.Amount)); }); - + await TestUtils.EventuallyAsync(async () => + { + requestOfInvoice = + Assert.Single( + await node2.App.Services.GetRequiredService().List(payments => payments)); + Assert.Equal(pmLN.Destination, requestOfInvoice.Status.ToString()); + + }); @@ -210,7 +217,7 @@ await TestUtils.EventuallyAsync(async () => } - private async Task FundWallet(RPCClient rpc, BitcoinAddress address, Money m) + private async Task FundWallet(RPCClient rpc, BitcoinAddress address, Money m) { var attempts = 0; @@ -226,5 +233,7 @@ private async Task FundWallet(RPCClient rpc, BitcoinAddress address, Mo await rpc.GenerateAsync(1); } } + + return null; } } \ No newline at end of file diff --git a/BTCPayApp.UI/Pages/Settings/LightningPage.razor b/BTCPayApp.UI/Pages/Settings/LightningPage.razor index 73a0875..5c268fc 100644 --- a/BTCPayApp.UI/Pages/Settings/LightningPage.razor +++ b/BTCPayApp.UI/Pages/Settings/LightningPage.razor @@ -169,10 +169,12 @@ _successMessage = _errorMessage = null; try { - _config = await Node.GetConfig(); - _config.JITLSP = Model.JitLsp; - _config.RapidGossipSyncUrl = string.IsNullOrEmpty(Model.RgsUrl) ? null : Uri.TryCreate(Model.RgsUrl, UriKind.Absolute, out var uri) ? uri: null; - await Node.UpdateConfig(_config); + await Node.UpdateConfig(async config => + { + config.JITLSP = Model.JitLsp; + config.RapidGossipSyncUrl = string.IsNullOrEmpty(Model.RgsUrl) ? null : Uri.TryCreate(Model.RgsUrl, UriKind.Absolute, out var uri) ? uri: null; + return (config, true); + }); _successMessage = "Lightning configuration updated."; } catch (Exception e)