Skip to content

Commit f37f798

Browse files
authored
fix: stronghold lock/unlock ui (#565)
1 parent 6c8267d commit f37f798

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/shared/routes/dashboard/wallet/views/Security.svelte

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,13 @@
1414
let lastBackupDate
1515
let lastBackupDateFormatted
1616
let color
17-
let strongholdStatusMessage
1817
1918
function setup() {
2019
const ap = get(activeProfile)
2120
const lastStrongholdBackupTime = ap?.lastStrongholdBackupTime
2221
lastBackupDate = lastStrongholdBackupTime ? new Date(lastStrongholdBackupTime) : null
2322
lastBackupDateFormatted = diffDates(lastBackupDate, new Date())
2423
color = getBackupWarningColor(lastBackupDate)
25-
strongholdStatusMessage = get(isStrongholdLocked) ? 'locked' : 'unlocked'
2624
}
2725
2826
function handleSecurityTileClick(popupType) {
@@ -77,9 +75,9 @@
7775
<!-- Stronghold status -->
7876
<SecurityTile
7977
title={locale('views.dashboard.security.strongholdStatus.title')}
80-
message={locale(`views.dashboard.security.strongholdStatus.${strongholdStatusMessage}`)}
78+
message={locale(`views.dashboard.security.strongholdStatus.${$isStrongholdLocked ? 'locked' : 'unlocked'}`)}
8179
color={$isStrongholdLocked ? 'blue' : 'yellow'}
82-
icon="lock"
80+
icon={$isStrongholdLocked ? 'lock' : 'unlock'}
8381
onClick={() => ($isStrongholdLocked ? handleSecurityTileClick('password') : lockStronghold())} />
8482
<!-- Stronghold backup -->
8583
<SecurityTile

0 commit comments

Comments
 (0)