aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/app.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/app.js b/src/app.js
index 4792f57..310e724 100644
--- a/src/app.js
+++ b/src/app.js
@@ -3164,6 +3164,12 @@ function setAccountSel(a, dir) {
_accDir = dir || (a === 'savings' ? 'left' : 'right');
ui.account = a;
try { localStorage.setItem(ACCOUNT_KEY, a); } catch {}
+ // A payment's detail page belongs to the account it was opened from —
+ // switching accounts closes it and lands on Receive.
+ if (ui.txDetail || ui.arkMoveDetail || ui.arkExitDetail || ui.giftDetail) {
+ ui.txDetail = null; ui.arkMoveDetail = null; ui.arkExitDetail = null; ui.giftDetail = null;
+ ui.tab = 'receive';
+ }
render();
}