Skip to content

frontend: remove bitbox01 hidden wallet settings #3309

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion frontends/web/src/api/bitbox01.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export type DeviceInfo = {
id: string;
lock: boolean;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only place that lock is still used is in bb01 backups:

name: string;
new_hidden_wallet: boolean;
seeded: boolean;
serial: string;
sdcard: boolean;
Expand Down
1 change: 0 additions & 1 deletion frontends/web/src/hooks/sdcard.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ describe('useSDCard', () => {
id: '0001',
lock: false,
name: 'some name',
new_hidden_wallet: false,
seeded: false,
serial: 'anystring',
sdcard: true,
Expand Down
28 changes: 1 addition & 27 deletions frontends/web/src/locales/en/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,7 @@
"error": {
"e10000": "Current device password incorrect.",
"e10001": "Failed to replace device password",
"e102": "The password must consist of at least 4 characters.",
"e112": "Hidden device password cannot be the same as the main device password."
"e102": "The password must consist of at least 4 characters."
}
},
"bitbox02Interact": {
Expand Down Expand Up @@ -385,7 +384,6 @@
"dismiss": "Dismiss",
"done": "Done",
"download": "Download",
"hiddenwallet": "Create hidden wallet",
"next": "Next",
"ok": "OK",
"previous": "Previous",
Expand Down Expand Up @@ -1000,14 +998,6 @@
"ejectSD": {
"text": "You can remove the microSD card from the BitBox at any time as long as you are not in the process of creating or restoring a backup.",
"title": "How can I eject the microSD card?"
},
"hiddenWallet": {
"text": "It is a second wallet on the same device protected by a different device password and recovery password, which you can use for plausible deniability. The same backup seed is used for both your normal and hidden wallet, so no additional backup is required.",
"title": "What is a hidden wallet?"
},
"legacyHiddenWallet": {
"text": "First click the button below (available if the BitBox is unlocked with the main device password and 2FA is disabled), then replug your Bitbox and unlock it with your hidden device password.",
"title": "How do I access the legacy hidden wallet?"
}
},
"bitsurance": {
Expand Down Expand Up @@ -1252,16 +1242,6 @@
"headerssync": {
"blocksSynced": "{{blocks}} blocks synced"
},
"hiddenWallet": {
"info1HTML": "For plausible deniability purposes, a hidden wallet can be created based on a <strong>different</strong> device password + recovery password combination.",
"info2HTML": "Define the device password and recovery password you want to associate with your hidden wallet below. The device password and recovery password must be <strong>different</strong> from the ones you defined for your primary wallet.",
"passwordLabel": "Hidden recovery password",
"passwordPlaceholder": "Please confirm hidden recovery password",
"pinLabel": "Hidden device password",
"pinRepeatLabel": "Repeat hidden device password",
"pinRepeatPlaceholder": "Please confirm hidden device password",
"success": "Hidden wallet created successfully. Replug your BitBox to unlock it."
},
"initialize": {
"create": "Set device password",
"creating": "Setting device password…",
Expand All @@ -1285,12 +1265,6 @@
"language": {
"title": "Select language"
},
"legacyhiddenwallet": {
"disable": "Disable legacy hidden wallet",
"enable": "Enable legacy hidden wallet",
"successDisable": "Successfully disabled the legacy hidden wallet.",
"successEnable": "Successfully enabled the legacy hidden wallet. Replug your BitBox and enter the hidden device password to access the legacy hidden wallet."
},
"loading": "loading…",
"manageAccounts": {
"accountHidden": "This account has been hidden from your watch-only accounts. To see it again, please plug in your BitBox.",
Expand Down

This file was deleted.

This file was deleted.

30 changes: 0 additions & 30 deletions frontends/web/src/routes/device/bitbox01/settings/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ import { Entry } from '../../../../components/guide/entry';
import { Header } from '../../../../components/layout';
import { Spinner } from '../../../../components/spinner/Spinner';
import Blink from './components/blink';
import LegacyHiddenWallet from './components/legacyhiddenwallet';
import RandomNumber from './components/randomnumber';
import HiddenWallet from './components/hiddenwallet';
import ChangePIN from './components/changepin';
import Reset from './components/reset';
import UpgradeFirmware from '../components/upgradefirmware';
Expand All @@ -43,30 +41,24 @@ export const Settings = ({ deviceID }: Props) => {

const [firmwareVersion, setFirmwareVersion] = useState<string | null>(null);
const [newVersion, setNewVersion] = useState<string | null>(null);
const [lock, setLock] = useState(true);
const [name, setName] = useState<string | null>(null);
const [spinner, setSpinner] = useState(true);
const [sdcard, setSdcard] = useState(false);
const [serial, setSerial] = useState('');
const [newHiddenWallet, setNewHiddenWallet] = useState(true);

useEffect(() => {
const init = async () => {
const deviceInfo = await getDeviceInfo(deviceID);
if (deviceInfo) {
const {
lock,
name,
new_hidden_wallet,
sdcard,
serial,
version,
} = deviceInfo;

setFirmwareVersion(version.replace('v', ''));
setLock(lock);
setName(name);
setNewHiddenWallet(new_hidden_wallet);
setSdcard(sdcard);
setSerial(serial);
setSpinner(false);
Expand Down Expand Up @@ -97,16 +89,6 @@ export const Settings = ({ deviceID }: Props) => {
{t('deviceSettings.secrets.manageBackups')}
</SettingsButton>
<ChangePIN deviceID={deviceID} />
{newHiddenWallet ? (
<HiddenWallet deviceID={deviceID} disabled={lock} />
) : (
<LegacyHiddenWallet
deviceID={deviceID}
newHiddenWallet={newHiddenWallet}
disabled={lock}
onChange={setNewHiddenWallet}
/>
)}
<Reset deviceID={deviceID} />
</div>
</div>
Expand Down Expand Up @@ -140,18 +122,6 @@ export const Settings = ({ deviceID }: Props) => {
<Guide>
<Entry key="guide.bitbox.ejectBitbox" entry={t('guide.bitbox.ejectBitbox', { returnObjects: true })} />
<Entry key="guide.bitbox.ejectSD" entry={t('guide.bitbox.ejectSD', { returnObjects: true })} />
<Entry key="guide.bitbox.hiddenWallet" entry={t('guide.bitbox.hiddenWallet', { returnObjects: true })} />
{!lock && newHiddenWallet && (
<Entry key="guide.bitbox.legacyHiddenWallet" entry={t('guide.bitbox.legacyHiddenWallet', { returnObjects: true })}>
<p>
<LegacyHiddenWallet
deviceID={deviceID}
newHiddenWallet={newHiddenWallet}
onChange={setNewHiddenWallet}
/>
</p>
</Entry>
)}
</Guide>
</div>
);
Expand Down