Skip to content

Commit

Permalink
fix: toggle text and icon when hiding account
Browse files Browse the repository at this point in the history
  • Loading branch information
pete-watters committed Dec 12, 2024
1 parent f2b2866 commit 63cab41
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 9 deletions.
9 changes: 8 additions & 1 deletion apps/mobile/maestro/flows/hide-account.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,18 @@ appId: io.leather.mobilewallet
id: 'walletListAccountCard'
- tapOn:
text: 'Hide account'
- assertVisible: 'Unhide account'
- tapOn:
id: 'backButton'
- assertNotVisible:
id: 'walletListAccountCard'
- tapOn:
text: 'Hidden accounts 1 hidden accounts'
- assertVisible:
- tapOn:
id: 'walletListAccountCard'
- tapOn: Unhide account
- tapOn:
id: 'backButton'
- tapOn:
id: 'backButton'
- assertVisible: Hidden accounts 0 hidden accounts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { z } from 'zod';
import {
Box,
Eye1ClosedIcon,
Eye1Icon,
HeadIcon,
PassportIcon,
SheetRef,
Expand Down Expand Up @@ -124,14 +125,25 @@ function ConfigureAccount({ fingerprint, accountIndex, account }: ConfigureAccou
});
}}
/>
<SettingsListItem
title={t({
id: 'configure_account.hide_account.cell_title',
message: 'Hide account',
})}
icon={<Eye1ClosedIcon />}
onPress={toggleHideAccount}
/>
{account.status === 'active' ? (
<SettingsListItem
title={t({
id: 'configure_account.hide_account.cell_title',
message: 'Hide account',
})}
icon={<Eye1ClosedIcon />}
onPress={toggleHideAccount}
/>
) : (
<SettingsListItem
title={t({
id: 'configure_account.unhide_account.cell_title',
message: 'Unhide account',
})}
icon={<Eye1Icon />}
onPress={toggleHideAccount}
/>
)}
</SettingsList>
</AnimatedHeaderScreenLayout>
<AccountNameSheet name={account.name} setName={setName} sheetRef={accountNameSheetRef} />
Expand Down

0 comments on commit 63cab41

Please sign in to comment.