15
15
*/
16
16
17
17
import React , { Component } from 'react' ;
18
- import { getAccountsByKeystore } from '../account/utils' ;
18
+ import { getAccountsByKeystore , isAmbiguiousName } from '../account/utils' ;
19
19
import { route } from '../../utils/route' ;
20
20
import * as accountAPI from '../../api/account' ;
21
21
import * as backendAPI from '../../api/backend' ;
22
22
import { alertUser } from '../../components/alert/Alert' ;
23
23
import { Button , Input , Label } from '../../components/forms' ;
24
24
import Logo from '../../components/icon/logo' ;
25
- import { EditActive , EyeOpenedDark } from '../../components/icon' ;
25
+ import { EditActive , EyeOpenedDark , USBSuccess } from '../../components/icon' ;
26
26
import { Column , Grid , GuideWrapper , GuidedContent , Header , Main } from '../../components/layout' ;
27
27
import { Toggle } from '../../components/toggle/toggle' ;
28
28
import { Dialog , DialogButtons } from '../../components/dialog/dialog' ;
@@ -31,6 +31,7 @@ import { translate, TranslateProps } from '../../decorators/translate';
31
31
import { WithSettingsTabs } from './components/tabs' ;
32
32
import { View , ViewContent } from '../../components/view/view' ;
33
33
import { MobileHeader } from '../settings/components/mobile-header' ;
34
+ import { Badge } from '../../components/badge/badge' ;
34
35
import { AccountGuide } from './manage-account-guide' ;
35
36
import { WatchonlySetting } from './components/manage-accounts/watchonlySetting' ;
36
37
import style from './manage-accounts.module.css' ;
@@ -281,7 +282,22 @@ class ManageAccounts extends Component<Props, State> {
281
282
asCard >
282
283
< div className = { style . walletHeader } >
283
284
< h2 className = { style . walletTitle } >
284
- { keystore . keystore . name }
285
+ < span className = "p-right-quarter" >
286
+ { keystore . keystore . name }
287
+ { isAmbiguiousName ( keystore . keystore . name , accountsByKeystore ) ? (
288
+ // Disambiguate accounts group by adding the fingerprint.
289
+ // The most common case where this would happen is when adding accounts from the
290
+ // same seed using different passphrases.
291
+ < small > { keystore . keystore . rootFingerprint } </ small >
292
+ ) : null }
293
+ </ span >
294
+ { keystore . keystore . connected ? (
295
+ < Badge
296
+ icon = { props => < USBSuccess { ...props } /> }
297
+ type = "success" >
298
+ { t ( 'device.keystoreConnected' ) }
299
+ </ Badge >
300
+ ) : null }
285
301
</ h2 >
286
302
< WatchonlySetting keystore = { keystore . keystore } />
287
303
</ div >
0 commit comments