sdsfd
All checks were successful
Deploy / deploy-production (push) Has been skipped
Deploy / deploy-staging (push) Successful in 6s

This commit is contained in:
2026-05-02 03:04:44 +02:00
parent 77bc307781
commit ed0f7b6762
2 changed files with 35 additions and 5 deletions

View File

@@ -12,6 +12,7 @@
.filter(Boolean)
);
let displayBase = String(page.display_base_currency || '').trim().toUpperCase();
const savedDisplayBase = String(page.saved_display_base_currency || displayBase || '').trim().toUpperCase();
const nodes = {
tokenList: root.querySelector('[data-fx-token-list]'),
@@ -152,6 +153,15 @@
nodes.displayBaseSelect?.addEventListener('change', () => {
displayBase = String(nodes.displayBaseSelect?.value || '').trim().toUpperCase();
renderHiddenInputs();
const url = new URL(window.location.href);
if (displayBase) {
url.searchParams.set('base', displayBase);
} else if (savedDisplayBase) {
url.searchParams.set('base', savedDisplayBase);
} else {
url.searchParams.delete('base');
}
window.location.href = url.toString();
});
renderAll();