Refine wallet transactions toolbar and direction filter (#7470)
What changed, and why it matters
This commit is a user-interface polish change for the wallet transactions page. It renames filter labels (for example, 'Outgoing' becomes 'Sent'), reorganizes the toolbar buttons, adds a new icon, and updates tests to match the new labels. There is no security-relevant change.
No security action required; treat as a routine UI/UX refactor.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff updates Razor views, CSS, an SVG icon sprite, and Playwright tests for the wallet transactions screen. Changes include: renaming direction-filter labels (‘Incoming’/’Outgoing’/’All Directions’ to ‘Received’/’Sent’/’All’), moving the BIP-329 label import button into a dropdown, adjusting responsive layout CSS, adding a ‘bump-fee’ icon, and updating test assertions. No controller logic, authorization checks, input validation, or cryptographic code is modified.
Changed components
BTCPayServer/Plugins/Wallets/Views/UIWallets/WalletTransactions.cshtmlBTCPayServer/Plugins/Wallets/Views/UIWallets/_WalletTransactionsList.cshtmlBTCPayServer/wwwroot/img/icon-sprite.svgBTCPayServer.Tests/WalletTests.csInspect captured patch +61 / −50
### BTCPayServer.Tests/WalletTests.cs
@@ -1091,11 +1091,11 @@ await client.PatchOnChainWalletTransaction(
});
await s.GoToWalletTransactions(s.WalletId);
- await SelectWalletDirection(s, "Outgoing");
+ await SelectWalletDirection(s, "Sent");
await s.SearchFilters.SelectLabel(targetLabel);
await s.Page.WaitForLoadStateAsync();
- await AssertDirectionToggle(s, "Outgoing");
+ await AssertDirectionToggle(s, "Sent");
await Expect(s.SearchFilters.LabelSelectorToggle).ToContainTextAsync(targetLabel);
var hiddenSearchTerm = await s.SearchFilters.SearchTermValue();
@@ -1154,9 +1154,9 @@ await TestUtils.EventuallyAsync(async () =>
await s.GoToWalletTransactions(s.WalletId);
await s.SearchFilters.AssertSearchText(string.Empty);
- await SelectWalletDirection(s, "Outgoing");
+ await SelectWalletDirection(s, "Sent");
- await AssertDirectionToggle(s, "Outgoing");
+ await AssertDirectionToggle(s, "Sent");
Assert.Contains("direction:out", await s.SearchFilters.SearchTermValue());
await s.SearchFilters.AssertSearchText(string.Empty);
await Expect(s.Page.Locator(".transaction-row .amount-col .text-danger").First).ToBeVisibleAsync();
@@ -1235,13 +1235,13 @@ await client.PatchOnChainWalletTransaction(
await AssertDateRangeTimeZone(selectedTimeZone);
await s.SearchFilters.FillSearchText(targetLabel);
- await SelectWalletDirection(s, "Outgoing");
+ await SelectWalletDirection(s, "Sent");
await s.SearchFilters.AssertSearchText(targetLabel);
var searchTermWithFilters = await s.SearchFilters.SearchTermValue();
Assert.Contains("direction:out", searchTermWithFilters);
Assert.Contains($"timezone:{selectedTimeZone}", searchTermWithFilters);
- await AssertDirectionToggle(s, "Outgoing");
+ await AssertDirectionToggle(s, "Sent");
await Expect(s.Page.Locator(".transaction-row")).ToHaveCountAsync(1);
await Expect(s.SearchFilters.ClearAllFiltersButton).ToHaveCountAsync(1);
@@ -1250,7 +1250,7 @@ await client.PatchOnChainWalletTransaction(
await s.SearchFilters.AssertSearchText(string.Empty);
await Expect(s.SearchFilters.SearchTerm).ToHaveValueAsync($"timezone:{selectedTimeZone}");
await AssertDateRangeTimeZone(selectedTimeZone);
- await AssertDirectionToggle(s, "All Directions");
+ await AssertDirectionToggle(s, "All");
await Expect(s.SearchFilters.ClearAllFiltersButton).ToHaveCountAsync(0);
Assert.True(await s.Page.Locator(".transaction-row").CountAsync() >= 2);
await Expect(s.Page.Locator(".transaction-row .amount-col .text-danger").First).ToBeVisibleAsync();
@@ -1331,7 +1331,7 @@ await client.PatchOnChainWalletTransaction(
await s.GoToWalletTransactions(s.WalletId);
await s.SearchFilters.FillSearchText(targetSearchText);
- await SelectWalletDirection(s, "Outgoing");
+ await SelectWalletDirection(s, "Sent");
await s.SearchFilters.SelectLabel(targetLabel);
### BTCPayServer/Plugins/Wallets/Views/UIWallets/WalletTransactions.cshtml
@@ -49,32 +49,21 @@
align-items: center;
}
- #Export {
- align-items: center;
- }
-
- #Export > .btn {
+ #view-report {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
+ min-width: 7rem;
text-align: center;
padding-left: var(--bs-btn-padding-x);
padding-right: var(--bs-btn-padding-x);
}
- #Export > .btn .icon {
+ #view-report .icon {
margin-left: 0;
}
- #view-report {
- min-width: 7rem;
- }
-
- #ExportDropdownToggle::after {
- margin-left: 0.5rem;
- }
-
@@media (max-width: 568px) {
.search-string-input__text {
width: 100%;
@@ -87,6 +76,20 @@
text-align: left;
}
+ /* Below lg the search gets its own row, so the filters and the column picker
+ share the row underneath rather than the picker wrapping on to a third. */
+ @@media (max-width: 991.98px) {
+ /* !important to beat the .d-flex utility on the form */
+ #WalletTransactionsSearch {
+ display: contents !important;
+ }
+
+ #WalletTransactionsControls .search-string-input__text {
+ flex: 1 0 100%;
+ max-width: none;
+ }
+ }
+
#LoadingIndicator {
margin-bottom: 1.5rem;
}
@@ -185,21 +188,32 @@
<div class="sticky-header">
<vc:wallet-nav wallet-id="wallet"/>
<div class="d-flex flex-wrap align-items-center gap-3" id="Dropdowns">
- <div class="dropdown d-flex flex-wrap gap-3" id="Export" permission="@WalletPolicies.CanViewWallet">
- <a
- id="view-report"
- permission="@Policies.CanViewReports"
- asp-area=""
- asp-controller="UIReports"
- asp-action="StoreReports"
- asp-route-storeId="@storeId"
- asp-route-viewName="Wallets"
- class="btn btn-secondary">
- <vc:icon symbol="nav-reporting" />
- <span text-translate="true">Reporting</span>
- </a>
+ <a
+ id="view-report"
+ permission="@Policies.CanViewReports"
+ asp-area=""
+ asp-controller="UIReports"
+ asp-action="StoreReports"
+ asp-route-storeId="@storeId"
+ asp-route-viewName="Wallets"
+ class="btn btn-secondary">
+ <vc:icon symbol="nav-reporting" />
+ <span text-translate="true">Reporting</span>
+ </a>
+ <div class="dropdown" id="Import" permission="@WalletPolicies.CanManageWalletTransactions">
+ <form asp-action="ImportWalletLabels" asp-route-walletId="@walletId" method="post" enctype="multipart/form-data" class="wallet-labels__import">
+ <button class="btn btn-secondary dropdown-toggle dropdown-toggle-custom-caret" type="button" id="ImportDropdownToggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" text-translate="true">
+ Import
+ </button>
+ <div class="dropdown-menu" aria-labelledby="ImportDropdownToggle">
+ <input type="file" name="file" class="wallet-labels__import-file d-none" accept=".jsonl,.json,.txt" aria-hidden="true" tabindex="-1" />
+ <button type="button" class="dropdown-item wallet-labels__import-button" text-translate="true">Wallet Labels (BIP-329)</button>
+ </div>
+ </form>
+ </div>
+ <div class="dropdown" id="Export" permission="@WalletPolicies.CanViewWallet">
<form asp-action="Export" asp-route-walletId="@walletId" target="_blank" method="get">
- <button class="btn btn-secondary dropdown-toggle" type="button" id="ExportDropdownToggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" text-translate="true">
+ <button class="btn btn-secondary dropdown-toggle dropdown-toggle-custom-caret" type="button" id="ExportDropdownToggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" text-translate="true">
Export
</button>
<div class="dropdown-menu" aria-labelledby="ExportDropdownToggle">
@@ -211,11 +225,6 @@
</div>
</form>
</div>
- <form asp-action="ImportWalletLabels" asp-route-walletId="@walletId" method="post" enctype="multipart/form-data"
- class="wallet-labels__import" permission="@WalletPolicies.CanManageWalletTransactions">
- <input type="file" name="file" class="wallet-labels__import-file d-none" accept=".jsonl,.json,.txt" aria-hidden="true" tabindex="-1" />
- <button type="button" class="btn btn-secondary wallet-labels__import-button" text-translate="true">Import BIP-329 labels</button>
- </form>
</div>
</div>
<partial name="_StatusMessage" />
@@ -229,21 +238,21 @@
<button id="wallet-transactions__direction-toggle" class="btn btn-secondary dropdown-toggle dropdown-toggle-custom-caret wallet-transactions__direction-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
@if (hasIncomingOnlyFilter)
{
- <span text-translate="true">Incoming</span>
+ <span text-translate="true">Received</span>
}
else if (hasOutgoingOnlyFilter)
{
- <span text-translate="true">Outgoing</span>
+ <span text-translate="true">Sent</span>
}
else
{
- <span text-translate="true">All Directions</span>
+ <span text-translate="true">All</span>
}
</button>
<div class="dropdown-menu wallet-transactions__direction-menu" aria-labelledby="wallet-transactions__direction-toggle">
- <button type="submit" name="FilterCommand" value="unset:direction" class="dropdown-item wallet-transactions__direction-option @((!hasIncomingOnlyFilter && !hasOutgoingOnlyFilter) ? "custom-active" : string.Empty)" text-translate="true">All Directions</button>
- <button type="submit" name="FilterCommand" value="set:direction=in" class="dropdown-item wallet-transactions__direction-option @(hasIncomingOnlyFilter ? "custom-active" : string.Empty)" text-translate="true">Incoming</button>
- <button type="submit" name="FilterCommand" value="set:direction=out" class="dropdown-item wallet-transactions__direction-option @(hasOutgoingOnlyFilter ? "custom-active" : string.Empty)" text-translate="true">Outgoing</button>
+ <button type="submit" name="FilterCommand" value="unset:direction" class="dropdown-item wallet-transactions__direction-option @((!hasIncomingOnlyFilter && !hasOutgoingOnlyFilter) ? "custom-active" : string.Empty)" text-translate="true">All</button>
+ <button type="submit" name="FilterCommand" value="set:direction=in" class="dropdown-item wallet-transactions__direction-option @(hasIncomingOnlyFilter ? "custom-active" : string.Empty)" text-translate="true">Received</button>
+ <button type="submit" name="FilterCommand" value="set:direction=out" class="dropdown-item wallet-transactions__direction-option @(hasOutgoingOnlyFilter ? "custom-active" : string.Empty)" text-translate="true">Sent</button>
</div>
</div>
<vc:label-selector labels="Model.Labels" search="Model.Search" allow-no-label-filter="true" manage-label-link="@walletLabelsLink"></vc:label-selector>
@@ -358,15 +367,16 @@
<th class="only-for-js mass-action-select-col">
<input type="checkbox" class="form-check-input mass-action-select-all" />
</th>
- <th colspan="5">
+ @* Date, Label, Transaction, Amount, Transaction fee, the rate columns and the actions column *@
+ <th colspan="@(6 + Model.Rates.Count)">
<div class="d-flex flex-wrap align-items-center gap-3">
<div>
<strong class="mass-action-selected-count">0</strong>
<span text-translate="true">selected</span>
</div>
<form id="WalletActions" method="post" asp-action="WalletActions" asp-route-walletId="@walletId" permission="@WalletPolicies.CanCreateWalletTransactions" class="d-inline-flex align-items-center gap-3">
<button id="BumpFee" name="command" type="submit" value="cpfp" class="btn btn-link">
- <vc:icon symbol="actions-send" />
+ <vc:icon symbol="bump-fee" />
<span text-translate="true">Bump fee</span>
</button>
</form>
### BTCPayServer/Plugins/Wallets/Views/UIWallets/_WalletTransactionsList.cshtml
@@ -70,7 +70,7 @@
@if (transaction.CanBumpFee)
{
<a asp-action="WalletBumpFee" asp-route-walletId="@Context.GetRouteValue("walletId")" asp-route-transactionId="@transaction.Id" class="btn btn-link p-0 bumpFee-btn" permission="@WalletPolicies.CanCreateWalletTransactions">
- <vc:icon symbol="actions-send" />
+ <vc:icon symbol="bump-fee" />
<span text-translate="true">Bump fee</span>
</a>
}
### BTCPayServer/wwwroot/img/icon-sprite.svg
@@ -24,6 +24,7 @@
<symbol id="api" viewBox="0 0 24 24" fill="none"><g clip-path="url(#clip0_8916_971)"><path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM14 17H7V15H14V17ZM17 13H7V11H17V13ZM17 9H7V7H17V9Z" fill="currentColor"/></g></symbol>
<symbol id="back" viewBox="0 0 24 24" fill="none"><path d="M11.67 19.545C11.4591 19.7557 11.1731 19.874 10.875 19.874C10.5769 19.874 10.2909 19.7557 10.08 19.545L3.705 13.17C3.49433 12.9591 3.37599 12.6731 3.37599 12.375C3.37599 12.0769 3.49433 11.7909 3.705 11.58L10.08 5.205C10.2934 5.00638 10.5755 4.89823 10.8669 4.90326C11.1584 4.9083 11.4366 5.02613 11.643 5.232C11.8489 5.4384 11.9667 5.71658 11.9717 6.00805C11.9768 6.29953 11.8686 6.58161 11.67 6.795L7.215 11.25L18.375 11.25C18.6734 11.25 18.9595 11.3685 19.1705 11.5795C19.3815 11.7905 19.5 12.0766 19.5 12.375C19.5 12.6734 19.3815 12.9595 19.1705 13.1705C18.9595 13.3815 18.6734 13.5 18.375 13.5L7.215 13.5L11.67 17.955C11.8807 18.1659 11.999 18.4519 11.999 18.75C11.999 19.0481 11.8807 19.3341 11.67 19.545Z" fill="currentColor"/></symbol>
<symbol id="block" viewBox="0 0 24 24" fill="none"><path d="M12.0002 10.2354L4.73633 7.38747M12.0002 10.2354L19.2642 7.38747M12.0002 10.2354V19.5M5.21166 7.01614L11.2783 4.6375C11.7412 4.45417 12.2566 4.45417 12.7196 4.6375L18.7862 7.01614C19.0023 7.1083 19.1858 7.26312 19.3131 7.46062C19.4404 7.65812 19.5055 7.88923 19.5002 8.12413V15.876C19.5058 16.1106 19.441 16.3415 19.3142 16.539C19.1874 16.7365 19.0045 16.8915 18.7888 16.984L12.7222 19.3633C12.259 19.5453 11.7441 19.5453 11.2809 19.3633L5.21433 16.984C4.9982 16.8919 4.81466 16.737 4.68739 16.5395C4.56012 16.342 4.49496 16.1109 4.50033 15.876V8.12413C4.49475 7.88953 4.55951 7.65864 4.68628 7.46117C4.81305 7.26371 4.99603 7.10871 5.21166 7.01614Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></symbol>
+<symbol id="bump-fee" viewBox="0 0 24 24" fill="none"><path d="M13 13L16 8M8 8H8.01M12 6H12.01M18 12H18.01M6 12H6.01M14 15C14 16.1046 13.1046 17 12 17C10.8954 17 10 16.1046 10 15C10 13.8954 10.8954 13 12 13C13.1046 13 14 13.8954 14 15ZM21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></symbol>
<symbol id="calendar" viewBox="0 0 24 24" fill="none"><rect x="4" y="5" width="16" height="15" rx="1.5" stroke="currentColor" stroke-width="1.75"/><path d="M8 3V7" stroke="currentColor" stroke-width="1.75"/><path d="M8 10V12" stroke="currentColor" stroke-width="2"/><path d="M8 14V16" stroke="currentColor" stroke-width="2"/><path d="M12 10V12" stroke="currentColor" stroke-width="2"/><path d="M12 14V16" stroke="currentColor" stroke-width="2"/><path d="M16 10V12" stroke="currentColor" stroke-width="2"/><path d="M16 3V7" stroke="currentColor" stroke-width="1.75"/></symbol>
<symbol id="caret-down" viewBox="0 0 24 24" fill="none"><path d="M7 9.5L12 14.5L17 9.5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none"/></symbol>
<symbol id="caret-left" viewBox="0 0 24 24" fill="none"><path d="M7.92303 12.0039C7.92303 12.3233 8.03989 12.5882 8.28919 12.8375L14.2881 18.704C14.4906 18.9065 14.7322 19 15.0204 19C15.6047 19 16.08 18.5403 16.08 17.956C16.08 17.6678 15.9553 17.4029 15.745 17.1925L10.4161 12.0117L15.745 6.81525C15.9553 6.6049 16.08 6.3478 16.08 6.05175C16.08 5.46745 15.6047 5 15.0204 5C14.7322 5 14.4906 5.10128 14.2881 5.30384L8.28919 11.1703C8.0321 11.4196 7.92303 11.6845 7.92303 12.0039Z" fill="currentColor"/></symbol>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.