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
e5f959a9
Unverified
Commit
e5f959a9
authored
Feb 10, 2020
by
Hanwen Cheng
Committed by
GitHub
Feb 10, 2020
Browse files
fix: redirection for account with custom path (#544)
parent
8ef57b15
Pipeline
#78208
failed with stages
in 1 minute and 56 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/screens/PathDetails.js
View file @
e5f959a9
...
...
@@ -28,6 +28,7 @@ import QrView from '../components/QrView';
import
{
getAddressWithPath
,
getNetworkKey
,
getNetworkKeyByPath
,
getPathName
,
getPathsWithSubstrateNetwork
,
isSubstratePath
...
...
@@ -61,11 +62,15 @@ export function PathDetailsView({ accounts, navigation, path, networkKey }) {
await
unlockSeedPhrase
(
navigation
);
const
deleteSucceed
=
await
accounts
.
deletePath
(
path
);
const
paths
=
Array
.
from
(
accounts
.
state
.
currentIdentity
.
meta
.
keys
());
const
listedPaths
=
getPathsWithSubstrateNetwork
(
paths
,
networkKey
);
const
pathIndicatedNetworkKey
=
getNetworkKeyByPath
(
path
);
const
listedPaths
=
getPathsWithSubstrateNetwork
(
paths
,
pathIndicatedNetworkKey
);
const
hasOtherPaths
=
listedPaths
.
length
>
0
;
if
(
deleteSucceed
)
{
isSubstratePath
(
path
)
&&
hasOtherPaths
?
navigateToPathsList
(
navigation
,
n
etworkKey
)
?
navigateToPathsList
(
navigation
,
pathIndicatedN
etworkKey
)
:
navigation
.
navigate
(
'
AccountNetworkChooser
'
);
}
else
{
alertPathDeletionError
();
...
...
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