Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
parity-signer
Commits
36a6eff5
Unverified
Commit
36a6eff5
authored
Feb 07, 2020
by
Hanwen Cheng
Committed by
GitHub
Feb 07, 2020
Browse files
chore: add name into account qr code (#538)
* chore: add name into account qr code * chore: rename * merge master
parent
5700a4dd
Pipeline
#77806
failed with stages
in 1 minute and 44 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
src/screens/AccountDetails.js
View file @
36a6eff5
...
...
@@ -110,7 +110,9 @@ function AccountDetails({ accounts, navigation }) {
/
>
<
View
>
{
protocol
!==
NetworkProtocols
.
UNKNOWN
?
(
<
QrView
data
=
{
selectedKey
}
/
>
<
QrView
data
=
{
account
.
name
?
`
${
selectedKey
}
:
${
account
.
name
}
`
:
selectedKey
}
/
>
)
:
(
<
UnknownAccountWarning
/>
)}
...
...
src/screens/PathDetails.js
View file @
36a6eff5
...
...
@@ -28,6 +28,7 @@ import QrView from '../components/QrView';
import
{
getAddressWithPath
,
getNetworkKey
,
getPathName
,
getPathsWithSubstrateNetwork
,
isSubstratePath
}
from
'
../util/identitiesUtils
'
;
...
...
@@ -44,6 +45,7 @@ import UnknownAccountWarning from '../components/UnknownAccountWarning';
export
function
PathDetailsView
({
accounts
,
navigation
,
path
,
networkKey
})
{
const
{
currentIdentity
}
=
accounts
.
state
;
const
address
=
getAddressWithPath
(
path
,
currentIdentity
);
const
accountName
=
getPathName
(
path
,
currentIdentity
);
if
(
!
address
)
return
null
;
const
isUnknownNetwork
=
networkKey
===
UnknownNetworkKeys
.
UNKNOWN
;
const
formattedNetworkKey
=
isUnknownNetwork
?
defaultNetworkKey
:
networkKey
;
...
...
@@ -104,7 +106,7 @@ export function PathDetailsView({ accounts, navigation, path, networkKey }) {
<
/View
>
<
ScrollView
>
<
PathCard
identity
=
{
currentIdentity
}
path
=
{
path
}
/
>
<
QrView
data
=
{
accountId
}
/
>
<
QrView
data
=
{
`
${
accountId
}
:
${
accountName
}
`
}
/
>
{
isUnknownNetwork
&&
<
UnknownAccountWarning
isPath
/>
}
<
/ScrollView
>
<
/View
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment