Browse Source
relatable: https://ledgerhq.atlassian.net/secure/RapidBoard.jspa?rapidView=17&modal=detail&selectedIssue=LIVE-113master
4 changed files with 63 additions and 41 deletions
@ -0,0 +1,22 @@ |
|||||
|
// @flow
|
||||
|
|
||||
|
import React from 'react' |
||||
|
import type { Account } from '@ledgerhq/live-common/lib/types' |
||||
|
|
||||
|
import CurrentAddress from 'components/CurrentAddress' |
||||
|
|
||||
|
type Props = { |
||||
|
account: Account, |
||||
|
} |
||||
|
|
||||
|
export default function CurrentAddressForAccount(props: Props) { |
||||
|
const { account, ...p } = props |
||||
|
|
||||
|
// TODO: handle other cryptos than BTC-like
|
||||
|
let freshAddress = account.addresses[0] |
||||
|
if (!freshAddress) { |
||||
|
freshAddress = { str: '', path: '' } |
||||
|
} |
||||
|
|
||||
|
return <CurrentAddress accountName={account.name} address={freshAddress.str} {...p} /> |
||||
|
} |
Loading…
Reference in new issue