Skip to content
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

Derivation path added in account details #9719

Merged
merged 2 commits into from
Nov 13, 2023
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
9 changes: 9 additions & 0 deletions packages/suite/src/support/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3662,6 +3662,15 @@ export default defineMessages({
id: 'TR_ACCOUNT_DETAILS_TYPE_HEADER',
defaultMessage: 'Account type',
},
TR_ACCOUNT_DETAILS_PATH_HEADER: {
id: 'TR_ACCOUNT_DETAILS_PATH_HEADER',
defaultMessage: 'Derivation path',
},
TR_ACCOUNT_DETAILS_PATH_DESC: {
id: 'TR_ACCOUNT_DETAILS_PATH_DESC',
defaultMessage:
'Derivation path is a parameter according to which the Hierarchical Deterministic (HD) wallet derives individual keys within the tree of keys.',
},
TR_ACCOUNT_TYPE_BIP84_DESC: {
id: 'TR_ACCOUNT_TYPE_BIP84_DESC',
defaultMessage:
Expand Down
25 changes: 17 additions & 8 deletions packages/suite/src/views/wallet/details/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import {
getAccountTypeDesc,
} from '@suite-common/wallet-utils';
import { P, variables } from '@trezor/components';
import { HELP_CENTER_XPUB_URL } from '@trezor/urls';

import { WalletLayout } from 'src/components/wallet';
import { useDevice, useDispatch, useSelector } from 'src/hooks/suite';
import { ActionButton, ActionColumn, Card, TextColumn, Translation } from 'src/components/suite';

import { CARD_PADDING_SIZE } from 'src/constants/suite/layout';
import { HELP_CENTER_BIP32_URL, HELP_CENTER_XPUB_URL } from '@trezor/urls';
import { showXpub } from 'src/actions/wallet/publicKeyActions';
import { WalletLayout } from 'src/components/wallet';
import { NETWORKS } from 'src/config/wallet';
import { CARD_PADDING_SIZE } from 'src/constants/suite/layout';
import { useDevice, useDispatch, useSelector } from 'src/hooks/suite';
import { CoinjoinLogs } from './CoinjoinLogs';
import { CoinjoinSetup } from './CoinjoinSetup/CoinjoinSetup';
import { RescanAccount } from './RescanAccount';
Expand Down Expand Up @@ -43,10 +43,7 @@ const AccountTypeLabel = styled.div`
line-height: 20px;
text-align: center;
min-width: 170px;

div:first-child {
margin-bottom: 8px;
}
gap: 8px;
`;

const StyledCard = styled(Card)`
Expand Down Expand Up @@ -132,6 +129,18 @@ const Details = () => {
</P>
</AccountTypeLabel>
</Row>
<Row>
<TextColumn
title={<Translation id="TR_ACCOUNT_DETAILS_PATH_HEADER" />}
description={<Translation id="TR_ACCOUNT_DETAILS_PATH_DESC" />}
buttonLink={HELP_CENTER_BIP32_URL}
/>
<AccountTypeLabel>
<P size="small" weight="medium">
{account.path}
</P>
</AccountTypeLabel>
</Row>
{!isCoinjoinAccount ? (
<Row>
<TextColumn
Expand Down
1 change: 1 addition & 0 deletions packages/urls/src/urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export const HELP_CENTER_FAILED_BACKUP_URL = 'https://trezor.io/support/a/trezor
export const HELP_CENTER_ADVANCED_RECOVERY_URL =
'https://trezor.io/learn/a/advanced-recovery-on-trezor-model-one';
export const HELP_CENTER_XPUB_URL = 'https://trezor.io/learn/a/trezor-suite-app-public-keys-xpub';
export const HELP_CENTER_BIP32_URL = 'https://trezor.io/learn/a/what-is-bip32';
export const HELP_FIRMWARE_TYPE = 'https://trezor.io/learn/a/bitcoin-only-firmware-on-trezor';
export const HELP_CENTER_ZERO_VALUE_ATTACKS =
'https://trezor.io/support/a/address-poisoning-attacks';
Expand Down
Loading