File tree Expand file tree Collapse file tree 2 files changed +4
-18
lines changed Expand file tree Collapse file tree 2 files changed +4
-18
lines changed Original file line number Diff line number Diff line change @@ -3,22 +3,13 @@ import { push } from 'connected-react-router';
3
3
import type { Dispatch , GetState } from '../reducers/types' ;
4
4
import type { Address } from '../models' ;
5
5
import routes from '../constants/routes' ;
6
- import { setAccountFromPrivateKey } from './account' ;
7
6
8
- import {
9
- isSpedingPasswordCreated ,
10
- readAccountKeysFromDEN
11
- } from '../utils/storage' ;
7
+ import { isSpedingPasswordCreated } from '../utils/storage' ;
12
8
13
9
// eslint-disable-next-line import/prefer-default-export
14
10
export const redirectToFirstAppPage = ( ) => {
15
11
return ( dispatch : Dispatch , getState : GetState ) => {
16
12
if ( isSpedingPasswordCreated ( ) ) return dispatch ( push ( routes . UNLOCK_WALLET ) ) ;
17
-
18
- const accountKeys = readAccountKeysFromDEN ( 'manteca' ) ;
19
- if ( accountKeys !== undefined ) {
20
- return dispatch ( setAccountFromPrivateKey ( accountKeys . privateKey ) ) ;
21
- }
22
13
const {
23
14
account : { address }
24
15
} : { account : { address : Address } } = getState ( ) ;
Original file line number Diff line number Diff line change @@ -39,14 +39,9 @@ export function getAccountState(identifier: Identifier): Promise<AccountState> {
39
39
} ) )
40
40
. catch ( error => {
41
41
if ( error && error . response && error . response . status === 404 ) {
42
- const hardcoded = {
43
- hardBalance : 0 ,
44
- hardCounter : 0 ,
45
- hardDelegation : { '00000x' : { parts : 1 } }
46
- } ;
47
- const balance : Balance = hardcoded . hardBalance ;
48
- const counter : Counter = hardcoded . hardCounter ;
49
- const delegation : Delegation = hardcoded . hardDelegation ;
42
+ const balance : Balance = 0 ;
43
+ const counter : Counter = 0 ;
44
+ const delegation : Delegation = { '00000x' : { parts : 1 } } ;
50
45
return {
51
46
balance,
52
47
counter,
You can’t perform that action at this time.
0 commit comments