Skip to content

Commit 6dbd295

Browse files
committed
Merge branch 'frontend-bip85'
2 parents 787737d + e9d8995 commit 6dbd295

File tree

10 files changed

+307
-5
lines changed

10 files changed

+307
-5
lines changed

backend/backend.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ var fixedURLWhitelist = []string{
9797
// Documentation and other articles.
9898
"https://bitcoincore.org/en/2016/01/26/segwit-benefits/",
9999
"https://en.bitcoin.it/wiki/Bech32_adoption",
100+
"https://github.com/bitcoin/bips/",
100101
// Others
101102
"https://cointracking.info/import/bitbox/",
102103
}

frontends/web/src/components/layout/grid.module.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
3434
text-align: center;
3535
}
3636

37+
.textCenter {
38+
text-align: center;
39+
}
40+
3741
@media (max-width: 768px) {
3842
.columnAsCard {
3943
padding: var(--space-half);

frontends/web/src/components/layout/grid.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,23 @@ type TColumnProps = {
4444
asCard?: boolean;
4545
className?: string;
4646
children: ReactNode;
47+
textCenter?: boolean;
4748
}
4849

4950
export const Column = ({
5051
asCard,
5152
children,
5253
className,
54+
textCenter,
5355
}: TColumnProps) => {
56+
const classNames = `
57+
${style.column}
58+
${asCard ? style.columnAsCard : ''}
59+
${className || ''}
60+
${textCenter ? style.textCenter : ''}
61+
`;
5462
return (
55-
<div className={`${style.column} ${asCard ? style.columnAsCard : ''} ${className || ''}`}>
63+
<div className={classNames}>
5664
{children}
5765
</div>
5866
);

frontends/web/src/components/view/view.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ export const ViewHeader = ({
180180

181181
type TViewButtonsProps = {
182182
reverseRow?: boolean;
183-
children: ReactNode;
183+
children?: ReactNode;
184184
}
185185

186186
/**

frontends/web/src/locales/en/app.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,7 @@
380380
"next": "Next",
381381
"ok": "OK",
382382
"previous": "Previous",
383+
"proceedOnBitBox": "Proceed on your BitBox",
383384
"receive": "Receive",
384385
"restore": "Restore",
385386
"select": "Select",
@@ -599,6 +600,28 @@
599600
"title": "Device information"
600601
},
601602
"expert": {
603+
"bip85": {
604+
"description": "Generate child keys from your BitBox wallet.",
605+
"disclaimer": "I understand how child keys work and the security considerations",
606+
"how": {
607+
"description": "The child keys are displayed as a mnemonic on your BitBox. You can create as many child keys as you want. To show a child key, you will be asked for the child number (i.e 1st, 2nd, 3rd etc) and the desired length of the mnemonic (12, 18 or 24 recovery words). Remember, you must keep track of the <strong>child number and number of words</strong> to display the same mnemonic later.",
608+
"title": "How does it work?"
609+
},
610+
"recover": {
611+
"description": "You can always display the mnemonic for the child keys again. As mentioned, you must remember the <strong>child number and number of words</strong> to display the same mnemonic. Never import your main BitBox recovery words into another wallet, only use child keys when importing into another wallet.",
612+
"title": "How to recover wallets using a BitBox child key?"
613+
},
614+
"security": {
615+
"description": "Never reuse a child key. For example, do not use a child key for a hot wallet and then use the same one for a hardware wallet. The key is not considered safe since it was used for a hot wallet.",
616+
"title": "Security considerations"
617+
},
618+
"title": "Show BIP-85 child key",
619+
"what": {
620+
"description": "Child keys are derived from your main seed and can be used to create new wallets without needing to backup more seeds. For example, you can create a child key and import it into a hot wallet instead of having the hot wallet create an entirely new seed.",
621+
"link": "Read more about BIP-85",
622+
"title": "What are child keys?"
623+
}
624+
},
602625
"factoryReset": {
603626
"description": "Reset your device to factory settings. This deletes the wallet from your BitBox02!",
604627
"title": "Factory reset"

frontends/web/src/routes/settings/bb02-settings.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,10 @@ import { SecureChipSetting } from './components/device-settings/secure-chip-sett
3434
import { DeviceNameSetting } from './components/device-settings/device-name-setting';
3535
import { FactoryResetSetting } from './components/device-settings/factory-reset-setting';
3636
import { RootFingerprintSetting } from './components/device-settings/root-fingerprint-setting';
37-
import styles from './bb02-settings.module.css';
37+
import { Bip85Setting } from './components/device-settings/bip85-setting';
3838
import { ManageDeviceGuide } from '../device/bitbox02/settings-guide';
3939
import { MobileHeader } from './components/mobile-header';
40+
import styles from './bb02-settings.module.css';
4041

4142

4243
type TProps = {
@@ -157,6 +158,16 @@ const Content = ({ deviceID }: TProps) => {
157158
/> :
158159
<StyledSkeleton />
159160
}
161+
{
162+
versionInfo ? (
163+
<Bip85Setting
164+
canBIP85={versionInfo.canBIP85}
165+
deviceID={deviceID}
166+
/>
167+
) : (
168+
<StyledSkeleton />
169+
)
170+
}
160171
<GoToStartupSettings deviceID={deviceID} />
161172
<FactoryResetSetting deviceID={deviceID} />
162173
</div>

0 commit comments

Comments
 (0)