What changed, and why it matters
This commit simply moves three helper methods that generate wallet-related URLs from a general file into a new file inside the Wallets plugin folder. There is no change to what the code does, no bug fix, and no security-related change.
No security action needed; this is a routine code organization refactor.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff is a pure refactor: WalletSend, WalletTransactions(string), and WalletTransactions(WalletId) extension methods are relocated from BTCPayServer/Extensions/UrlHelperExtensions.cs to a new BTCPayServer/Plugins/Wallets/UrlHelperExtensions.Wallets.cs file. The method bodies, signatures, and namespace imports remain functionally identical. No logic, validation, routing, or authorization behavior is modified.
Changed components
BTCPayServer/Extensions/UrlHelperExtensions.csBTCPayServer/Plugins/Wallets/UrlHelperExtensions.Wallets.csInspect captured patch +13 / −4
diff --git a/BTCPayServer/Extensions/UrlHelperExtensions.cs b/BTCPayServer/Extensions/UrlHelperExtensions.cs
index b9b86a8..726faa5 100644
--- a/BTCPayServer/Extensions/UrlHelperExtensions.cs
+++ b/BTCPayServer/Extensions/UrlHelperExtensions.cs
@@ -13,10 +13,6 @@ namespace Microsoft.AspNetCore.Mvc
public static class UrlHelperExtensions
{
#nullable enable
- public static string? WalletSend(this IUrlHelper helper, WalletId walletId) => helper.Action(nameof(UIWalletsController.WalletSend), "UIWallets", new { area = WalletsPlugin.Area, walletId });
- public static string? WalletTransactions(this IUrlHelper helper, string walletId) => WalletTransactions(helper, WalletId.Parse(walletId));
- public static string? WalletTransactions(this IUrlHelper helper, WalletId walletId)
- => helper.Action(nameof(UIWalletsController.WalletTransactions), "UIWallets", new { area = WalletsPlugin.Area, walletId });
public static Uri ActionAbsolute(this IUrlHelper helper, HttpRequest request, string? action, string? controller, object? values)
=> request.GetAbsoluteUriNoPathBase(new Uri(helper.Action(action, controller, values) ?? "", UriKind.Relative));
public static Uri ActionAbsolute(this IUrlHelper helper, HttpRequest request, string? action, string? controller)
diff --git a/BTCPayServer/Plugins/Wallets/UrlHelperExtensions.Wallets.cs b/BTCPayServer/Plugins/Wallets/UrlHelperExtensions.Wallets.cs
new file mode 100644
index 0000000..68695f3
--- /dev/null
+++ b/BTCPayServer/Plugins/Wallets/UrlHelperExtensions.Wallets.cs
@@ -0,0 +1,13 @@
+#nullable enable
+using BTCPayServer.Controllers;
+using Microsoft.AspNetCore.Mvc;
+
+namespace BTCPayServer.Plugins.Wallets;
+
+public static class UrlHelperExtensions
+{
+ public static string? WalletSend(this IUrlHelper helper, WalletId walletId) => helper.Action(nameof(UIWalletsController.WalletSend), "UIWallets", new { area = WalletsPlugin.Area, walletId });
+ public static string? WalletTransactions(this IUrlHelper helper, string walletId) => WalletTransactions(helper, WalletId.Parse(walletId));
+ public static string? WalletTransactions(this IUrlHelper helper, WalletId walletId)
+ => helper.Action(nameof(UIWalletsController.WalletTransactions), "UIWallets", new { area = WalletsPlugin.Area, walletId });
+}
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.